第一步:全備datafile,controlfile,spfile/pfile
創(chuàng)新互聯(lián)堅持“要么做到,要么別承諾”的工作理念,服務領域包括:網(wǎng)站設計、成都網(wǎng)站制作、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣等服務,滿足客戶于互聯(lián)網(wǎng)時代的丹徒網(wǎng)站設計、移動媒體設計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡建設合作伙伴!
第二步:恢復日志。(原冷備的日志沒有用,千萬不要用?。?/p>
SQL> select member from v$logfile; /ora/app/oracle/oradata/orcl/redo03.log /ora/app/oracle/oradata/orcl/redo02.log /ora/app/oracle/oradata/orcl/redo01.log SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 10 Current log sequence 12 SQL> ho rm $ORACLE_BASE/oradata/orcl/redo*.log --模擬日志文件丟失。 SQL> ho ls $ORACLE_BASE/oradata/orcl/redo*.log ls: cannot access /ora/app/oracle/oradata/orcl/redo*.log: No such file or directory SQL> startup force ORACLE instance started. Total System Global Area 1536602112 bytes Fixed Size 2213616 bytes Variable Size 956303632 bytes Database Buffers 570425344 bytes Redo Buffers 7659520 bytes Database mounted. ORA-00313: open failed for members of log group 3 of thread 1 ORA-00312: online log 3 thread 1: '/ora/app/oracle/oradata/orcl/redo03.log' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 SQL> alter database open resetlogs; --第一步 alter database open resetlogs * ERROR at line 1: ORA-01139: RESETLOGS option only valid after an incomplete database recovery SQL> recover database using backup controlfile; --第二步 ORA-00279: change 1384991 generated at 05/22/2016 20:05:08 needed for thread 1 ORA-00289: suggestion : /ora/app/oracle/flash_recovery_area/ORCL/archivelog/2016_05_22/o1_mf_1_12_%u_.arc ORA-00280: change 1384991 for thread 1 is in sequence #12 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} --注意:非歸檔,什么也不做,直接回車。 ORA-00308: cannot open archived log '/ora/app/oracle/flash_recovery_area/ORCL/archivelog/2016_05_22/o1_mf_1_12_%u_.arc' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 SQL> alter database open resetlogs; --第三步 alter database open resetlogs * ERROR at line 1: ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '/ora/app/oracle/oradata/orcl/system01.dbf' SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile; System altered. --第四步,使用隱藏參數(shù),不做一致性檢查啟動數(shù)據(jù)庫。 SQL> startup force mount; --第五步,重啟到MOUNT狀態(tài)下。 ORACLE instance started. Total System Global Area 1536602112 bytes Fixed Size 2213616 bytes Variable Size 956303632 bytes Database Buffers 570425344 bytes Redo Buffers 7659520 bytes Database mounted. SQL> alter database open; --第六步 alter database open * ERROR at line 1: ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SQL> alter database open resetlogs; --第七步,一般情況下會正?;謴?。 ERROR: ORA-03114: not connected to ORACLE alter database open resetlogs * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00600: internal error code, arguments: [2662], [0], [1384999], [0], [1385016], [4194432], [], [], [], [], [], [] Process ID: 28621 Session ID: 125 Serial number: 5 --由于隱藏參數(shù)導致的600錯誤。 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@test ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Sun May 22 22:56:21 2016 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to an idle instance. SQL> select status from v$instance; --檢查狀態(tài),數(shù)據(jù)庫關閉了。 select status from v$instance * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 SQL> startup mount; --再次啟動 ORACLE instance started. Total System Global Area 1536602112 bytes Fixed Size 2213616 bytes Variable Size 956303632 bytes Database Buffers 570425344 bytes Redo Buffers 7659520 bytes Database mounted. SQL> alter database open; Database altered. --啟動成功。 SQL> ho ls $ORACLE_BASE/oradata/orcl/red* --日志文件自動生成 /ora/app/oracle/oradata/orcl/redo01.log /ora/app/oracle/oradata/orcl/redo02.log /ora/app/oracle/oradata/orcl/redo03.log SQL> alter system reset "_allow_resetlogs_corruption" scope=spfile sid='*'; System altered. --第八步,還原隱藏參數(shù)值。 SQL> startup force --第九步,重啟數(shù)據(jù)庫,使參數(shù)生效。
文章標題:ORACLE非歸檔模式下REDO日志丟失修復
分享地址:http://aaarwkj.com/article22/psohcc.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站制作、企業(yè)網(wǎng)站制作、定制開發(fā)、搜索引擎優(yōu)化、網(wǎng)站內鏈、企業(yè)建站
聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)