ORA-00257: archiver error. Connect internal only. until freed,ora-00257freed
1,plsq登入報錯
ORA-00257: archiver error. Connect internalonly. until freed
2,後台alert日誌報錯:
[oracle@powerlong4 ~]$ tail -fn 200/oracle/app/oracle/diag/rdbms/pdunq/powerdes/trace/alert_powerdes.log
Tue Apr 28 10:00:56 2015
Errors in file/oracle/app/oracle/diag/rdbms/pdunq/powerdes/trace/powerdes_arc9_30051.trc:
ORA-19815: WARNING:db_recovery_file_dest_size of 19327352832 bytes is 100.00% used, and has 0remaining bytes available.
************************************************************************
You have following choices to free up spacefrom recovery area:
1. Consider changing RMAN RETENTION POLICY.If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such astape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increasedb_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMANDELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
************************************************************************
Errors in file/oracle/app/oracle/diag/rdbms/pdunq/powerdes/trace/powerdes_arc9_30051.trc:
ORA-19809: limit exceeded for recoveryfiles
ORA-19804: cannot reclaim 31602688 bytesdisk space from 19327352832 limit
ARC9: Error 19809 Creating archive log fileto'/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_28/o1_mf_1_75_%u_.arc'
----------------------------------------------------------------------------------------------------------------
<著作權,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!>
原部落格地址: http://blog.csdn.net/mchdba/article/details/45332505
原作者:黃杉 (mchdba)
----------------------------------------------------------------------------------------------------------------
3,查看歸檔日誌
RMAN> crosscheck archivelog all; --先檢查下
...
validation succeeded for archived log
archived log filename=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_72_bmkbwfrg_.arcRECID=63633 STAMP=877796493
validation succeeded for archived log
archived log filename=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_73_bmkyqplx_.arcRECID=63634 STAMP=877816822
validation succeeded for archived log
archived log file name=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_74_bmkysysc_.arcRECID=63635 STAMP=877816895
Crosschecked 1635 objects
看到有很多歸檔日誌,麼有應用到sendary庫上面。
4,這裡採用刪除多餘的歸檔日誌的辦法來操作,查看到期歸檔日誌
[oracle@powerlong4 ~]$ rman target /
RMAN> delete expired archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=787 devicetype=DISK
specification does not match any archivedlog in the repository
RMAN>
5,刪除到期的歸檔日誌
delete expired archivelog all;
RMAN> delete expired archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=787 devicetype=DISK
specification does not match any archivedlog in the repository
RMAN>
看到沒有到期的歸檔日誌
6,看到沒有到期的,不夠我們可以刪除指定到具體的時間,這樣也可以騰出空間來
RMAN>delete archivelog until time"to_date('2015-04-27 13:00:00','yyyy-mm-dd hh24:mi:ss')";
部分執行過程如下:
RMAN-08137: WARNING: archived log notdeleted, needed for standby or upstream capture process
archived log filename=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_70_bmjfsm48_.arcthread=1 sequence=70
RMAN-08137: WARNING: archived log notdeleted, needed for standby or upstream capture process
archived log filename=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_71_bmjk1mvp_.arcthread=1 sequence=71
RMAN-08137: WARNING: archived log notdeleted, needed for standby or upstream capture process
archived log filename=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_72_bmkbwfrg_.arcthread=1 sequence=72
RMAN-08137: WARNING: archived log notdeleted, needed for standby or upstream capture process
archived log filename=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_73_bmkyqplx_.arcthread=1 sequence=73
RMAN-08137: WARNING: archived log notdeleted, needed for standby or upstream capture process
archived log filename=/oracle/app/oracle/flash_recovery_area/PDUNQ/archivelog/2015_04_23/o1_mf_1_74_bmkysysc_.arcthread=1 sequence=74
RMAN>
select * from V$FLASH_RECOVERY_AREA_USAGE;
7,再去查看下使用空間
SQL> select * fromV$FLASH_RECOVERY_AREA_USAGE;
FILE_TYPE PERCENT_SPACE_USEDPERCENT_SPACE_RECLAIMABLE
-------------------- -------------------------------------------
NUMBER_OF_FILES
---------------
CONTROL FILE 0 0
0
REDO LOG 0 0
0
ARCHIVED LOG 74.36 0
1635
FILE_TYPE PERCENT_SPACE_USEDPERCENT_SPACE_RECLAIMABLE
-------------------- -------------------------------------------
NUMBER_OF_FILES
---------------
BACKUP PIECE 25.5 0
7
IMAGE COPY 0 0
0
FLASHBACK LOG 0 0
0
FILE_TYPE PERCENT_SPACE_USEDPERCENT_SPACE_RECLAIMABLE
-------------------- -------------------------------------------
NUMBER_OF_FILES
---------------
FOREIGN ARCHIVED LOG 0 0
0
7 rows selected.
SQL>
OK,看到歸檔日誌空間使用74%,還有足夠的空間,所以可以登入使用。
重新登入plsql,還是報一樣的錯誤。
8,重新啟動oracle服務,這樣就可以了
SQL> shutdown abort
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.
Total System Global Area 3373858816 bytes
Fixed Size 2218032 bytes
Variable Size 1694500816 bytes
Database Buffers 1660944384 bytes
Redo Buffers 16195584 bytes
Database mounted.
Database opened.
SQL>
9,然後使用plsql登入,現在可以正常登入了。
總結,是因為oracle的dataguard中斷了,所以primary上的歸檔日誌一直積累下來,造成歸檔的空間滿了,所以資料庫無法遠程登入了,這個時候採用的常用辦法可以有以下2個:1):根據時間點刪除到期的歸檔日誌;2)增大db_recovery_file_dest_size的值。