Monday, August 11, 2014

Moving Datafile from One Disk Group to another managed by SQL Developer

Moving Datafile from One Disk Group to another managed by SQL Developer

Read me before you start

Now with PDB_DATA disk group ready and I wanted to move one data file into it from CDB_DATA disk group.

SQL Developer ; given that most of us spend time with 12c grid control to manage databases the era of command line management is going down. GUI management with wizards are less human error free from command line procedures. I love command line but I wanted to go with series of blogs in managing 12c with SQL Developer (no ssh and no grid control).


To start with connect to the Container Database and invoke the DBA option from SQL Developer



Now connect to the CDB Database and modify the state of the PDB001




Let us add a tablespace



Now I am taking the datafile to offline mode.



Now I am creating a Custom Disk Backup to move the data file.



In the RMAN Script section make a COPY of the Datafile which has to be moved to the PDB_DATA disk group.



Verify the Image Copy


Create another Custom Backup to RENAME the file.



Now Switch the Datafile to COPY using Custom Backup Option



Now Recover the Datafile




Place the Datafile online




With this we have successfully moved a data file to another disk group using only SQL Developer.
The power of SQL Developer is getting stronger and stronger with every release.

No comments:

Post a Comment