Search My Oracle Blog

Custom Search

03 August, 2013

Re-CATALOGing BackupPieces ??

What happens if you re-CATALOG BackupPieces ?  Is it possible to duplicate entries.

This forum thread :  https://forums.oracle.com/thread/2562839  implies so in 11.1.0.7

This is in 11.2.0.2 :

SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /home/oracle/app/oracle/flash_
                                                 recovery_area
db_recovery_file_dest_size           big integer 3852M
recovery_parallelism                 integer     0
SQL> 

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
8       168.59M    DISK        00:00:02     29-JUL-13      
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20130729T082500
        Piece Name: /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2013_07_29/o1_mf_annnn_TAG20130729T082500_8zf2bdkc_.bkp

  List of Archived Logs in backup set 8
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    621     14089456   03-JUN-13 14098001   16-JUN-13
  1    622     14098001   16-JUN-13 14098016   16-JUN-13
  1    623     14098016   16-JUN-13 14121393   13-JUL-13
  1    624     14121393   13-JUL-13 14149486   13-JUL-13
  1    625     14149486   13-JUL-13 14172383   16-JUL-13
  1    626     14172383   16-JUL-13 14201524   27-JUL-13
  1    627     14201524   27-JUL-13 14226575   28-JUL-13
  1    628     14226575   28-JUL-13 14248805   28-JUL-13
  1    629     14248805   28-JUL-13 14271107   29-JUL-13
  1    630     14271107   29-JUL-13 14271656   29-JUL-13
  1    631     14271656   29-JUL-13 14271770   29-JUL-13
  1    632     14271770   29-JUL-13 14271813   29-JUL-13
  1    633     14271813   29-JUL-13 14271822   29-JUL-13
  1    634     14271822   29-JUL-13 14271905   29-JUL-13

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    2.13G      DISK        00:01:58     29-JUL-13      
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20130729T082504
        Piece Name: /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2013_07_29/o1_mf_nnndf_TAG20130729T082504_8zf2bj83_.bkp
  List of Datafiles in backup set 9
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 14271579   29-JUL-13 /home/oracle/app/oracle/oradata/orcl/system01.dbf
  2       Full 14271579   29-JUL-13 /home/oracle/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 14271579   29-JUL-13 /home/oracle/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 14271579   29-JUL-13 /home/oracle/app/oracle/oradata/orcl/users01.dbf
  5       Full 14271579   29-JUL-13 /home/oracle/app/oracle/oradata/orcl/example01.dbf
  11      Full 14271579   29-JUL-13 /home/oracle/app/oracle/oradata/orcl/ORCL/datafile/o1_mf_hemant_8pnowslc_.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10      Full    9.36M      DISK        00:00:03     29-JUL-13      
        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TAG20130729T082504
        Piece Name: /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2013_07_29/o1_mf_ncsnf_TAG20130729T082504_8zf2gk3r_.bkp
  SPFILE Included: Modification time: 29-JUL-13
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 14283558     Ckp time: 29-JUL-13

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
11      334.75M    DISK        00:00:05     29-JUL-13      
        BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20130729T082717
        Piece Name: /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2013_07_29/o1_mf_annnn_TAG20130729T082717_8zf2govj_.bkp

  List of Archived Logs in backup set 11
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    635     14271905   29-JUL-13 14273457   29-JUL-13
  1    636     14273457   29-JUL-13 14275520   29-JUL-13
  1    637     14275520   29-JUL-13 14276886   29-JUL-13
  1    638     14276886   29-JUL-13 14278245   29-JUL-13
  1    639     14278245   29-JUL-13 14279601   29-JUL-13
  1    640     14279601   29-JUL-13 14281402   29-JUL-13
  1    641     14281402   29-JUL-13 14283542   29-JUL-13
  1    642     14283542   29-JUL-13 14283558   29-JUL-13
  1    643     14283558   29-JUL-13 14283570   29-JUL-13

RMAN> 

Here we see that Backups created on 29-Julyl, comprising of BackupSets 8 (ArchiveLogs), 9 (DatabaseFiles), 10 (SPFILE and Controlfile) and 11 (ArchiveLogs) are currently present in the FRA (/home/oracle/app/oracle/flash_recovery_area.

Next, I run a CATALOG command :

RMAN> catalog start with '/home/oracle/app/oracle/flash_recovery_area';

searching for all files that match the pattern /home/oracle/app/oracle/flash_recovery_area
no files found to be unknown to the database

RMAN> 
RMAN> delete backup tag 'TAG20130729T082500';

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=49 device type=DISK

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
8       8       1   1   AVAILABLE   DISK        /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2013_07_29/o1_mf_annnn_TAG20130729T082500_8zf2bdkc_.bkp

Do you really want to delete the above objects (enter YES or NO)? NO

RMAN> 

Oracle finds them to be "known" to the database and refuses to re-CATALOG them.  Of course, if I were to move or copy them to a different location, Oracle would CATALOG them as they would have a different "name" (the directory path being different).

Is there any situation where the backup pieces in the same location would appear duplicated in a LIST BACKUP listing ?  That they would have been re-CATALOGed ?

.
.
.


1 comment:

Anonymous said...

Hi Hemanta,

Certainly/Logically, yes it may allow based on redundancy rman configuration.

- Thanks
Pavan Kumar N

Aggregated by orafaq.com

Aggregated by orafaq.com
This blog is being aggregated by orafaq.com