Home » RDBMS Server » Backup & Recovery » rman crosscheck (tape)
rman crosscheck (tape) [message #531530] Wed, 16 November 2011 10:38 Go to next message
BeefStu
Messages: 208
Registered: October 2011
Senior Member
Is the crosscheck command suppose to be able to clear
catalog entries that are on tape? If so, can somebody
explain why I still have entries for 11/14/2011 13:28:32
when the current date is 11/16/2011 11:17:45 and I
have a retenion policy of 1 day?

Or if my crosscheck script is incorrect can somebody suggest
a fix...

This is a test system where I am testing backup to tape... I
currently disabled the backup to tape and now backing up to
disk.


RMAN> show all;

RMAN configuration parameters for database with db_unique_name OTAPDEV are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
....
....
...



>/tmp
$ date
Wed Nov 16 11:17:32 EST 2011

cat crosscheck.ksh
==============
rman <<EOT1
connect target ...
connect catalog ... 

CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK BACKUP DEVICE TYPE SBT_TAPE;
CROSSCHECK BACKUPSET;
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP;
DELETE NOPROMPT OBSOLETE;

resync catalog;
LIST BACKUP;
EOT1


RMAN> list backup;

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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77333   Full    3.09G      SBT_TAPE    00:03:05     11-14-2011 13:28:32
        BP Key: 77339   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111141325
        Handle: rman_OTAPDEV_t767193927_s40841_p1   Media:
  List of Datafiles in backup set 77333
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  5       Full 11164635148010 11-14-2011 13:25:27 /u09/oradata/otapdev/ie10m_1a.dbf
  8       Full 11164635148010 11-14-2011 13:25:27 /u11/oradata/otapdev/de10m_1a.dbf
  9       Full 11164635148010 11-14-2011 13:25:27 /u11/oradata/otapdev/de100m_1a.dbf
  13      Full 11164635148010 11-14-2011 13:25:27 /u11/oradata/otapdev/mtas_aq1_01.dbf



Re: rman crosscheck (tape) [message #531537 is a reply to message #531530] Wed, 16 November 2011 11:04 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Hi - if you have only one backup, RMAN will not consider it obsolete until you have taken another. Then, because your recovery window is set to one day, you will have to wait another day before RMAN will consider the earlier one to be obsolete.
rman crosscheck (tape) [message #531538 is a reply to message #531537] Wed, 16 November 2011 11:16 Go to previous messageGo to next message
BeefStu
Messages: 208
Registered: October 2011
Senior Member
John, thanks for the information in your prior post..

I actually have 3 full backups 11/14, 11/15 and 11/16 any idea
why 11/14 is still around and how I can get rid of this from
the catalog


RMAN> list backup;


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77333   Full    3.09G      SBT_TAPE    00:03:05     11-14-2011 13:28:32
        BP Key: 77339   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111141325
        Handle: rman_OTAPDEV_t767193927_s40841_p1   Media:
  List of Datafiles in backup set 77333
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  5       Full 11164635148010 11-14-2011 13:25:27 /u09/oradata/otapdev/ie10m_1a.
dbf
  8       Full 11164635148010 11-14-2011 13:25:27 /u11/oradata/otapdev/de10m_1a.
dbf
  9       Full 11164635148010 11-14-2011 13:25:27 /u11/oradata/otapdev/de100m_1a
.dbf
  13      Full 11164635148010 11-14-2011 13:25:27 /u11/oradata/otapdev/mtas_aq1_
01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77334   Full    2.04G      SBT_TAPE    00:03:18     11-14-2011 13:28:45
        BP Key: 77340   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111141325
        Handle: rman_OTAPDEV_t767193927_s40838_p1   Media:
  List of Datafiles in backup set 77334
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  6       Full 11164635148007 11-14-2011 13:25:27 /u09/oradata/otapdev/ie100m_1a
.dbf
  11      Full 11164635148007 11-14-2011 13:25:27 /u08/oradata/otapdev/test_01.d
bf
  12      Full 11164635148007 11-14-2011 13:25:27 /u11/oradata/otapdev/perfstat_
01.dbf
  14      Full 11164635148007 11-14-2011 13:25:27 /u09/oradata/otapdev/sysaux02.
dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77335   Full    6.13G      SBT_TAPE    00:04:03     11-14-2011 13:29:30
        BP Key: 77341   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111141325
        Handle: rman_OTAPDEV_t767193927_s40840_p1   Media:
  List of Datafiles in backup set 77335
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  3       Full 11164635148009 11-14-2011 13:25:27 /u08/oradata/otapdev/tools_01.
dbf
  4       Full 11164635148009 11-14-2011 13:25:27 /u08/oradata/otapdev/user_01.d
bf
  7       Full 11164635148009 11-14-2011 13:25:27 /u09/oradata/otapdev/ie100m_1b
.dbf
  10      Full 11164635148009 11-14-2011 13:25:27 /u08/oradata/otapdev/sysaux01.
dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77336   Full    10.37G     SBT_TAPE    00:04:51     11-14-2011 13:30:18
        BP Key: 77342   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111141325
        Handle: rman_OTAPDEV_t767193927_s40839_p1   Media:
  List of Datafiles in backup set 77336
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1       Full 11164635148008 11-14-2011 13:25:27 /u08/oradata/otapdev/system01.
dbf
  2       Full 11164635148008 11-14-2011 13:25:27 /u04/oradata/otapdev/undotbs01
.dbf

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
77383   1.25M      SBT_TAPE    00:00:00     11-14-2011 13:30:51
        BP Key: 77387   Status: AVAILABLE  Compressed: NO  Tag: TAG20111114T1330
50
        Handle: arch_OTAPDEV_t767194251_s40844_p1   Media:

  List of Archived Logs in backup set 77383
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    132459  11164635147920 11-14-2011 13:25:18 11164635150193 11-14-2011 13:3
0:42

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77395   Full    58.25M     SBT_TAPE    00:00:02     11-14-2011 13:31:02
        BP Key: 77397   Status: AVAILABLE  Compressed: NO  Tag: TAG20111114T1331
00
        Handle: c-2571197296-20111114-03   Media:
  SPFILE Included: Modification time: 10-27-2011 18:08:37
  SPFILE db_unique_name: OTAPDEV
  Control File Included: Ckp SCN: 11164635150553   Ckp time: 11-14-2011 13:31:00

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77439   Full    3.09G      SBT_TAPE    00:02:50     11-15-2011 13:35:44
        BP Key: 77445   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111151332
        Handle: rman_OTAPDEV_t767280774_s40849_p1   Media:
  List of Datafiles in backup set 77439
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  5       Full 11164635704239 11-15-2011 13:32:54 /u09/oradata/otapdev/ie10m_1a.
dbf
  8       Full 11164635704239 11-15-2011 13:32:54 /u11/oradata/otapdev/de10m_1a.
dbf
  9       Full 11164635704239 11-15-2011 13:32:54 /u11/oradata/otapdev/de100m_1a
.dbf
  13      Full 11164635704239 11-15-2011 13:32:54 /u11/oradata/otapdev/mtas_aq1_
01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77440   Full    2.04G      SBT_TAPE    00:02:50     11-15-2011 13:35:44
        BP Key: 77446   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111151332
        Handle: rman_OTAPDEV_t767280774_s40846_p1   Media:
  List of Datafiles in backup set 77440
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  6       Full 11164635704236 11-15-2011 13:32:54 /u09/oradata/otapdev/ie100m_1a
.dbf
  11      Full 11164635704236 11-15-2011 13:32:54 /u08/oradata/otapdev/test_01.d
bf
  12      Full 11164635704236 11-15-2011 13:32:54 /u11/oradata/otapdev/perfstat_
01.dbf
  14      Full 11164635704236 11-15-2011 13:32:54 /u09/oradata/otapdev/sysaux02.
dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77441   Full    6.13G      SBT_TAPE    00:03:47     11-15-2011 13:36:41
        BP Key: 77447   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111151332
        Handle: rman_OTAPDEV_t767280774_s40848_p1   Media:
  List of Datafiles in backup set 77441
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  3       Full 11164635704238 11-15-2011 13:32:54 /u08/oradata/otapdev/tools_01.
dbf
  4       Full 11164635704238 11-15-2011 13:32:54 /u08/oradata/otapdev/user_01.d
bf
  7       Full 11164635704238 11-15-2011 13:32:54 /u09/oradata/otapdev/ie100m_1b
.dbf
  10      Full 11164635704238 11-15-2011 13:32:54 /u08/oradata/otapdev/sysaux01.
dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77442   Full    10.37G     SBT_TAPE    00:04:29     11-15-2011 13:37:23
        BP Key: 77448   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111151332
        Handle: rman_OTAPDEV_t767280774_s40847_p1   Media:
  List of Datafiles in backup set 77442
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1       Full 11164635704237 11-15-2011 13:32:54 /u08/oradata/otapdev/system01.
dbf
  2       Full 11164635704237 11-15-2011 13:32:54 /u04/oradata/otapdev/undotbs01
.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77467   Full    58.25M     SBT_TAPE    00:00:02     11-15-2011 13:37:37
        BP Key: 77470   Status: AVAILABLE  Compressed: NO  Tag: TAG20111115T1337
35
        Handle: c-2571197296-20111115-00   Media:
  SPFILE Included: Modification time: 10-27-2011 18:08:37
  SPFILE db_unique_name: OTAPDEV
  Control File Included: Ckp SCN: 11164635706600   Ckp time: 11-15-2011 13:37:35

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
77489   3.00M      SBT_TAPE    00:00:00     11-15-2011 13:37:57
        BP Key: 77493   Status: AVAILABLE  Compressed: NO  Tag: TAG20111115T1337
57
        Handle: arch_OTAPDEV_t767281077_s40852_p1   Media:

  List of Archived Logs in backup set 77489
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    132461  11164635703107 11-15-2011 13:32:38 11164635706781 11-15-2011 13:3
7:49

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
77490   423.00M    SBT_TAPE    00:00:06     11-15-2011 13:38:03
        BP Key: 77494   Status: AVAILABLE  Compressed: NO  Tag: TAG20111115T1337
57
        Handle: arch_OTAPDEV_t767281077_s40851_p1   Media:

  List of Archived Logs in backup set 77490
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    132460  11164635150193 11-14-2011 13:30:42 11164635703107 11-15-2011 13:3
2:38

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77501   Full    58.25M     SBT_TAPE    00:00:01     11-15-2011 13:38:12
        BP Key: 77503   Status: AVAILABLE  Compressed: NO  Tag: TAG20111115T1338
11
        Handle: c-2571197296-20111115-01   Media:
  SPFILE Included: Modification time: 10-27-2011 18:08:37
  SPFILE db_unique_name: OTAPDEV
  Control File Included: Ckp SCN: 11164635707014   Ckp time: 11-15-2011 13:38:11

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77559   Full    58.12M     DISK        00:00:02     11-16-2011 08:48:50
        BP Key: 77562   Status: AVAILABLE  Compressed: NO  Tag: TAG20111116T0848
48
        Piece Name: /u10/otapdev/spfile_control_files/c-2571197296-20111116-00
  SPFILE Included: Modification time: 10-27-2011 18:08:37
  SPFILE db_unique_name: OTAPDEV
  Control File Included: Ckp SCN: 11164636182045   Ckp time: 11-16-2011 08:48:48

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77593   Full    58.12M     DISK        00:00:01     11-16-2011 08:49:24
        BP Key: 77595   Status: AVAILABLE  Compressed: NO  Tag: TAG20111116T0849
23
        Piece Name: /u10/otapdev/spfile_control_files/c-2571197296-20111116-01
  SPFILE Included: Modification time: 10-27-2011 18:08:37
  SPFILE db_unique_name: OTAPDEV
  Control File Included: Ckp SCN: 11164636182327   Ckp time: 11-16-2011 08:49:23

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77618   Full    3.09G      DISK        00:02:31     11-16-2011 09:17:46
        BP Key: 77624   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111160915
        Piece Name: /u10/otapdev/rman/full_11_1116_0915/rman_OTAPDEV_t767351715_
s40865_p1
  List of Datafiles in backup set 77618
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  5       Full 11164636201008 11-16-2011 09:15:15 /u09/oradata/otapdev/ie10m_1a.
dbf
  8       Full 11164636201008 11-16-2011 09:15:15 /u11/oradata/otapdev/de10m_1a.
dbf
  9       Full 11164636201008 11-16-2011 09:15:15 /u11/oradata/otapdev/de100m_1a
.dbf
  13      Full 11164636201008 11-16-2011 09:15:15 /u11/oradata/otapdev/mtas_aq1_
01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77619   Full    5.74G      DISK        00:03:04     11-16-2011 09:18:19
        BP Key: 77625   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111160915
        Piece Name: /u10/otapdev/rman/full_11_1116_0915/rman_OTAPDEV_t767351715_
s40864_p1
  List of Datafiles in backup set 77619
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  3       Full 11164636201004 11-16-2011 09:15:15 /u08/oradata/otapdev/tools_01.
dbf
  4       Full 11164636201004 11-16-2011 09:15:15 /u08/oradata/otapdev/user_01.d
bf
  7       Full 11164636201004 11-16-2011 09:15:15 /u09/oradata/otapdev/ie100m_1b
.dbf
  10      Full 11164636201004 11-16-2011 09:15:15 /u08/oradata/otapdev/sysaux01.
dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77620   Full    2.01G      DISK        00:03:10     11-16-2011 09:18:25
        BP Key: 77626   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111160915
        Piece Name: /u10/otapdev/rman/full_11_1116_0915/rman_OTAPDEV_t767351715_
s40862_p1
  List of Datafiles in backup set 77620
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  6       Full 11164636201003 11-16-2011 09:15:15 /u09/oradata/otapdev/ie100m_1a
.dbf
  11      Full 11164636201003 11-16-2011 09:15:15 /u08/oradata/otapdev/test_01.d
bf
  12      Full 11164636201003 11-16-2011 09:15:15 /u11/oradata/otapdev/perfstat_
01.dbf
  14      Full 11164636201003 11-16-2011 09:15:15 /u09/oradata/otapdev/sysaux02.
dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77621   Full    385.02M    DISK        00:03:12     11-16-2011 09:18:27
        BP Key: 77627   Status: AVAILABLE  Compressed: NO  Tag: TAG_1111160915
        Piece Name: /u10/otapdev/rman/full_11_1116_0915/rman_OTAPDEV_t767351715_
s40863_p1
  List of Datafiles in backup set 77621
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1       Full 11164636201002 11-16-2011 09:15:15 /u08/oradata/otapdev/system01.
dbf
  2       Full 11164636201002 11-16-2011 09:15:15 /u04/oradata/otapdev/undotbs01
.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77646   Full    58.12M     DISK        00:00:01     11-16-2011 09:18:37
        BP Key: 77649   Status: AVAILABLE  Compressed: NO  Tag: TAG20111116T0918
36
        Piece Name: /u10/otapdev/spfile_control_files/c-2571197296-20111116-02
  SPFILE Included: Modification time: 10-27-2011 18:08:37
  SPFILE db_unique_name: OTAPDEV
  Control File Included: Ckp SCN: 11164636202408   Ckp time: 11-16-2011 09:18:36

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
77668   1.51M      DISK        00:00:00     11-16-2011 09:18:57
        BP Key: 77672   Status: AVAILABLE  Compressed: NO  Tag: TAG20111116T0918
57
        Piece Name: /u10/otapdev/rman/full_11_1116_0915/arch_OTAPDEV_t767351937_
s40868_p1

  List of Archived Logs in backup set 77668
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    132465  11164636200904 11-16-2011 09:15:07 11164636202572 11-16-2011 09:1
8:50

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
77669   15.54M     DISK        00:00:01     11-16-2011 09:18:58
        BP Key: 77673   Status: AVAILABLE  Compressed: NO  Tag: TAG20111116T0918
57
        Piece Name: /u10/otapdev/rman/full_11_1116_0915/arch_OTAPDEV_t767351937_
s40867_p1

  List of Archived Logs in backup set 77669
  Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
  ---- ------- ---------- ------------------- ---------- ---------
  1    132464  11164636182170 11-16-2011 08:49:02 11164636200904 11-16-2011 09:1
5:07

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
77680   Full    58.12M     DISK        00:00:01     11-16-2011 09:19:05
        BP Key: 77682   Status: AVAILABLE  Compressed: NO  Tag: TAG20111116T0919
04
        Piece Name: /u10/otapdev/spfile_control_files/c-2571197296-20111116-03
  SPFILE Included: Modification time: 10-27-2011 18:08:37
  SPFILE db_unique_name: OTAPDEV
  Control File Included: Ckp SCN: 11164636202759   Ckp time: 11-16-2011 09:19:04

rman crosscheck (tape) [message #533597 is a reply to message #531530] Wed, 30 November 2011 14:58 Go to previous message
BeefStu
Messages: 208
Registered: October 2011
Senior Member
To follow up With a 'RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS', rman will keep at least one backup that is older than 'SYSDATE-1' at the time the 'DELETE NOPROMPT OBSOLETE;' is executed. Later on in the day (past sysdate-1) I ran the
DELETE NOPROMPT OBSOLETE and that left me with only 2 backups
as per John's explantion above.

Thx for everybody's input...

Previous Topic: Restore database from another server
Next Topic: How can i make rman backupset expired
Goto Forum:
  


Current Time: Thu Mar 28 16:38:16 CDT 2024