Aw: RE: RMAN delete archivelog backed up n times deletes too much

From: Ingrid Voigt <giantpanda_at_gmx.net>
Date: Fri, 9 Oct 2015 11:53:54 +0200
Message-ID: <trinity-3e61a1a8-833a-4462-81dd-56acf2828634-1444384433984_at_3capp-gmx-bs31>

Hi Andy,
 
you are getting the correct expected behavior. The archivelog is listed but not suggested for deletion
because it does not have the required number of backups - therefore RMAN-01838.
 
Here is my result - sorry for not making the bug clearer immediately:
 
RMAN> list archivelog all;
 
using target database control file instead of recovery catalog
List of Archived Log Copies for database with db_unique_name PSIPRD93
=====================================================================
Key     Thrd Seq     S Low Time
------- ---- ------- - -------------------
430671  1    431720  A 09.10.2015 11:09:51
        Name: I:\ARCHIVE\ARC0000431720_0873649502.0001
 
RMAN> list archivelog all backed up 1 times to disk;
 
using target database control file instead of recovery catalog
 
RMAN>
 
SQL> select backup_count from v$archived_log where sequence#=431720;
 
BACKUP_COUNT
------------
           0
 
RMAN> delete archivelog all backed up 1 times to disk;
 
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=925 device type=DISK
 
430671  1    431720  A 09.10.2015 11:09:51
        Name: I:\ARCHIVE\ARC0000431720_0873649502.0001
 
Do you really want to delete the above objects (enter YES or NO)? NO
RMAN>
 
 
Our old backupscript contained the following: 
 
run {
...
backup format 'filename.dbf' skip inaccessible archivelog all;
delete noprompt archivelog all backed up 1 times to device type 'sbt_tape';
...
}
 
and would have deleted all archivelogs created during its run instead of
keeping them for the next backup - making complete recovery impossible. 
 
 
(The problem and the SR are still open, our workaround is active.)
 
 
Best regards
Ingrid Voigt
 
 
 
Gesendet: Donnerstag, 08. Oktober 2015 um 20:13 Uhrexi
Von: "Andy Baird" <Andy.Baird_at_cityofthornton.net>
An: "'giantpanda_at_gmx.net'" <giantpanda_at_gmx.net>, ORACLE-L <oracle-l@freelists.org>
Betreff: RE: RMAN delete archivelog backed up n times deletes too much

Hi Ingrid,

 

Not sure if it helps, but I’ve got an 11.2.0.4.0 test system where it tries to do that, but it winds up giving me an RMAN-08138 error:

 

RMAN> list archivelog all;

 

List of Archived Log Copies for database with db_unique_name DBT

=====================================================================

 

Key     Thrd Seq     S Low Time

------- ---- ------- - ---------

345     1    345     A 07-OCT-15

        Name: /u01/app/oracle/fast_recovery_area/DBT/archivelog/2015_10_08/o1_mf_1_345_c1d35jdl_.arc

 

 

RMAN> list archivelog all backed up 1 times to disk;

 

 

RMAN> delete archivelog all backed up 1 times to disk;

 

released channel: ORA_DISK_1

released channel: ORA_DISK_2

released channel: ORA_DISK_3

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=243 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=365 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=12 device type=DISK

RMAN-08138: WARNING: archived log not deleted - must create more backups

archived log file name=/u01/app/oracle/fast_recovery_area/DBT/archivelog/2015_10_08/o1_mf_1_345_c1d35jdl_.arc thread=1 sequence=345

 

The file isn’t deleted and is still there.  I think I’m getting the error because it is checking my RMAN configuration parameters before deleting, but I’m not sure why it’s trying to delete it in the first place either. 

 

Thanks,

Andy Baird

 

 

 

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Ingrid Voigt
Sent: Wednesday, October 07, 2015 5:40 AM
To: ORACLE-L
Subject: RMAN delete archivelog backed up n times deletes too much

 

Hi everybody, 

 

if anybody has seen something like this before any info would be helpful. This

issue broke the backups on one of our more important production databases -

and we only noticed by accident...:

 

The problem:

 

RMAN> list archivelog all backed up 2 times to device type 'sbt_tape';

(no archivelogs are listed)

 

RMAN> delete archivelog all backed up 2 times to device type 'sbt_tape';

(all archivelogs are suggested for deletion, whether backed up or not).

 

Oracle 11.2 on Windows 2008 R2.

Physical DataGuard, problem occurs on both primary and standby side.

 

Recent changes: Upgrade from 11.2.0.3 to 11.2.0.4

Current patchset: 11.2.0.4.7 (July 2014), Patch ID 18842982, Unique Patch ID 17925942

Error occurred immediately after this upgrade.

 

Here's how far we got troubleshooting:

- Error occurs with different values instead of "2 times"

- Error does not occur with RMAN 11.2.0.3

- Error does not occur on other machines with 11.2.0.4.7 (same patch ID, different unique Patch ID).

(at least in all samples I've checked so far)

- Error does not occur using RMAN 11.2.0.4.12 from different machine to this database

- Error does occur when using RMAN 11.2.0.4.7 (same Patch ID, different unique Patch ID) from

   different machine to this database

- Error does occur when using RMAN 11.2.0.4.7 from this machine to other databases

 

Workaround (after the initial panic subsided...):

- removed "delete archivelog" clause from standard backup script

- scheduled separate RMAN deletion tasks. Archivelogs are now selected by using

v$archived_log.backup_count. This seems to work fine. 

( - ToDo: Improve backup monitoring. )

 

We have opened a SR but got nothing useful yet.

 

The obvious next suggestion is to reproduce on some test system, upgrade to

the higher patch level (11.2.0.4.12) and see what happens. However, it's going to be

difficult to find the necessary time and production downtime, so I thought I'd ask here

first.

 

Any help would be greatly appreciated.

 

 

Best regards

Ingrid

-- http://www.freelists.org/webpage/oracle-l

-- http://www.freelists.org/webpage/oracle-l Received on Fri Oct 09 2015 - 11:53:54 CEST

Original text of this message