同样恢复一个数据文件,rman和sql中…

来源:互联网 发布:出售淘宝卖家帐号 编辑:程序博客网 时间:2024/06/15 06:20
重命名的一个数据文件,重命名了日志序列号为148的归档日志,有0级和1级增量备份

RMAN> recover datafile 4;


archived log for thread 1 with sequence 145 is already on diskas file/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_145_8sl7jyvm_.arc
archived log for thread 1 with sequence 146 is already on diskas file/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_146_8sl7oncr_.arc
archived log for thread 1 with sequence 147 is already on diskas file/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_147_8sl815wr_.arc
archived log for thread 1 with sequence 149 is already on diskas file/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_149_8sl8qonq_.arc
archived log for thread 1 with sequence 150 is already on diskas file/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_150_8sltvt93_.arc
RMAN-00571:===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS===============
RMAN-00571:===========================================================
RMAN-03002: failure of recover command at 05/20/201314:05:10
RMAN-06053: unable to perform media recovery because ofmissing log
RMAN-06025: no backup of archived log for thread 1 withsequence 148 and starting SCN of 4037950 found to restore

RMAN> 



SQL> recover datafile 4;
ORA-00279: change 4017503 generated at 05/20/2013 02:45:31needed for thread 1
ORA-00289: suggestion :
/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_145_8sl7jyv
m_.arc
ORA-00280: change 4017503 for thread 1 is in sequence#145


Specify log: {=suggested | filename | AUTO | CANCEL}

ORA-00279: change 4017615 generated at 05/20/2013 02:46:54needed for thread 1
ORA-00289: suggestion :
/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_146_8sl7onc
r_.arc
ORA-00280: change 4017615 for thread 1 is in sequence#146


Specify log: {=suggested | filename | AUTO | CANCEL}

ORA-00279: change 4017798 generated at 05/20/2013 02:49:24needed for thread 1
ORA-00289: suggestion :
/u02/oracle/flash_recovery_area/TESTDB/archivelog/2013_05_20/o1_mf_1_147_8sl815w
r_.arc
ORA-00280: change 4017798 for thread 1 is in sequence#147


Specify log: {=suggested | filename | AUTO | CANCEL}

Log applied.
Media recovery complete.
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01124: cannot recover data file 1 - file is in use orrecovery
ORA-01110: data file 1:'/u02/oracle/oradata/testdb/system01.dbf'


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  417546240bytes
Fixed Size               2213936 bytes
Variable Size           314574800 bytes
Database Buffers          96468992bytes
Redo Buffers              4288512bytes
Database mounted.
Database opened.

SQL> recover datafile 4;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required


SQL> alter database datafile 4 online;          

Database altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  417546240bytes
Fixed Size               2213936 bytes
Variable Size           314574800 bytes
Database Buffers          96468992bytes
Redo Buffers              4288512bytes
Database mounted.
Database opened.
SQL> 


为什么Rman中需要序列为148的归档日志,而在SQL中却到147的归档日志就完成恢复了(完全恢复)

0 0