Renaming Data Files with RMAN scripts

August 17, 2019

I spent some time today arguing with RMAN.

 

I know, how could that be?

 

Well without explaining all my delights, here is how you get RMAN to run a script to firstly copy your existing data files to new names, switch across to them, recover and then delete the old files.

 

For this post, an explanation of each step is missing, but the command set works, aand if you are like me, the example is all we need to make it all work.

 

I hope is helps strip out some wasted time.

 

 

Cheers.

 

 

Martin Power

Ace Associate.

 

 

run
{
copy datafile 1 to +DATA/PROD/DATAFILE/SYSTEM_PCS_1.dbf tag move1;
copy datafile 3 to +DATA/PROD/DATAFILE/SYSAUX_PCS_3.dbf tag move2;
copy datafile 7 to +DATA/PROD/DATAFILE/USERS_PCS_7.dbf tag move3;
copy datafile 4 to +DATA/PROD/DATAFILE/UNDOTBS1_PCS_4.dbf tag move4;
shutdown immediate;
startup mount;
switch datafile 1 to datafilecopy tag move1;
switch datafile 3 to datafilecopy tag move2;
switch datafile 7 to datafilecopy tag move3;
switch datafile 4 to datafilecopy tag move4;
recover datafile 1;
recover datafile 3;
recover datafile 7;
recover datafile 4;
alter database open;
delete noprompt copy of datafile 1;
delete noprompt copy of datafile 3;
delete noprompt copy of datafile 7;
delete noprompt copy of datafile 4;
}

 

 

Please reload

Featured Posts

Oracle Extreme Performance Systems

February 15, 2015

1/1
Please reload

Recent Posts
Please reload

Archive
Please reload

Search By Tags
Please reload

Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
Contact PCS on,
24 x 7: 61 (0)411 248486
info@parishcrest.com.au
 
Support:
support@parishcrest.com.au
Tel: 61 3 9563 8261
     : 61 3 8795 4969

VISIT US

4/31 Fiveways Boulevard

Keysborough 3173

03 8759 4969

Capability Statement

CALL

Tel: 61 3 8759 4969