3 1 102 52428800 512 1 NO CURRENT 1365981 14-AUG-14 2.8147E+14
2.SYS@ENMOEDU> select * from v$logfile; #查看日志的具体位置
GROUP# STATUS TYPE ---------- ------- ------- MEMBER -------------------------------------------------------------------------------- IS_ --- 1 ONLINE /u01/app/oracle/oradata/ENMOEDU/redo01.log NO
2 ONLINE /u01/app/oracle/oradata/ENMOEDU/redo02.log NO
GROUP# STATUS TYPE ---------- ------- ------- MEMBER -------------------------------------------------------------------------------- IS_ ---
3 ONLINE /u01/app/oracle/oradata/ENMOEDU/redo03.log NO[oracle@ENMOEDU ENMOEDU]$ scp /u01/app/oracle/oradata/ENMOEDU/redo03.log oracle@192.168.80.11:/u01/app/oracle oracle@192.168.80.11"s password: redo03.log 100% 50MB 50.0MB/s 00:01 至于归档嘛 我在测试的时候没有切换日志,也不存在日志组写满的情况,所以没有产生归档,又因为我在备份的时候加上了delete all input 所以会把已经备份的归档删掉,所以你不会看到新的归档 也就不用传了 呵呵四:在B机操作1,开启伪实例,注意可不要把B机的数据库实例给打开了 因为我的测试B机也有数据库。[oracle@ENMOEDU ~]$ set DBID=87396644 #设成A机的数据库编号RMAN> startup #启动伪实例 [oracle@ENMOEDU ENMOEDU]$ rman target / RMAN> restore spfile from "/u01/app/oracle/ENMOEDU/backupset/2014_08_14/o1_mf_ncsnf_TAG20140814T203309_9ysc8x14_.bkp"; Starting restore at 15-AUG-14using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=20 device type=DISK channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/ENMOEDU/backupset/2014_08_14/o1_mf_ncsnf_TAG20140814T203309_9ysc8x14_.bkpchannel ORA_DISK_1: SPFILE restore from AUTOBACKUP completeFinished restore at 15-AUG-14[oracle@ENMOEDU dbs]$ ls #恢复的参数文件在$ORACLE_HOME/dbs 下 hc_ENMOEDU2.dat lkDUMMY orapwENMOEDU spfileENMOEDU2.oraRMAN> shutdown immediate #关伪实例 Oracle instance shut down2.然后再起真正的实例,恢复控制文件(要注意,他原来就有,你这样起,把B机的所有文件包括 数据文件 ,控制文件,参数文件,日志文件都删掉)SQL> startupORACLE instance started. Total System Global Area 422670336 bytesFixed Size 1345380 bytesVariable Size 260049052 bytesDatabase Buffers 155189248 bytesRedo Buffers 6086656 bytesORA-00205: error in identifying control file, check alert log for more infoRMAN> restore controlfile from "/u01/app/oracle/ENMOEDU/backupset/2014_08_14/o1_mf_ncsnf_TAG20140814T203309_9ysc8x14_.bkp"; Starting restore at 15-AUG-14using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=18 device type=DISK channel ORA_DISK_1: restoring control filechannel ORA_DISK_1: restore complete, elapsed time: 00:00:01output file name=/u01/app/oracle/oradata/ENMOEDU/control01.ctloutput file name=/u01/app/oracle/fast_recovery_area/ENMOEDU/control02.ctlFinished restore at 15-AUG-143.把数据库开到mount状态,以便修复数据文件。RMAN> alter database mount; database mountedreleased channel: ORA_DISK_1RMAN> restore database; #恢复数据文件 发现报错,很可能是备份已经过期已经, Starting restore at 15-AUG-14using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=1 device type=DISK creating datafile file number=1 name=/u01/app/oracle/oradata/ENMOEDU/system01.dbfRMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of restore command at 08/15/2014 23:21:00ORA-01180: can not create datafile 1ORA-01110: data file 1: "/u01/app/oracle/oradata/ENMOEDU/system01.dbf"RMAN> list backup; #查看备份信息 发现确实过期10 13.85M DISK 00:00:02 14-AUG-14 BP Key: 14 Status: EXPIRED Compressed: NO Tag: TAG20140814T203306 Piece Name: /u01/app/oracle/arch_50pfv1g2_1_1.rmn然后再去A机 再来一个整体备份 再传给B机 不在赘述,再恢复控制文件,然后再恢复数据文件, 再启动到open即可。 更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12 本文永久更新链接地址