RMAN RECOVER DATABASE出现如下问题:
RMAN> recover database; Starting recover at 27-MAR-14 using channel ORA_DISK_1 starting media recovery unable to find archive log archive log thread=1 sequence=26 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 03/27/2014 22:27:46 RMAN-06054: media recovery requesting unknown log: thread 1 seq 26 lowscn 662459 |
原因分析:
找不到归档日志。RMAN下执行recover恢复时,RMAN会自动恢复到控制文件中记录的SCN。在异机进行恢复时,只拷贝了备份文件,而源库的联机日志文件并没有拷贝或者说缺少源库联机日志文件信息。
执行如下基于SCN的恢复:
RMAN> run { 2> set until scn 662459; 3> recover database; 4> } executing command: SET until clause Starting recover at 27-MAR-14 using channel ORA_DISK_1 starting media recovery unable to find archive log archive log thread=1 sequence=26 Oracle Error: ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01194: file 2 needs more recovery to be consistent ORA-01110: data file 2: '/u01/app/oradata/myorcl/undotbs01.dbf' RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 03/27/2014 22:50:52 RMAN-06054: media recovery requesting unknown log: thread 1 seq 26 lowscn 662459 |
尝试打开数据库
SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01194: file 2 needs more recovery to be consistent ORA-01110: data file 2: '/u01/app/oradata/myorcl/undotbs01.dbf' |
查看rollback_segments
SQL> show parameter rollback; NAMETYPEVALUE ------------------------------------ ----------- ------------------------------ fast_start_parallel_rollbackstringLOW rollback_segmentsstring transactions_per_rollback_segmentinteger5 |
修改初始化参数
SQL> alter system set rollback_segments='SYSTEM' scope=spfile; System altered. |
重启数据库
SQL> shutdown immediate ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area281018368 bytes Fixed Size2020160 bytes Variable Size113249472 bytes Database Buffers159383552 bytes Redo Buffers6365184 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SQL> alter database open RESETLOGS; alter database open RESETLOGS * ERROR at line 1: ORA-01194: file 2 needs more recovery to be consistent ORA-01110: data file 2: '/u01/app/oradata/myorcl/undotbs01.dbf' |
将undotbs01.dbf离线,并以resetlogs方式打开数据库
SQL> alter database datafile '/u01/app/oradata/myorcl/undotbs01.dbf' offline drop; Database altered. SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01194: file 3 needs more recovery to be consistent ORA-01110: data file 3: '/u01/app/oradata/myorcl/sysaux01.dbf' |
将sysaux01.dbf离线,并以resetlogs方式打开数据库
SQL> alter database datafile '/u01/app/oradata/myorcl/sysaux01.dbf' offline drop; Database altered. SQL> alter database open resetlogs; Database altered. |
重启数据库
SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area281018368 bytes Fixed Size2020160 bytes Variable Size117443776 bytes Database Buffers155189248 bytes Redo Buffers6365184 bytes Database mounted. Database opened. SQL> select TABLESPACE_NAME,STATUS from DBA_TABLESPACES; TABLESPACE_NAMESTATUS ------------------------------ --------- SYSTEMONLINE UNDOTBS1ONLINE SYSAUXONLINE TEMPONLINE USERSONLINE EXAMPLEONLINE 6 rows selected. |
转载于:https://blog.51cto.com/dayong2015/1397289