1.AMAÇ VE KAPSAM
Oracle 11.2.0.3 versionunda bulunan FRA dolunca archiveloglarin silinmesini engelleyen bug’in cozumunu anlatacagim.
2.UYGULAMA
2.1. Normalde FRA dolma seviyesine gelip yere ihtiyac duydugunda veritabani archiveloglari inceleyip gereksiz gordugu archiveloglari silmeye baslar. 11.2.0.3 de bulunan bir bug’tan oturu veritabani hangi loglari silebileceginin analizini yapmamakta bunu yaptirmak icin duzenli olarak bir dbms package calistirip viewu refresh etmemiz gerekiyor.
PUBLIC@CROORAFLP01:APMTMART_SBY: >SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES -------------------- ------------------ ------------------------- --------------- CONTROL FILE 0 0 0 REDO LOG 27 0 9 ARCHIVED LOG 68.89 0 35 BACKUP PIECE .09 0 1 IMAGE COPY 0 0 0 FLASHBACK LOG 0 0 0 FOREIGN ARCHIVED LOG 0 0 0 7 rows selected.
2.2. Bu query’i standby databasimde calistirdim, calistirdigim sirada standby yeni archivelog beklemekteydi yani mevcut olan archiveloglarin hepsi silinebilir durumdaydi. Eger veritabani duzgun calissaydi ARCHIVED LOG satirinda PERCENT_SPACE_RECLAIMABLE kolonu 0 yerine 68.89 gostermesi gerekirdi. Daha onceden bahsetmis oldugum dbms_backup_restore.refreshagedfiles package’ini calistirip view’u manuel refresh yapacagim.
PUBLIC@CROORAFLP01:APMTMART_SBY: >exec dbms_backup_restore.refreshagedfiles ; PL/SQL procedure successfully completed.
2.3. Simdi select query’imizi tekrardan calistiralim.
PUBLIC@CROORAFLP01:APMTMART_SBY: >SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES -------------------- ------------------ ------------------------- --------------- CONTROL FILE 0 0 0 REDO LOG 27 0 9 ARCHIVED LOG 68.92 68.92 40 BACKUP PIECE .09 0 1 IMAGE COPY 0 0 0 FLASHBACK LOG 0 0 0 FOREIGN ARCHIVED LOG 0 0 0 7 rows selected.
2.4. View’u refresh yapmadan once FRA da alan sikintisi yasamaktaydim, simdi tekrardan alert log u kontrol edelim.
Deleted Oracle managed file /oradata/APMTMART/fast_recovery_area/APMTMART_SBY/archivelog/2013_04_23/o1_mf_1_744_8qft2zkl_.arc RFS[2]: Selected log 11 for thread 1 sequence 785 dbid -1961087772 branch 799952871 Archived Log entry 761 added for thread 1 sequence 784 ID 0x8b1d6fb5 dest 1: Deleted Oracle managed file /oradata/APMTMART/fast_recovery_area/APMTMART_SBY/archivelog/2013_04_24/o1_mf_1_745_8qgffjbw_.arc
2.5. Alert logda gereksiz gorulen archiveloglarin silinmeye baslamis oldugunu goruyoruz, dbms_backup_restore.refreshagedfiles
package’ini crontab a veya db job olarak schedule edip bu sorunu asabilirsiniz.
Bir Cevap Yazın