Move Data File
After changing SPFILE location, changing control file location and changing redo logs location, we are going to move or rename data files.
There're several ways that can move data files from one place to another in this post.
- ALTER DATABASE MOVE DATAFILE Online at File Level by SQL
- ALTER DATABASE RENAME FILE at File Level by SQL
- SWITCH DATAFILE TO COPY at File Level by RMAN
- SWITCH TABLESPACE TO COPY at Tablespace Level by RMAN
- SWITCH DATABASE TO COPY at Database Level by RMAN
The new feature from release 12c enables us to move data files online by SQL form one place to another.
The old-styled renaming procedure can also move data files offline by SQL no matter what release you have.
We backup a copy of the data file by RMAN and make a switch to the copy and then make it work.
We backup a copy of the tablespace by RMAN and make a switch to the copy and then make it work.
We backup a copy of the database by RMAN and make a switch to the copy and then make it work.
For you reference, the procedures to move a whole database offline can also be useful.