RMAN备份异机恢复并创建新DBID(四)
mout状态
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
7. restore 数据库
因为我们的路径不同,所以我们需要使用set 命令转换一下路径。
注意,restore 的时候不会对temp 表空间进行restore。所以等restore 之后,我们需要手工创建temp表空间。
RMAN> run
2> {
3> set newname for datafile 1 to "/u01/oradata/orcl/system01.dbf";
4> set newname for datafile 2 to "/u01/oradata/orcl/undotbs01.dbf";
5> set newname for datafile 3 to "/u01/oradata/orcl/sysaux01.dbf";
6> set newname for datafile 4 to "/u01/oradata/orcl/DEALSPACE_002.dbf";
7> set newname for datafile 5 to "/u01/oradata/orcl/DEALSPACE_001.dbf";
8> set newname for datafile 6 to "/u01/oradata/orcl/l5mspace01.dbf";
9> set newname for datafile 7 to "/u01/oradata/orcl/RCFSPACE_002.dbf";
10> set newname for datafile 8 to "/u01/oradata/orcl/RCFSPACE_001.dbf";
11> set newname for datafile 9 to "/u01/oradata/orcl/DTSPACE_001.dbf";
12> restore database;
13> switch datafile all;
14> }
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 09-APR-13
Starting implicit crosscheck backup at 09-APR-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=101 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=100 devtype=DISK
Crosschecked 12 objects
Finished implicit crosscheck backup at 09-APR-13
Starting implicit crosscheck copy at 09-APR-13
using channel ORA_DISK_1
using channel ORA_DISK_2
Finished implicit crosscheck copy at 09-APR-13
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/orcl/system01.dbf
restoring datafile 00002 to /u01/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /u01/oradata/orcl/sysaux01.dbf
restoring datafile 00004 to /u01/oradata/orcl/DEALSPACE_002.dbf
restoring datafile 00005 to /u01/oradata/orcl/DEALSPACE_001.dbf
restoring datafile 00006 to /u01/oradata/orcl/l5mspace01.dbf
restoring datafile 00007 to /u01/oradata/orcl/RCFSPACE_002.dbf
restoring datafile 00008 to /u01/oradata/orcl/RCFSPACE_001.dbf
restoring datafile 00009 to /u01/oradata/orcl/DTSPACE_001.dbf
channel ORA_DISK_1: reading from backup piece /u03/RMAN/db00ao6kq0u_10_1.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/u03/RMAN/db00ao6kq0u_10_1.bak tag=TAG20130409T091718
channel ORA_DISK_1: restore complete, elapsed time: 00:17:57
Finished restore at 09-APR-13
datafile 1 switched to datafile copy
input datafile copy recid=37 stamp=812304874 filename=/u01/oradata/orcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy recid=38 stamp=812304874 filename=/u01/oradata/orcl/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=39 stamp=