Wednesday, June 6, 2018

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

In processof the backup archived log to ZDLRA we got a message:
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process


The backup of datafiles is run successfully, but archived logs got a stuck:


Starting backup at 2018-JUN-06 17:28:14
current log archived
channel ch01: starting archived log backup set
channel ch01: specifying archived log(s) in backup set
input archived log thread=1 sequence=850 RECID=791 STAMP=978108063
input archived log thread=1 sequence=851 RECID=792 STAMP=978108142
input archived log thread=1 sequence=852 RECID=793 STAMP=978108145
input archived log thread=1 sequence=853 RECID=794 STAMP=978109461
channel ch01: starting piece 1 at 2018-JUN-06 17:28:17
channel ch01: finished piece 1 at 2018-JUN-06 17:28:24
piece handle=4136710722_20180606_1_13t4pidh_1 tag=A_FD comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:07
channel ch01: deleting archived log(s)
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_850_fkhs3gvz_.arc thread=1 sequence=850
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_851_fkhs5y1c_.arc thread=1 sequence=851
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_852_fkhs61cw_.arc thread=1 sequence=852
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_853_fkhth5dm_.arc thread=1 sequence=853
Finished backup at 2018-JUN-06 17:28:25


The workaround is:

SQL> alter system set log_archive_dest_state_3='DEFER' scope=both sid='*';

System altered.

And you'll have:

Starting backup at 2018-JUN-06 17:34:26
current log archived
channel ch01: starting archived log backup set
channel ch01: specifying archived log(s) in backup set
input archived log thread=1 sequence=850 RECID=791 STAMP=978108063
input archived log thread=1 sequence=851 RECID=792 STAMP=978108142
input archived log thread=1 sequence=852 RECID=793 STAMP=978108145
input archived log thread=1 sequence=853 RECID=794 STAMP=978109461
channel ch01: starting piece 1 at 2018-JUN-06 17:34:28
channel ch01: finished piece 1 at 2018-JUN-06 17:34:35
piece handle=4136710722_20180606_1_17t4pip4_1 tag=A_FD comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:07
channel ch01: deleting archived log(s)
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_850_fkhs3gvz_.arc RECID=791 STAMP=978108063
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_851_fkhs5y1c_.arc RECID=792 STAMP=978108142
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_852_fkhs61cw_.arc RECID=793 STAMP=978108145
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_853_fkhth5dm_.arc RECID=794 STAMP=978109461
Finished backup at 2018-JUN-06 17:34:36



But if you return your setting back:

SQL> alter system set log_archive_dest_state_3='enable' scope=both sid='*';

System altered.

The problem appears:

Starting backup at 2018-JUN-06 17:35:41
current log archived
channel ch01: starting archived log backup set
channel ch01: specifying archived log(s) in backup set
input archived log thread=1 sequence=860 RECID=801 STAMP=978111311
input archived log thread=1 sequence=861 RECID=802 STAMP=978111341
channel ch01: starting piece 1 at 2018-JUN-06 17:35:42
channel ch01: finished piece 1 at 2018-JUN-06 17:35:43
piece handle=4136710722_20180606_1_1bt4pire_1 tag=A_FD comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:01
channel ch01: deleting archived log(s)
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_860_fkhw8zos_.arc thread=1 sequence=860
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/oradata/fra/O11203/archivelog/2018_06_06/o1_mf_1_861_fkhw9xjo_.arc thread=1 sequence=861
Finished backup at 2018-JUN-06 17:35:44


Monday, June 4, 2018

ORA-45161: The backup piece size cannot exceed database DISK_RESERVED_SPACE

The database size is 30g and it was created  with 10g reserved space in RA:

SQL> conn rasys/welcome1
SQL> exec dbms_ra.add_db(db_unique_name=>'o11203',protection_policy_name =>'gold', reserved_space=>'10g');
SQL> exec dbms_ra.grant_db_access (db_unique_name=>'o11203',username => 'FD');




 

Documentation says about reserved_space: "Theamount of disk space that is guaranteed to be available for the protected database." 
As i understand it is minimum space quota guaranteed to the database.
So, the database IS ALLOWED to use more space !

But in real life well running backup may stumble on this threshold.
Demo:


[oracle@el01ac03-db01 rman_scripts]$ rman target / catalog FD/welcome1@zdlra | tee backup-FD-06041801.log

Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jun 4 18:11:43 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: O11203 (DBID=4136710722)
connected to recovery catalog database

RMAN> @backup.rman

RMAN> # rman target / catalog o11203/welcome1@zdlra | tee backup.log
2>
3> RUN
4> {
5> ALLOCATE CHANNEL ch01 DEVICE TYPE sbt_tape
6> PARMS='SBT_LIBRARY=/u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libra.so,
7> ENV=(RA_WALLET=LOCATION=file:/u01/app/oracle/product/11.2.0.3/dbhome_1/dbs/zdlra CREDENTIAL_ALIAS=z01ingest-scan.distr.fors.ru:1521/zdlra)'
8> FORMAT '%U_%d';
9>
10> backup incremental level 1 database tag 'B-FD-06041801'
11> plus archivelog tag 'A-FD-06041801' delete all input;
12>
13> }
starting full resync of recovery catalog
full resync complete
allocated channel: ch01
channel ch01: SID=17 device type=SBT_TAPE
channel ch01: RA Library (ZDLRA) SID=6DD35AACCF834020E05375051FACCC5E


Starting backup at 2018-JUN-04 18:11:55
current log archived
channel ch01: starting archived log backup set
channel ch01: specifying archived log(s) in backup set
input archived log thread=1 sequence=688 RECID=629 STAMP=977940207
input archived log thread=1 sequence=689 RECID=630 STAMP=977940443
input archived log thread=1 sequence=690 RECID=631 STAMP=977940447
input archived log thread=1 sequence=691 RECID=632 STAMP=977940507
input archived log thread=1 sequence=692 RECID=633 STAMP=977940715
channel ch01: starting piece 1 at 2018-JUN-04 18:11:57
channel ch01: finished piece 1 at 2018-JUN-04 18:12:12
piece handle=01t4kc7d_1_1_O11203 tag=A-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:15
channel ch01: deleting archived log(s)
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_688_fkbo5y8r_.arc RECID=629 STAMP=977940207
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_689_fkbofbjf_.arc RECID=630 STAMP=977940443
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_690_fkbofhlt_.arc RECID=631 STAMP=977940447
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_691_fkbohc78_.arc RECID=632 STAMP=977940507
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_692_fkboovy8_.arc RECID=633 STAMP=977940715
Finished backup at 2018-JUN-04 18:12:12

Starting backup at 2018-JUN-04 18:12:12
channel ch01: starting incremental level 1 datafile backup set
channel ch01: specifying datafile(s) in backup set
input datafile file number=00005 name=/oradata/o11203/yu_oe01.dbf
input datafile file number=00003 name=/oradata/o11203/undotbs01.dbf
input datafile file number=00001 name=/oradata/o11203/system01.dbf
input datafile file number=00002 name=/oradata/o11203/sysaux01.dbf
input datafile file number=00004 name=/oradata/o11203/users01.dbf
channel ch01: starting piece 1 at 2018-JUN-04 18:12:13
released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 06/04/2018 18:14:09
ORA-27030: skgfwrt: sbtwrite2 returned error
ORA-19511: Error received from media manager layer, error text:
   KBHS-01404: See trace file /u01/app/oracle/diag/rdbms/o11203/o11203/trace/sbtio_16416_140594550974208.log for details
KBHS-00719: Error 'recovery appliance Error'; ORA-45161: The backup piece size cannot exceed database DISK_RESERVED_SPACE.
ORA-45199: Error ORA-45161: The backup piece size cannot exceed database DISK_RESERVED_SPACE.


RMAN>
RMAN> **end-of-file**
RMAN>


The ZDLRA Admin Guide say:



Let try increase quota :




And repeate backup job:

Starting backup at 2018-JUN-04 18:27:51
channel ch01: starting incremental level 1 datafile backup set
channel ch01: specifying datafile(s) in backup set
input datafile file number=00005 name=/oradata/o11203/yu_oe01.dbf
input datafile file number=00003 name=/oradata/o11203/undotbs01.dbf
input datafile file number=00001 name=/oradata/o11203/system01.dbf
input datafile file number=00002 name=/oradata/o11203/sysaux01.dbf
input datafile file number=00004 name=/oradata/o11203/users01.dbf
channel ch01: starting piece 1 at 2018-JUN-04 18:27:52

channel ch01: finished piece 1 at 2018-JUN-04 18:32:07
piece handle=04t4kd58_1_1_O11203 tag=B-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:04:15
channel ch01: starting incremental level 1 datafile backup set
channel ch01: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ch01: starting piece 1 at 2018-JUN-04 18:32:08
channel ch01: finished piece 1 at 2018-JUN-04 18:32:09
piece handle=05t4kdd7_1_1_O11203 tag=B-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:01
Finished backup at 2018-JUN-04 18:32:09

Starting backup at 2018-JUN-04 18:32:09
current log archived
channel ch01: starting archived log backup set
channel ch01: specifying archived log(s) in backup set
input archived log thread=1 sequence=721 RECID=662 STAMP=977941929
channel ch01: starting piece 1 at 2018-JUN-04 18:32:11
channel ch01: finished piece 1 at 2018-JUN-04 18:32:12
piece handle=06t4kddb_1_1_O11203 tag=A-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:01
channel ch01: deleting archived log(s)
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_721_fkbpvsot_.arc RECID=662 STAMP=977941929
Finished backup at 2018-JUN-04 18:32:12
released channel: ch01

RMAN>
RMAN> **end-of-file**

The error is disappeared !

# ocrconfig -add +DATA PROT-30: The Oracle Cluster Registry location to be added is not usable. PROC-50: The Oracle Cluster Registry locatio...