Home » RDBMS Server » Backup & Recovery » RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv (11g, 11.2.0.4, linux5)
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #646937] Fri, 15 January 2016 01:27 Go to next message
ashishkumarmahanta80
Messages: 231
Registered: October 2006
Location: kolkatta
Senior Member
Dear All,

we have below script for taking archivelog backup, format is mentioned on the disk location.
run {
            allocate channel c1 type disk;
            allocate channel c2 type disk;

                 sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
                 backup as compressed backupset archivelog all delete input format '/backup/RMAN/testdb/testdb_Archbkp0_%U_%t_%T.arc' ;
                 release channel c1;
             release channel c2;

        }


while executing this script, we are getting below error -

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/log/arch/TESTDB/1_60622_886260234.dbf thread=1 sequence=60622


Below are the configuration done at pfile.

*.log_archive_config='DG_CONFIG=(MAGMADB,MAGMADBSTDBY)'
*.log_archive_dest_1='LOCATION=/log/arch/MAGMADB VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=MAGMADB'
*.log_archive_dest_2='SERVICE=MAGMADBSTDBY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=MAGMADBSTDBY'
*.log_archive_dest_state_2='DEFER'

This production database was configure with standby but recently parameter for standby service is marked as defer.
Still, standby db_config is configured.

Please let us know how to rectify the issue. It was working fine before the configuration done.

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name TESTDB are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 5 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
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 ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/database/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_TESTDB.f'; # default


Regards,
Ashish Kumar Mahanta

Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #646940 is a reply to message #646937] Fri, 15 January 2016 01:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
 *Cause: An archived log that should have been deleted was not as it was
         required by upstream capture process or Data Guard.
         The next message identifies the archived log.
 *Action: This is an informational message. The archived log can be
          deleted after it is no longer needed.  See the
          documentation for Data Guard to alter the set of active
          Data Guard destinations.  See the documentation for
          Streams to alter the set of active streams.
Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #646954 is a reply to message #646940] Fri, 15 January 2016 05:27 Go to previous messageGo to next message
ashishkumarmahanta80
Messages: 231
Registered: October 2006
Location: kolkatta
Senior Member
Dear Michel,

Please suggest, what changes can be done to make it workable. Or provide me link to know more in details.

Provided suggestion are checked in site but unable to understand.

Regards,
Ashish
Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #646957 is a reply to message #646954] Fri, 15 January 2016 06:30 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
It is the expected behaviour. You asked for it.

https://docs.oracle.com/cd/B14117_01/server.101/b10755/initparams102.htm

Usually, "Defer" is done during maintenance.
So now your primary is considering these archive logs as required so as to apply to standby in future (Gap Resolution)
and will not allow them to be deleted.

Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #646958 is a reply to message #646957] Fri, 15 January 2016 06:39 Go to previous messageGo to next message
ashishkumarmahanta80
Messages: 231
Registered: October 2006
Location: kolkatta
Senior Member
Dear Mahesh,

I got the whole things.
Here, both the databases (data-guard) are up & running only services is marked as deffer. Due to this, while deleting the archivelog from primary, it is checking for log shipping and not allow to get deleted from the location.

Thanks,
Ashish
Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #646985 is a reply to message #646958] Sat, 16 January 2016 00:59 Go to previous messageGo to next message
arin.oradba
Messages: 33
Registered: January 2016
Location: Kolkata
Member
Dear all,

I have a doubt about all the discussion.

Here RMAN configuration shows -
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;

Oracle documents for Archive log deletion policy-

Dy default, there is no archivelog deletion policy in RMAN .
You have to configure archivelog deletion policy externally for data guard setup.

May be it is "to Applied on standby" or "to Applied on all standby" or "to shipped on standby" or "to shipped on all standby".


But My question is -

Why RMAN can not delete the archive logs whether there is a data guard set up or not in case of no one configured the RMAN archivelog deletion policy for data guard setup externally?

And if it is default behavior not to delete archive log without applied to standby or shipped to standby, then why it is required to configure archivelog deletion policy for data guard setup externally?
Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #646989 is a reply to message #646985] Sat, 16 January 2016 07:16 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Guess the questions are
* Why is it defaulted to none.?
Flexibility. Configure it according to your restore/recover needs and space
* If default is none (no deletion), why configure (or conspire) to delete?
One will definitely run of space at some point of time.
Archived logs are deleted once they have been applied (in standby) or
backed up atleast once (non-standby).


There are differences between retention and deletion policies.
The most important merit of Oracle is its ability to restore and recover
to the most possible granule.
Without archived logs, recovery is just not possible.


Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #647001 is a reply to message #646989] Sun, 17 January 2016 23:57 Go to previous messageGo to next message
arin.oradba
Messages: 33
Registered: January 2016
Location: Kolkata
Member
Dear Mahesh,
You are right.All the point are valid .

But please try to understand my point.


At Ashish first post, we saw that "ARCHIVELOG DELETION POLICY TO NONE" in RMAN configuration.

After that they made a standby database, but did not change the "ARCHIVELOG DELETION POLICY" or "ARCHIVELOG retention POLICY" in configuration.
Also all the data guard parameters were deferred.

Oracle documents says that - Dy default, there is no archivelog deletion policy in RMAN .You have to configure archivelog deletion policy externally for data guard setup.


But My question is -

So in Ashish's case, Why he could not delete the archive logs by RMAN in default "ARCHIVELOG DELETION POLICY"?
For a min, please ignore the requirement to keep the archivelog for restore/recover point .


Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #647004 is a reply to message #647001] Mon, 18 January 2016 00:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

What does "ARCHIVELOG DELETION POLICY TO NONE" mean?

Re: RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archiv [message #647016 is a reply to message #647001] Mon, 18 January 2016 05:59 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Again,
OP has asked for it by using "defer" option.
quoting docs
Quote:

defer

Specifies that valid destination information and attributes are preserved, but the destination is excluded from archiving operations until re-enabled.


Quote:
The archived redo log deletion policy is configured to NONE by default. In this case, RMAN considers archived redo log files in the recovery area as eligible for deletion if they meet both of the following conditions:

The archived redo logs, whether in the flash recovery area or outside of it, have been transferred to the required remote destinations specified by LOG_ARCHIVE_DEST_n.

The archived redo logs have been backed up at least once to disk or SBT or the logs are obsolete according to the backup retention policy.
Previous Topic: RMAN Backup
Next Topic: Why Do Redo Log Remain Active Even After alter system archive log current
Goto Forum:
  


Current Time: Thu Mar 28 07:59:16 CDT 2024