ORA-00265: 要求執行個體恢複, 無法設定 ARCHIVELOG 模式解決辦法,restorearchivelog

來源:互聯網
上載者:User

ORA-00265: 要求執行個體恢複, 無法設定 ARCHIVELOG 模式解決辦法,restorearchivelog
解決了這個問題,方法如下:
從 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 斷開

C:\Documents and Settings\yc>sqlplus sys/abcd as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 12月 3 22:56:52 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


串連到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
ORA-01109: 資料庫未開啟              /前面我已將資料庫關閉


已經卸載資料庫。
ORACLE 常式已經關閉。
SQL> startup mount                        /以mount方式啟動資料庫
ORACLE 常式已經啟動。

Total System Global Area  167772160 bytes
Fixed Size                  1247876 bytes
Variable Size              83887484 bytes
Database Buffers           75497472 bytes
Redo Buffers                7139328 bytes
資料庫裝載完畢。
SQL> alter database archivelog;
alter database archivelog
*
第 1 行出現錯誤:
ORA-00265: 要求執行個體恢複, 無法設定 ARCHIVELOG 模式    /和你報了同樣的錯誤


SQL> alter system switch logfile;
alter system switch logfile                       /通過該命令強制日誌切換,因資料庫沒有開啟,他報了錯
*
第 1 行出現錯誤:
ORA-01109: 資料庫未開啟


SQL> alter database open;

資料庫已更改。                          /資料庫將沒有開啟,我讓資料庫開啟

SQL> alter system switch logfile;

系統已更改。                                    /通過該命令強制日誌切換


SQL> shutdown immediate
資料庫已經關閉。
已經卸載資料庫。                                 /再關掉資料庫
ORACLE 常式已經關閉。
SQL> startup mount                                              
ORACLE 常式已經啟動。                             /再以mount方式啟動資料庫

Total System Global Area  167772160 bytes
Fixed Size                  1247876 bytes
Variable Size              83887484 bytes
Database Buffers           75497472 bytes
Redo Buffers                7139328 bytes
資料庫裝載完畢。
SQL> alter database archivelog;                         /修改歸檔模式為archivelog
    
資料庫已更改。                                        /哈哈,成功了。

SQL> select recid,stamp from v$archived_log;

     RECID      STAMP
---------- ----------
         1  634384622
         2  634386018
         3  634386215
         4  634386437
         5  634387218
         6  634402892
         7  634465470
         8  634488731
         9  634550076
        10  634575678
        11  634637644

     RECID      STAMP
---------- ----------
        12  635413954
        13  635436756
        14  635500984
        15  635535929
        16  635590620
        17  635619227
        18  635633070
        19  635675979
        20  635697830
        21  635761549
        22  635781236

     RECID      STAMP
---------- ----------
        23  635850922
        24  635887029
        25  635958660
        26  637320679
        27  637323796
        28  637338885
        29  637402275
        30  637495528
        31  637575555
        32  637577252
        33  637580252

     RECID      STAMP
---------- ----------
        34  637580996
        35  637599701
        36  637664527
        37  637670690
        38  637671651
        39  637689198
        40  637750905
        41  637791070
        42  637837603
        43  637921704
        44  637947144

     RECID      STAMP
---------- ----------
        45  638009274
        46  638050399
        47  638095123
        48  638122233
        49  638184343
        50  638264391
        51  638294712
        52  638375998
        53  638439881
        54  638463028
        55  638881506

     RECID      STAMP
---------- ----------
        56  638888860
        57  638992887
        58  639044570
        59  639074298
        60  639074625
        61  639134252
        62  639218803
        63  639312049
        64  639393897
        65  639589385
        66  639650529

     RECID      STAMP
---------- ----------
        67  639699249
        68  639720021
        69  639738078
        70  639917004

已選擇70行。/看日誌是不是增加了                        
       
SQL> alter database open;

資料庫已更改。

SQL> archive log list;
資料庫記錄模式            存檔模式
自動封存             啟用
存檔終點            USE_DB_RECOVERY_FILE_DEST
最早的聯機日誌序列     102
下一個存檔日誌序列   104
當前日誌序列           104


怎更改Oracle資料庫為歸檔方式

我猜測你之前DOWN庫的時候是SHUTDOWN ABORT方式吧。資料庫不一致的時候是沒法切換模式的。
切換歸檔、非歸檔方式之前的DOWN一定要正常SHUTDOWN,比如SHUTDOWN IMMEDIATE。
 
oracle 設定 歸檔模式

1. ORA-32004錯誤:這個錯誤是因為你的參數檔案中有到期參數。查看警告檔案看哪些參數到期,然後alter system reset xxx scope = spfile sid = 'xxxx'。警告檔案的位置查看background_dump_dest參數得知。 2.ORA-00265錯誤:原因:因為上一次的資料庫關閉用的abort選項,用abort選項關閉資料庫是個非常不好的習慣,這個選項能不用就不用,因為用abort選項關閉的話,下一次啟動時必然需要執行個體恢複(在執行個體恢複期間你什麼都做不了,只能坐等)。一般直接用immediate關閉完全可以,放心,用immediate不會遺失資料的。 解決方案:按以下步驟操作:1.用shutdown immediate關閉資料庫。2.startup mount;3.alter database archivelog;4.alter database open;
 

相關文章

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.