Oracle資料庫閃回區空間不足
問題現象:
巡檢發現Rman備份時提示閃回區空間不足,報錯ORA-19809。
在自動備份控制檔案和引數檔案時提示空間不足。
Starting Control File and SPFILE Autobackup at 02-SEP-22 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1 channel at 09/02/2022 02:01:49 ORA-19809: limit exceeded for recovery files ORA-19804: cannot reclaim 67108864 bytes disk space from 31457280000 bytes limit
問題分析:
檢查rman配置
當前確實開啟了自動備份功能(CONFIGURE CONTROLFILE AUTOBACKUP ON;)。
RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name CJC are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET; CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/cjc/backup/snapcf_BCP.f';
檢查閃回區大小
大小30000M。
SQL> show parameter recover NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /oracle/CJC/oraflash db_recovery_file_dest_size big integer 30000M db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 remote_recovery_file_dest string
檢查閃回區佔用資訊
都是BACKUP PIECE佔用的。
SQL> desc v$recovery_area_usage; Name Null? Type ----------------------------------------- -------- ---------------------------- FILE_TYPE VARCHAR2(23) PERCENT_SPACE_USED NUMBER PERCENT_SPACE_RECLAIMABLE NUMBER NUMBER_OF_FILES NUMBER CON_ID NUMBER
SQL> select * from v$recovery_area_usage; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID ----------------------- ------------------ ------------------------- --------------- ---------- CONTROL FILE 0 0 0 0 REDO LOG 0 0 0 0 ARCHIVED LOG 0 0 0 0 BACKUP PIECE 99.7 0 1148 0 IMAGE COPY 0 0 0 0 FLASHBACK LOG 0 0 0 0 FOREIGN ARCHIVED LOG 0 0 0 0 AUXILIARY DATAFILE COPY 0 0 0 0 8 rows selected.
檢查自動備份檔案資訊
CJC:orabcp 77> pwd /oracle/CJC/oraflash/CJC/autobackup CJC:orabcp 78> ls 2019_04_01 2019_05_28 2019_06_30 2019_08_02 ... 2022_09_02 CJC:orabcp 82> ll -rth total 88M -rw-r----- 1 oracle oinstall 29M Nov 18 2019 o1_mf_s_1024622869_gx30rotox_.bkp -rw-r----- 1 oracle oinstall 29M Nov 18 2019 o1_mf_s_1024622942_gx30typqx_.bkp -rw-r----- 1 oracle oinstall 29M Nov 18 2019 o1_mf_s_1024622995_gx30wn1kx_.bkp
檢查控制檔案大小
SQL> select name from v$controlfile; SQL> ho ls -lrth /oracle/CJC/data1/cntrl/cntrlCJC.dbf -rw-r----- 1 oracle oinstall 60M Sep 2 15:47 /oracle/CJC/data1/cntrl/cntrlCJC.dbf
檢查控制檔案記錄資訊
SQL> desc v$controlfile_record_section Name Null? Type ----------------------------------------- -------- ---------------------------- TYPE VARCHAR2(28) RECORD_SIZE NUMBER RECORDS_TOTAL NUMBER RECORDS_USED NUMBER FIRST_INDEX NUMBER LAST_INDEX NUMBER LAST_RECID NUMBER CON_ID NUMBER
SQL> set line 300 SQL> set pagesize 100 SQL> select * from v$controlfile_record_section order by RECORD_SIZE desc; TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX LAST_INDEX LAST_RECID CON_ID ---------------------------- ----------- ------------- ------------ ----------- ---------- ---------- ---------- CKPT PROGRESS 8180 53 0 0 0 0 0 RMAN CONFIGURATION 1108 50 2 0 0 2 0 PROXY COPY 928 1004 0 0 0 0 0 BACKUP PIECE 780 16096 12323 1 12323 12323 0 PDB RECORD 780 10 0 0 0 0 0 DATAFILE COPY 736 1000 30 1 30 30 0 FOREIGN ARCHIVED LOG 604 1002 0 0 0 0 0 ARCHIVED LOG 584 1008 1008 721 720 20880 0 AUXILIARY DATAFILE COPY 584 128 0 0 0 0 0 DATAFILE HISTORY 568 57 0 0 0 0 0 MULTI INSTANCE REDO APPLY 556 1 0 0 0 0 0 FILENAME 524 4815 31 0 0 0 0 DATAFILE 520 1000 18 0 0 2341 0 STANDBY DATABASE MATRIX 400 128 128 0 0 0 0 DATABASE 316 1 1 0 0 0 0 RESTORE POINT 256 2108 0 0 0 0 0 GUARANTEED RESTORE POINT 256 2048 0 0 0 0 0 REDO THREAD 256 50 1 0 0 0 0 OFFLINE RANGE 200 1063 0 0 0 0 0 BACKUP DATAFILE 200 34016 23701 1 23701 23701 0 RECOVERY DESTINATION 180 1 1 0 0 0 0 TABLESPACE 180 1000 12 0 0 12 0 PDBINC RECORD 144 113 0 0 0 0 0 BACKUP SPFILE 124 2096 1949 1 1949 1949 0 RMAN STATUS 116 564 564 512 511 13765 0 TABLESPACE KEY HISTORY 108 151 0 0 0 0 0 ACM OPERATION 104 64 10 0 0 0 0 MTTR 100 50 1 0 0 0 0 BACKUP SET 96 16352 12323 1 12323 12323 0 FLASHBACK LOG 84 2048 0 0 0 0 0 DATABASE BLOCK CORRUPTION 80 8384 0 0 0 0 0 THREAD INSTANCE NAME MAPPING 80 50 50 0 0 0 0 BACKUP REDOLOG 76 1290 1290 1256 1255 20605 0 REDO LOG 72 255 4 0 0 4 0 LOG HISTORY 56 1168 1168 71 70 21094 0 TEMPORARY FILENAME 56 1000 3 0 0 289 0 DATABASE INCARNATION 56 292 1 1 1 1 0 BACKUP CORRUPTION 44 1115 0 0 0 0 0 COPY CORRUPTION 40 1227 0 0 0 0 0 REMOVABLE RECOVERY FILES 32 1000 0 0 0 0 0 INSTANCE SPACE RESERVATION 28 1055 1 0 0 0 0 DELETED OBJECT 20 1636 1636 69 68 21336 0 42 rows selected.
檢查本地備份指令碼
已經存在控制檔案和引數檔案的備份了,不需要自動備份
...... rman target / log=/cjc/backup/rman_bcp_$today.log<< EOF crosscheck archivelog all; delete noprompt expired archivelog all; delete noprompt obsolete; backup as compressed backupset database format '/cjc/backup/cjc_db_bak_%T_%U.bak'; sql 'alter system archive log current'; backup as compressed backupset archivelog all format '/cjc/backup/cjc_arch_bak_%T_%U.bak' delete all input; backup spfile format '/cjc/backup/cjc_spfile_%U.bak'; backup current controlfile format '/cjc/backup/cjc_cont_bak_%T_%U.bak'; exit; ......
解決方案
建議取消控制檔案、引數檔案自動備份
RMAN> show all; CONFIGURE CONTROLFILE AUTOBACKUP OFF;
###chenjuchao 20230207###
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2934244/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 閃回區空間不足引發的SQL問題分析SQL
- oracle dg庫資料檔案空間不足Oracle
- Oracle資料庫的閃回恢復區Oracle資料庫
- Oracle資料庫閃回Oracle資料庫
- Oracle閃回資料庫Oracle資料庫
- Oracle閃回技術之閃回資料庫Oracle資料庫
- Oracle閃回技術 為Oracle閃回配置資料庫Oracle資料庫
- 閃回資料庫測試之一 :關閉閃回的表空間是否可以開啟資料庫
- Oracle 閃回技術 概覽 資料庫閃回功能Oracle資料庫
- Oracle 閃回資料庫測試Oracle資料庫
- 詳解oracle資料庫閃回Oracle資料庫
- 【備份恢復】閃回資料庫(三)基於時間戳閃回資料庫資料庫時間戳
- 閃回(關於閃回資料庫)資料庫
- Oracle 11g 閃回資料庫Oracle資料庫
- Oracle -- 閃回恢復區---實踐1---閃回庫Oracle
- 閃回資料庫資料庫
- 基於時間戳閃回資料庫時間戳資料庫
- ORACLE資料庫閃回步驟詳解Oracle資料庫
- oracle的空間資料庫:Oracle資料庫
- 清理oracle資料庫空間Oracle資料庫
- rac使用預設閃回區歸檔空間滿
- 資料庫的閃回資料庫
- 【備份恢復】閃回資料庫(一)閃回資料庫的管理資料庫
- 清空 oracle 閃回區Oracle
- 啟用Flashback Database閃回資料庫功能(閃回區滿解決辦法 )Database資料庫
- 閃回資料庫時間視窗(flashback database window)資料庫Database
- dbca靜默silent建立資料庫_空間不足出錯資料庫
- 【備份恢復】閃回資料庫(五)RMAN 命令列閃回資料庫資料庫命令列
- 【備份恢復】閃回資料庫(二) 基於 SCN 閃回資料庫資料庫
- 磁碟空間不足,線上移動Oracle的資料檔案Oracle
- Oracle資料庫管理 版主空間Oracle資料庫
- oracle清除資料庫表空間Oracle資料庫
- 閃回資料庫的事情資料庫
- Flashback Database 閃回資料庫Database資料庫
- 監視閃回資料庫資料庫
- 實驗-閃回資料庫資料庫
- Oracle閃回資料歸檔Oracle
- 清除閃回資料歸檔區資料