标签:style clu count targe 好的 footer pre ESS dia
Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.2 [Release 10.1 to 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.3 [Release 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.1.0.1 [Release 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 21-AUG-15 ***
If you need to perform restore/recovery on a different host for a backup taken on another host, also refer:
如果您需要在另一台主机上执行还原/恢复以在另一台主机上进行备份,请参考
Note 419137.1 How To Restore Rman Backups On A Different Node When The Directory Structures Are Different
How to restore a complete database from an RMAN backup 如何从RMAN备份还原完整的数据库
This note assumes an RMAN catalog is not available. The use of a catalog is optional in this scenario as the backup information is available in the controlfile.
本说明假定RMAN目录不可用。在这种情况下,使用目录是可选的,因为控制文件中提供了备份信息
Note: If you do not need to restore a controlfile proceed to step 3. 如果不需要还原控制文件,请继续执行 step 3
2a) If you DO NOT have a spfile.
If you do have an spfile or init.ora move to Step 2b 如果您有spfile或init.ora,请转到步骤2b
If you do not have a valid spfile or init.ora RMAN has the ability to nomount an instance without the requirement of a spfile. This will allow you to restore your spfile from a valid backup.
如果您没有有效的spfile或init.ora,RMAN可以在不需要spfile的情况下卸载实例。 这将允许您从有效备份中还原spfile。
% rman target / RMAN> startup nomount force;
You will see this message: 您将看到以下消息:
RMAN> restore spfile from ‘/<FRA path>/o1_mf_ncsnf_TAG20_501tr0h7_.bkp‘; RMAN> shutdown immediate;
Once the spfile has been successfully restored proceed to Step 2b.
2b)
SQL> startup nomount;
Following the successful nomount of the instance you are ready to restore the controlfile; 成功执行完实例之后,您就可以恢复控制文件了。
SQL> show parameter control_files NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_files string /<oradata path>/control01.ctl
% rman target /
You will see the message: 您将看到以下消息:
RMAN> restore controlfile from ‘/<FRA path>/o1_mf_ncsnf_TAG20090506T113947_501tr0h7_.bkp‘; Starting restore at 2009/05/11 11:01:26 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=151 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output file name=/<oradata path>/control01.ctl Finished restore at 2009/05/11 11:01:27
Your next task is to restore the database and perform recovery. Mount the database now that the controlfile has been restored:
下一个任务是还原数据库并执行恢复。 现在已经恢复了控制文件,请装入数据库:
RMAN> alter database mount;
Now you have two options for recovery. 现在,您有两个恢复选项。
在两个示例中,均假定所有存档日志都可用于执行恢复。
run{ restore database; recover database; alter database open resetlogs; }
If you performed a complete recovery with current controlfile and online redologs in place, you might get below error when opening the database with resetlogs:
如果使用当前的控制文件和联机重做日志执行了完全恢复,则在使用复位日志打开数据库时,可能会遇到以下错误:
ORA-01139: RESET LOGS option only valid after an incomplete database recovery
At this point simply open the database without resetlogs option.
此时,只需打开不带resetlogs选项的数据库即可。
run{ set until time "to_date(‘Aug 16 2014 10:30:00‘,‘Mon DD YYYY HH24:MI:SS‘)"; restore database; recover database; sql ‘alter database open resetlogs‘; }
NOTE: The above scripts may be altered to allocate more channels. Good practice would be to review the backup log and use the same number of channels for restore as that used by the backup. 注意:可以更改以上脚本以分配更多通道。 良好的做法是查看备份日志,并使用与备份所使用的相同数量的通道进行还原。
NOTE:419137.1 - How To Restore Rman Backups On A Different Node When The Directory Structures Are Different
How to restore and recover a database from an RMAN backup. (Doc ID 881395.1)
标签:style clu count targe 好的 footer pre ESS dia
原文地址:https://www.cnblogs.com/zylong-sys/p/11990732.html