RMAN> catalog backuppiece
2> 'D:oracleproduct10.2.0flash_recovery_areaORCLBACKUPSET2008_05_01O1_MF_NNNDF_TAG20080501T164457_41M0RB8C_.BKP'
;
cataloged backuppiece
backup piece handle=D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLBACKUPSET2008_05_01O1_MF_NNNDF_TAG20080501T16445
7_41M0RB8C_.BKP recid=97 stamp=653612555
RMAN> run {
2> set until logseq 17;
3> set newname for datafile 1 to 'c:test_orcloradataSYSTEM01.DBF';
4> set newname for datafile 2 to 'c:test_orcloradataUNDOTBS01.DBF';
5> set newname for datafile 3 to 'c:test_orcloradataSYSAUX01.DBF';
6> set newname for datafile 4 to 'c:test_orcloradataUSERS01.DBF';
7> set newname for datafile 5 to 'c:test_orcloradataTEST.DBF';
8> restore database ;
9> switch datafile all;
10> }
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 08-05-01
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to C:TEST_ORCLORADATASYSTEM01.DBF
restoring datafile 00002 to C:TEST_ORCLORADATAUNDOTBS01.DBF
restoring datafile 00003 to C:TEST_ORCLORADATASYSAUX01.DBF
restoring datafile 00004 to C:TEST_ORCLORADATAUSERS01.DBF
restoring datafile 00005 to C:TEST_ORCLORADATATEST.DBF
channel ORA_DISK_1: reading from backup piece D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLBACKUPSET2008_05_01O1_
MF_NNNDF_TAG20080501T164457_41M0RB8C_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLBACKUPSET2008_05_01O1_MF_NNNDF_TAG20080501T164457_41M0R
B8C_.BKP tag=TAG20080501T164457
channel ORA_DISK_1: restore complete, elapsed time: 00:01:35
Finished restore at 08-05-01
datafile 1 switched to datafile copy
input datafile copy recid=25 stamp=653612666 filename=C:TEST_ORCLORADATASYSTEM01.DBF
datafile 2 switched to datafile copy
input datafile copy recid=26 stamp=653612667 filename=C:TEST_ORCLORADATAUNDOTBS01.DBF
datafile 3 switched to datafile copy
input datafile copy recid=27 stamp=653612667 filename=C:TEST_ORCLORADATASYSAUX01.DBF
datafile 4 switched to datafile copy
input datafile copy recid=28 stamp=653612667 filename=C:TEST_ORCLORADATAUSERS01.DBF
datafile 5 switched to datafile copy
input datafile copy recid=29 stamp=653612667 filename=C:TEST_ORCLORADATATEST.DBF
RMAN>
RMAN> recover database until logseq 17;
Starting recover at 08-05-01
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 15 is already on disk as file D:ORACLEPRODUCT10.2.0ORADATAORCLREDO03.LOG
archive log thread 1 sequence 16 is already on disk as file D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLONLINELOG
REDO4.LOG
archive log filename=D:ORACLEPRODUCT10.2.0ORADATAORCLREDO03.LOG thread=1 sequence=15
archive log filename=D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLONLINELOGREDO4.LOG thread=1 sequence=16
media recovery complete, elapsed time: 00:00:04
Finished recover at 08-05-01
RMAN>
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/66634/viewspace-1003217/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/66634/viewspace-1003217/