1SQL>recover database;
该命令用来对所有数据文件进行恢复,只能使用保存在文件系统上的归档日志及在线日志。使用此类命令的前提是控制文件不可以是还原或重建得来的。
SQL>recover database until sequence XX;--SQL没有这样的写法,会报错ORA-00277: illegal option to the UNTIL recovery flag SEQUENCE
2SQL>recover database using backup controlfile;
该命令用来对所有数据文件及控制文件进行恢复,只能使用保存在文件系统上的归档日志及在线日志。
3RMAN>recover database;
该命令用来对所有数据文件及控制文件进行恢复,可以使用增量备份、备份中的和文件系统上的归档日志,以及文件系统上的在线日志
三者关于Specify log: {=suggested | filename | AUTO | CANCEL}提示的区别RMAN不会有这样的提示,所以RMAN>recover database until cancel会报错
SQL>recover database until cancel;会带出如下Specify log: {=suggested | filename | AUTO | CANCEL}信息
SQL>recover database using backup controlfile;会自动带出Specify log: {=suggested | filename | AUTO | CANCEL}信息
输入filename表示输入具体的归档日志进行recover(current redo日志丢失的时候,filename就是对应 current redo日志的路径),如下案例85提示显示为归档日志,但是current redo日志,所以输入/db/oracle/oradata/PROD1/redo01.log
输入AUTO表示主动recover直到最后一个归档日志
SQL> recover database until cancel;
ORA-00279: change 2292679 generated at 07/31/2017 14:26:21 needed for thread 1
ORA-00289: suggestion :
/db/oracle/fast_recovery_area/PROD1/archivelog/2017_07_31/o1_mf_1_85_%u_.arc
ORA-00280: change 2292679 for thread 1 is in sequence #85
Specify log: {=suggested | filename | AUTO | CANCEL}
/db/oracle/oradata/PROD1/redo01.log
ORA-00308: cannot open archived log '/db/oracle/oradata/PROD1/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Specify log: {=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00308: cannot open archived log
'/db/oracle/fast_recovery_area/PROD1/archivelog/2017_07_31/o1_mf_1_85_%u_.arc'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
文章名称:recover三种方式的说明
文章出自:
http://cdkjz.cn/article/jdojhh.html