SSTS Blog

Some news and tidbits that we share

RMAN switch to copy

by SSTS
SSTS
Server Side Technology Solutions is a consulting firm that specializes in databa
User is currently offline
on Aug 13 in Blog 0 Comments
Today I successfully used RMAN switch to copy to swap out my 500GB drives for a 1.5TB drives with minimal downtime. I have a simple setup where data resides on an E: drive and backups on the F: drive. The process was relatively simple.
1) Within RMAN execute backup as copy database
2) Shutdown the database
3) startup mount
4) Within RMAN execute switch... Today I successfully used RMAN switch to copy to swap out my 500GB drives for a 1.5TB drives with minimal downtime. I have a simple setup where data resides on an E: drive and backups on the F: drive. The process was relatively simple.
1) Within RMAN execute backup as copy database
2) Shutdown the database
3) startup mount
4) Within RMAN execute switch database to copy
5) Within RMAN execute recover database
6) alter database open

At this point I had the database running from the F: drive with the exeption of the redo and control files. In my case these reside on C: which was unaffected by this execise, but something you should be aware of. Also, the Temp tablespace files was not moved from this. There may be an option to include the TEMP tablespace, however it was easy enough for me to just create a new default tempory TEMP tablespace (named FTEMP) and drop the old one.
Now the move back. This really was just the same exercise in the other direction. In order to make it work I needed to first change the db_recovery_file_dest to point back to the E: drive
1) alter system set db_recovery_file_dest=E:\oradata
2) Within RMAN execute backup as copy database
3) Shutdown the database
4) startup mount
5) Within RMAN execute switch database to copy
6) Within RMAN execute recover database
7) alter database open
8) Create a new default TEMP tablespace on E:
9) alter system set db_recovery_file_dest=F:\flash_recovery_area scope=both
At this point the database is back on the E: drive. However, we are vulnerable at this point so I immediately kicked off a database backup to get things back to a suitable state.
One side effect of this execrise was that my datafiles were renamed. Before the move I had a naming convention for datafiles using the tablespace_name_.DBF. For example,
for the QUANT tablespace QUANT_01.DBF, QUANT_02,DBF, etc... I don't know of a way to name datafiles according to this format using backup as copy database. You can use a custom format at the individual copy datafile level, but that seemed error prone since I would need to type in the file names by hand and run alot more switch commands.

Read more http://billennis-ssts.blogspot.com/2009/08/rman-switch-to-copy.html

Tags: Untagged
Hits: 75765

About the author

SSTS

Server Side Technology Solutions is a consulting firm that specializes in database design, development and support.

Comments

Please login first in order for you to submit comments