Bug 5483067: UNSHIPPED LOGS DELETED DELETION POLICY TO APPLIED

yyp2009發表於2014-05-08

rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue May 6 23:34:30 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ASM11G (DBID=99090287)
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored
RMAN-08591: WARNING: invalid archived log deletion policy
 這裡我們將db_recovery_file_dest_size增加後,再觀察一下
sql> alter system set db_recovery_file_dest_size=4G;
System altered.
sql> @recovery_file_dest.sql
"RECOVERY FILE DEST AND SIZE"
NAME                           QUOTA                USED                  USED% RECLAIMABLE               FILES
------------------------------ -------------------- -------------------- ------ -------------------- ----------
+ARCH_P                        4096M                3407M                    83 0M                          182
FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE     number
-------------------- ------------------ ------------------------- ----------
CONTROL FILE                        .29                         0          1
REDO LOG                           8.72                         0          7
ARCHIVED LOG                      67.92                         0        169
BACKUP PIECE                          0                         0          0
IMAGE COPY                            0                         0          0
FLASHBACK LOG                      6.23                         0          5
FOREIGN ARCHIVED LOG                  0                         0          0
看到日誌使用已經達到83%,但是還是不見自動刪除的操作,看到rman歸檔的自動刪除歸檔日誌,沒有生效
Tue May 06 23:44:15 2014
LNS: Standby redo logfile selected for thread 1 sequence 77 for destination LOG_ARCHIVE_DEST_2
Tue May 06 23:44:32 2014
Archived Log entry 245 added for thread 1 sequence 76 ID 0x5fdc3cf dest 1:
Tue May 06 23:44:42 2014
Thread 1 advanced to log sequence 78 (LGWR switch)
  Current log# 3 seq# 78 mem# 0: +DATA_P/asm11gp/onlinelog/group_3.290.841532845
  Current log# 3 seq# 78 mem# 1: +ARCH_P/asm11gp/onlinelog/group_3.619.841532847
Tue May 06 23:44:48 2014
LNS: Standby redo logfile selected for thread 1 sequence 78 for destination LOG_ARCHIVE_DEST_2
Tue May 06 23:45:02 2014
Archived Log entry 247 added for thread 1 sequence 77 ID 0x5fdc3cf dest 1:
Tue May 06 23:45:11 2014
Thread 1 advanced to log sequence 79 (LGWR switch)
  Current log# 1 seq# 79 mem# 0: +DATA_P/asm11gp/onlinelog/group_1.288.841532839
  Current log# 1 seq# 79 mem# 1: +ARCH_P/asm11gp/onlinelog/group_1.621.841532841
Tue May 06 23:45:19 2014
LNS: Standby redo logfile selected for thread 1 sequence 79 for destination LOG_ARCHIVE_DEST_2
Tue May 06 23:45:29 2014
Archived Log entry 249 added for thread 1 sequence 78 ID 0x5fdc3cf dest 1:
重啟資料庫
sql> alter system set event='19823 trace name context forever,level 50' scope=spfile;
System altered.
sql> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
sql> startup
ORACLE instance started.
Total System Global Area  283930624 bytes
Fixed Size                  2227664 bytes
Variable Size             167772720 bytes
Database Buffers          109051904 bytes
Redo Buffers                4878336 bytes
Database mounted.
Database opened.
見次跑指令碼,仍不見自動刪除
再次修改引數,重啟資料庫
sql> alter system set "_log_deletion_policy"=ALL scope=spfile;
System altered.
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored
RMAN-08591: WARNING: invalid archived log deletion policy
sql> startup force;
ORACLE instance started.
Total System Global Area  283930624 bytes
Fixed Size                  2227664 bytes
Variable Size             167772720 bytes
Database Buffers          109051904 bytes
Redo Buffers                4878336 bytes
Database mounted.
sDatabase opened.
Starting background process CJQ0
Tue May 06 23:50:34 2014
CJQ0 started with pid=44, OS id=5037
Tue May 06 23:50:38 2014
db_recovery_file_dest_size of 4096 MB is 19.73% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
這裡突然發現db_recovery_file_dest_size使用只有19.73了,不知道什麼時候刪除了??
*********************************************************************************
Applies to:
 Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.3 [Release 11.1 to 11.2]
 Information in this document applies to any platform.
 ***Checked for relevance on 22-May-2013***
Symptoms
RMAN is set as follows:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
Some RMAN commands return this error:
RMAN-08591: WARNING: invalid archived log deletion policy
RMAN may be deleting archivelog files from the primary database before they're transported/applied on the standby (Data Guard) database.
Cause
Unpublised bug  Bug 5483067: UNSHIPPED LOGS DELETED WHEN CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED
Solution
Unpublished bug 5483067 is fixed in 12.1.
Workaround:  set the RMAN persistent configuration parameter as follows:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
*********************************************************************************
alert.log中無任何delete的日誌
sql> @recovery_file_dest.sql
"RECOVERY FILE DEST AND SIZE"
NAME                           QUOTA                USED                  USED% RECLAIMABLE               FILES
------------------------------ -------------------- -------------------- ------ -------------------- ----------
+ARCH_P                        4096M                3714M                    91 2906M                       191
FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE     number
-------------------- ------------------ ------------------------- ----------
CONTROL FILE                        .29                         0          1
REDO LOG                           8.72                         0          7
ARCHIVED LOG                      72.92                     70.95        176
BACKUP PIECE                          0                         0          0
IMAGE COPY                            0                         0          0
FLASHBACK LOG                      8.72                         0          7
FOREIGN ARCHIVED LOG                  0                         0          0
 


cat recovery_file_dest.sql
 set echo off
 set lines 300
 set pages 40
 col reclaimable for a20
 COL used for a20
 COL QUOTA FOR A20
 COL NAME FOR A30
 col used1 for 99999 heading 'USED%';
 prompt "RECOVERY FILE DEST AND SIZE"
 SELECT substr(name, 1, 30) name, round(space_limit/1024/1024)||'M' AS quota,
        round(space_used/1024/1024)||'M'        AS used,round(100*space_used/space_limit) used1,
        round(space_reclaimable/1024/1024)||'M' AS reclaimable,
         number_of_files   AS files
   FROM  v$recovery_file_dest
   /
  

--查詢指定的隱含引數

set linesize 140
col name for a30
col value for a70

select x.ksppinm name,y.ksppstvl value,y.ksppstdf isdefault,decode(bitand(y.ksppstvf,7),1,'Modofied',4,'System_Mode','False') ismod,
decode(bitand(y.ksppstvf,2),2,'True','False') isadj
from sys.x$ksppi x,sys.x$ksppcv y
where x.inst_id=userenv('Instance') and
y.inst_id=userenv('Instance') and
x.indx=y.indx and x.ksppinm like '%&par%'
order by translate(x.ksppinm,'_',' ');

  

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

相關文章