RMAN异机恢复步骤及故障处理(六)

2014-11-24 14:36:06 · 作者: · 浏览: 1
atalog start with '/oracle/backupsets';
using target database control file instead of recovery catalog searching for all files that match the pattern /oracle/backupsets
List of Files Unknown to the Database ===================================== File Name: /oracle/backupsets/ora10g-4175411955_20141012_860776704_316.db File Name: /oracle/backupsets/ora10g-4175411955_20141012_860776830_317.arc File Name: /oracle/backupsets/ora10g-c-4175411955-20141012-00.ctl File Name: /oracle/backupsets/ora10g-4175411955_20141012_860776699_315.arc
Do you really want to catalog the above files (enter YES or NO) yes cataloging files... cataloging done
List of Cataloged Files ======================= File Name: /oracle/backupsets/ora10g-4175411955_20141012_860776704_316.db File Name: /oracle/backupsets/ora10g-4175411955_20141012_860776830_317.arc File Name: /oracle/backupsets/ora10g-c-4175411955-20141012-00.ctl File Name: /oracle/backupsets/ora10g-4175411955_20141012_860776699_315.arc
RMAN>
现在可以把目录catalog到控制文件了,其实ora10g-c-4175411955-20141012-00.ctl已经用不到,我们需要的是.db,.arc这几个备份集

RMAN> run{

set newname for datafile 1 to"/oradata/ora10g/system01.dbf";

set newname for datafile 2 to"/oradata/ora10g/undotbs01.dbf";

set newname for datafile 3 to"/oradata/ora10g/sysaux01.dbf";

set newname for datafile 4 to"/oradata/ora10g/users01.dbf";

set newname for datafile 5 to"/oradata/ora10g/example01.dbf";

set newname for datafile 6 to"/oradata/ora10g/zlm01.dbf";

restore database;

switch datafile all;

}

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 12-OCT-14

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=159 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /oradata/ora10g/system01.dbf

restoring datafile 00002 to /oradata/ora10g/undotbs01.dbf

restoring datafile 00003 to /oradata/ora10g/sysaux01.dbf

restoring datafile 00004 to /oradata/ora10g/users01.dbf

restoring datafile 00005 to /oradata/ora10g/example01.dbf

restoring datafile 00006 to /oradata/ora10g/zlm01.dbf

channel ORA_DISK_1: reading from backup piece /u01/orabackup/backupsets/ora10g-4175411955_20141012_860776704_316.db

channel ORA_DISK_1: restored backup piece 1

failover to piece handle=/oracle/backupsets/ora10g-4175411955_20141012_860776704_316.db tag=DB_BAK

channel ORA_DISK_1: restore complete, elapsed time: 00:02:17

Finished restore at 12-OCT-14

datafile 1 switched to datafile copy

input datafile copy recid=18 stamp=860783911 filename=/oradata/ora10g/system01.dbf

datafile 2 switched to datafile copy

input datafile copy recid=19 stamp=860783911 filename=/oradata/ora10g/undotbs01.dbf

datafile 3 switched to datafile copy

input datafile copy recid=20 stamp=860783911 filename=/oradata/ora10g/sysaux01.dbf

datafile 4 switched to datafile copy

input datafile copy recid=21 stamp=860783911 filename=/oradata/ora10g/users01.dbf

datafile 5 switched to datafile copy

input datafile copy recid=22 stamp=860783911 filename=/oradata/ora10g/example01.dbf

datafile 6 switched to datafile copy

input datafile copy reci