//
you're reading...
Oracle ASM, Oracle RMAN

How to relocated the Oracle Database datafile between ASM Disk

–Rename non-system datafiles

–offline the datafile

SQL> ALTER DATABASE DATAFILE '+TESTDBDATA/TESTDB/DATAFILE/TABLE.256.895127738' OFFLINE;

–using the rman ‘COPY’ to create a rman backup for the datafile

RMAN> COPY DATAFILE '+TESTDBDATA/TESTDB/DATAFILE/TABLE.256.895127738' TO '+TESTDBDATA';

–rename the datafile in the database

SQL> ALTER DATABASE RENAME FILE '+TESTDBDATA/TESTDB/DATAFILE/TABLE.256.895127738' TO '+TESTDBDATA/TESTDB/DATAFILE/TABLE.264.895128567';

–switch the datafile mapper to the copy, it will cause the change of the control file

RMAN> SWITCH DATAFILE '+TESTDBDATA/TESTDB/DATAFILE/TABLE.264.895128567' TO COPY;

–media recover datafile

SQL> RECOVER DATAFILE '+TESTDBDATA/TESTDB/DATAFILE/TABLE.264.895128567';

–Bring the datafile online

SQL> ALTER DATABASE DATAFILE '+TESTDBDATA/TESTDB/DATAFILE/TABLE.264.895128567' ONLINE;

–Repeat the process for all non-system datafile

Advertisements

About daviewning

I am an Oracle DBA

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: