Monday, November 25, 2013

MOVING/RENAMING DATAFILES WHILE DATABASE IS ONLINE



APPLY ONLY NON-SYSTEM TABLESPACE OR TEMP TABLESPACE

SQL> alter tablespace test offline;

Tablespace altered.

SQL>

first u copy datafile to another location 
SQL> ! cp /u02/app/oracle/oradata/test/test.dbf /u02/app/oracle/oradata/orcl/test.dbf

SQL>alter database rename file '/u02/app/oracle/oradata/test/test.dbf' to '/u02/app/oracle/oradata/orcl/test.dbf';
SQL> alter tablespace test online;

Tablespace altered.

if working properly then  delete old file from  
/u02/app/oracle/oradata/test/test.dbf location........


No comments:

Post a Comment

Setup and design database architecture to meet SLA - 99.9 , 99.99 , 99.999

Achieving distinct Service Level Agreements (SLAs) for a database requires scaling redundancy and infrastructure complexity.  The three-nine...