使用舊的控制檔案恢複

來源:互聯網
上載者:User

備份控制檔案

alter database backup controlfileto '/bk/ctl.bk'; 

SQL> alter system switch logfile;

alter system switch logfile

*

ERROR at line 1:

ORA-03113: end-of-file on communication channel 

SQL> conn /as sysdba

Connected to an idle instance.

SQL> startup

Oracle instance started.

 

Total System Global Area  314572800 bytes

Fixed Size                  1219136 bytes

Variable Size             100664768 bytes

Database Buffers          205520896 bytes

Redo Buffers               7168000 bytes

ORA-00205: error in identifying control file, checkalert log for more info 

SQL> ! /bk/ctl.bk/u01/tiger/oradata/orcl2/control02.ctl

/bin/bash: /bk/ctl.bk: ???? 

SQL> ! cp /bk/ctl.bk/u01/tiger/oradata/orcl2/control02.ctl 

SQL> ! cp /bk/ctl.bk/u01/tiger/oradata/orcl2/control03.ctl 

SQL> ! cp /bk/ctl.bk/u01/tiger/oradata/orcl2/control01.ctl 

SQL> alter database mount;

Database altered. 

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01589: must use RESETLOGS or NORESETLOGS option fordatabase open

在做resetlogs啟資料庫也會因為資料檔案內部一致而中止,需要恢複 

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-01194: file 1 needs more recovery to beconsistent

ORA-01110: data file 1: '/u01/tiger/oradata/orcl2/system01.dbf' 

SQL> recover database;

ORA-00283: recovery session canceled due to errors

ORA-01610: recovery using the BACKUP CONTROLFILE option mustbe done

資料庫檢測控制檔案和資料檔案的SCN的對比,發現控制檔案是老的 

SQL> recover database using backupcontrolfile;

ORA-00279: change 458762 generated at 09/03/201214:28:45 needed for thread 1

ORA-00289: suggestion :/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_2_%u_.arc

ORA-00280: change 458762 for thread 1 is insequence #2 

Specify log: {<RET>=suggested | filename |AUTO | CANCEL}

auto

ORA-00279: change 458780 generated at 09/03/201214:50:27 needed for thread 1

ORA-00289: suggestion :/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_3_%u_.arc

ORA-00280: change 458780 for thread 1 is insequence #3

ORA-00278: log file'/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_2_848nst62_.arc'no longer

needed for this recovery 

ORA-00279: change 458785 generated at 09/03/201214:50:35 needed for thread 1

ORA-00289: suggestion : /u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_4_%u_.arc

ORA-00280: change 458785 for thread 1 is insequence #4

ORA-00278: log file'/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_3_848nsvk0_.arc'no longer

needed for this recovery 

ORA-00279: change 458791 generated at 09/03/201214:50:42 needed for thread 1

ORA-00289: suggestion :/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_5_%u_.arc

ORA-00280: change 458791 for thread 1 is insequence #5

ORA-00278: log file'/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_4_848nt295_.arc'no longer

needed for this recovery 

ORA-00308: cannot open archived log'/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_5_%u_.arc'

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

這個檔案還沒歸檔因為是current組還沒來得及切換日誌(切換日誌才能歸檔) 提供redo給它一組組嘗試

SQL> recover database using backupcontrolfile;

ORA-00279: change 458791 generated at 09/03/201214:50:42 needed for thread 1

ORA-00289: suggestion : /u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_03/o1_mf_1_5_%u_.arc

ORA-00280: change 458791 for thread 1 is insequence #5 

Specify log: {<RET>=suggested | filename |AUTO | CANCEL}

/u01/tiger/oradata/orcl2/redo01.log

Log applied.

Media recovery complete.

SQL> alter database openresetlogs; 

Database altered. 

SQL>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.