Oracle Move Datafile



We can move/relocate oracle datafile to different location, In this article, we will move datafile with the help of Recovery Manager.

How to Move / Rename datafile in Oracle 11g RAC – ASM?- Used oracle version is 11.2.0.3 on AIX platform. Rename or relocate of datafiles are possible in Oracle database. When you rename and relocate datafiles with these procedures, only the pointers to the datafiles, as recorded in the database control file, are changed. I have to move 2 datafile to new location, can some one tell me steps? 1-shutdown immediate 2-mv oldfile newfile 3-startup mount 4-alter datafile rename oldfile to newfile. 5-alter system open 9683 Views. How to rename or move a datafile in oracle. 14389 views 1 min, 32 sec read 3 If you are in 12c version,then renaming a datafile can be done online, without making.

  1. Move the files edit the generated CREATE CONTROLFILE statement (found in the user dump destination) and change the filenames use the generated script you just edited to startup the database.
  2. To move the datafiles to a read only media, first alter the tablespaces as read only, then rename the datafiles to the new location by using the ALTER TABLESPACE RENAME DATAFILE option. Offline Tablespaces.

Consider step by step approach to move oracle datafile as below:

Step I:

Get database datafile ID those you wanted to move with the help of REPORT SCHEMA rman command as below:

Note: To simulate scenario, I am going to move PROD_LOB tablespace( i.e. FILE ID:7 ) from ‘/DATA1/database/prod/’ to new location ‘/NewData/prodDB/df/’.

Step II:

Offline tablespace that you want to move.

Oracle move datafile 12c

Step III:

Copy all the datafiles to destination, In our case PROD_LOB tablespace having only one datafile.

Step IV:

Switch back to the new datafile copy(s)

Step V:

Bring offline Tablespace to online state with the help of SQL command: ‘ALTER TABLESPACE’.

Step VI:

Step VII:

If Tablespace get back to online state successfuly, than old datafile is useless. Remove it.

Cheers!! Datafile relocated successfully.

Related Article

Online Move Datafiles in Oracle 12c R1 without getting file offline

Related

We can move/relocate oracle datafile to different location, In this article, we will move datafile with the help of Recovery Manager.

Consider step by step approach to move oracle datafile as below:

Step I:

Get database datafile ID those you wanted to move with the help of REPORT SCHEMA rman command as below:

Note: To simulate scenario, I am going to move PROD_LOB tablespace( i.e. FILE ID:7 ) from ‘/DATA1/database/prod/’ to new location ‘/NewData/prodDB/df/’.

Step II:

Oracle Move Datafile Online

Offline tablespace that you want to move.

Step III:

Copy all the datafiles to destination, In our case PROD_LOB tablespace having only one datafile.

Step IV:

Switch back to the new datafile copy(s)

Step V:

Bring offline Tablespace to online state with the help of SQL command: ‘ALTER TABLESPACE’.

Step VI:

Move

Step VII:

If Tablespace get back to online state successfuly, than old datafile is useless. Remove it.

Cheers!! Datafile relocated successfully.

Related Article

Oracle Move Datafile To New Location

Oracle

Online Move Datafiles in Oracle 12c R1 without getting file offline

Oracle Move Tablespace

Related