ORA-16014/ORA-00257 archiver error Connect internal only

maohaiqing0304發表於2013-04-20
 

Flash Recovery Area空間不足導致資料庫不能開啟或hang住 

ORA-16014錯誤解決辦法

1.問題以及解決過程 
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> alter database open;
alter database open
*
 1 行出現錯誤 :
ORA-16014:
 日誌 2 的序列號 27 未歸檔, 沒有可用的目的地 
ORA-00312:
 聯機日誌 2 執行緒 1:
'D:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/REDO02.LOG'

SQL> show parameter db_recovery_file
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      D:/oracle/product/10.2.0/flash_recovery_area
db_recovery_file_dest_size        big integer 2G
SQL> alter system archive log current;
alter system archive log current
*
 1 行出現錯誤 :
ORA-01109:
 資料庫未開啟 

SQL> alter system switch logfile;
alter system switch logfile
*
 1 行出現錯誤 :
ORA-01109:
 資料庫未開啟 

SQL> shutdown immediate;
ORA-01109:
 資料庫未開啟 

已經解除安裝資料庫。 
ORACLE
 例程已經關閉。 
SQL> startup
ORACLE
 例程已經啟動。 
Total System Global Area  201326592 bytes
Fixed Size                  1248092 bytes
Variable Size              88081572 bytes
Database Buffers          109051904 bytes
Redo Buffers                2945024 bytes
資料庫裝載完畢。 
ORA-16038:
 日誌 2 序列號 27 無法歸檔 
ORA-19809:
 超出了恢復檔案數的限制 
ORA-00312:
 聯機日誌 2 執行緒 1:
'D:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/REDO02.LOG'

SQL> alter database open;
alter database open
*
 1 行出現錯誤 :
ORA-16014:
 日誌 2 的序列號 27 未歸檔, 沒有可用的目的地 
ORA-00312:
 聯機日誌 2 執行緒 1:
'D:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/REDO02.LOG'

SQL> show parameter db_recovery
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      D:/oracle/product/10.2.0/flash_recovery_area
db_recovery_file_dest_size           big integer 2G
SQL> alter system set db_recovery_file_dest_size=3G scope=both;
系統已更改。 
SQL> alter database open;
資料庫已更改。 
2.
反思: 
(1).
檢查 flash recovery area的使用情況: 
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE    PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE                   0                         0               0
ONLINELOG                     0                         0               0
ARCHIVELOG                 6.36                         0               4
BACKUPPIECE                 .22                         0               1
IMAGECOPY                 63.68                         0               5
FLASHBACKLOG                .51                       .25               2
已選擇 6行。 
SQL>
(2).
計算 flash recovery area已經佔用的空間: 
SQL> select sum(percent_space_used)*3/100 from v$flash_recovery_area_usage;
SUM(PERCENT_SPACE_USED)*3/100
-----------------------------
                       2.1231
可以看到,這裡已經有 2.1231G使用了,這說明我們剛開始設定的 db_recovery_file_dest_size=2G不足,導致online redo log 無法歸檔,在這裡,我們透過設定 db_recovery_file_dest_size引數,增大了flash recovery area來解決這個問題。  

注意:這裡的 *3 db_recovery_file_dest_size 的大小,要根據自己的引數進行調整!


(3).
也可以透過刪除 flash recovery area中不必要的備份來釋放flash recovery area空間來解決這個問題: 
      (1). delete obsolete;
      (2). crosscheck backupset;
             delete expired backupset;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28602568/viewspace-758927/,如需轉載,請註明出處,否則將追究法律責任。

相關文章