Oracle 資料庫閃回功能設定出現ORA-19809和ORA-19804錯誤

來源:互聯網
上載者:User

--alert.log出現很多如下警告日誌:

Errors in file /u01/app/Oracle/admin/ESUITE/bdump/esuite_rvwr_23296.trc:
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 18055168 bytes disk space from 85899345920 limit

--查看dba_outstanding_alerts視圖(oracle10g新增的):

SQL> col REASON format a40
col OBJECT_TYPE format a20
col CREATION_TIME format a35
col TIME_SUGGESTED format a35
col SUGGESTED_ACTION format a75
SQL> select object_type,message_type,reason,creation_time,time_suggested,suggested_action from dba_outstanding_alerts;
OBJECT_TYPE          MESSAGE_TYPE REASON                                   CREATION_TIME                       TIME_SUGGESTED                      SUGGESTED_ACTION
-------------------- ------------ ---------------------------------------- ----------------------------------- ----------------------------------- ---------------------------------------------------------------------------
RECOVERY AREA        Warning      db_recovery_file_dest_size of 8589934592 14-AUG-09 12.50.24.570360 PM +08:00 23-AUG-09 07.20.43.396224 AM +08:00 You have following choices to free up space from flash recovery area:
0 bytes is 97.01% used and has 257187020                                                                         1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
8 remaining bytes available.                                                                                        then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.

--查看v$flash_recovery_area_usage視圖, 看看閃回區是存放了哪些檔案, 以下輸出說明資料庫檔案未存放在閃回區,
--僅僅存放FLASHBACKLOG用於閃回資料庫用. v$database.flashback_on='ON'表明資料庫開通了閃回功能.

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                    0                         0               0
BACKUPPIECE                   0                         0               0
IMAGECOPY                     0                         0               0
FLASHBACKLOG              99.96                     74.12            1009

6 rows selected.

SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES

--查看閃回區相關設定, db_flashback_retention_target=1440(單位是分鐘)表明可閃回1天的資料庫資料.

SQL> show parameter db_recovery
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u04/flash_recovery_area
db_recovery_file_dest_size           big integer 80G
SQL> show parameter flash
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target        integer     1440

--flashback聽上去很美其實是塊雞肋. 其實單獨閃回資料庫沒多大作用, 我們把閃回功能取消,
--資料庫需在mount狀態才能啟停閃回功能

SQL> shutdown immediate;
SQL> startup mount;
SQL> ALTER DATABASE FLASHBACK off;
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> ALTER DATABASE open;

--如果真要有閃回功能, 可以考慮在dataguard備庫上開通, 生產庫上就不用開了.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.