Backup and restore a single/multiple tablespace(s) using RMAN
Hi,
I have performed the following steps involved in the backup and recovery of a particular tablespace:
1. rman catalog rman/rman@test target /
RMAN> run {
backup as compressed backupset
tag TBS_RTSTUSR28
format '/dev2db/rmantst/archrtst/databkp/TBS_%d%s%p'
tablespace RTESTUSR;
}
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6998 Full 184.00K DISK 00:00:00 28-FEB-11
BP Key: 7000 Status: AVAILABLE Compressed: YES Tag: TBS_RTSTUSR28
Piece Name: /dev2db/rmantst/archrtst/databkp/TBS_RTEST821
List of Datafiles in backup set 6998
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
6 Full 303913 28-FEB-11 /dev2db/rmantst/db/oradata/rtest/rtestusr01.dbf
Now:
$ sqlplus / as sysdba
SQL> alter tablespace RTESTUSR offline;
SQL> drop tablespace RTESTUSR including contents and datafiles;
Now when tried to restore the tablespace, recovered the following error
$ rman catalog rmantst/rman@test target /
RMAN> run{
2> set until scn 303913;
3> restore tablespace RTESTUSR;
4> recover tablespace RTESTUSR;
5> sql 'alter tablespace RTESTUSR online';
6> }
executing command: SET until clause
starting full resync of recovery catalog
full resync complete
Starting restore at 28-FEB-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=34 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=33 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=32 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00006 to /dev2db/rmantst/db/oradata/rtest/rtestusr01.dbf
channel ORA_DISK_1: reading from backup piece /dev2db/rmantst/archrtst/tbspbkp/TBS_RTEST761
channel ORA_DISK_1: restored backup piece 1
piece handle=/dev2db/rmantst/archrtst/tbspbkp/TBS_RTEST761 tag=TBS_RTSTUSR_1_2
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/28/2011 16:27:34
ORA-19654: must use backup control file to switch file incarnations
Please advice.
Thanks in advance.
Bikram