Unix Technical Forum

crosscheck backup and obsolete

This is a discussion on crosscheck backup and obsolete within the Oracle Database forums, part of the Database Server Software category; --> 10.2.0.2 EE & rman If I issue rman>report obsolete I get a listing of around 100 old archivelogs that ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 07:53 AM
Ben
 
Posts: n/a
Default crosscheck backup and obsolete

10.2.0.2 EE & rman

If I issue

rman>report obsolete

I get a listing of around 100 old archivelogs that were backed up 4
years ago and no longer exist. I have tried to delete obsolete, but I
get an error saying there is a mismatch and to crosscheck to fix the
issue.

I run a crosscheck on backup, backupset, archivelog all and still
doesn't work when I try to delete obsolete.

I issued a
crosscheck backuppiece 1805, 1806;
then
delete expired;
and it works.

now how can i get around listing out each individual backuppiece
number?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 07:53 AM
sybrandb@hccnet.nl
 
Posts: n/a
Default Re: crosscheck backup and obsolete

Comments embedded

On Wed, 20 Feb 2008 11:52:09 -0800 (PST), Ben <benalvey@yahoo.com>
wrote:

>10.2.0.2 EE & rman
>
>If I issue
>
>rman>report obsolete
>
>I get a listing of around 100 old archivelogs that were backed up 4
>years ago and no longer exist. I have tried to delete obsolete, but I
>get an error saying there is a mismatch and to crosscheck to fix the
>issue.
>
>I run a crosscheck on backup, backupset, archivelog all and still
>doesn't work when I try to delete obsolete.


as expected.
After a crosscheck the command is
delete expired

Delete obsolete expects the backups still to be there.
If you expect them not to be there
use
delete force obsolete.
Warning: this will remove the backuppiece from the catalog/controlfile
without warning, even if its there but inaccessible.
>
>I issued a
>crosscheck backuppiece 1805, 1806;
>then
>delete expired;
>and it works.
>
>now how can i get around listing out each individual backuppiece
>number?


You don't need to.
crosscheck backup of archivelog all
works.

Apart from that: the only thing you need to do is just a little bit of
doc reading.
Something most people like to avoid at all cost.

--
Sybrand Bakker
Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 07:53 AM
Ben
 
Posts: n/a
Default Re: crosscheck backup and obsolete



as requested, here is a listing of what was happening..



RMAN> allocate channel for maintenance type 'SBT_TAPE';

released channel: ORA_SBT_TAPE_1
released channel: ORA_DISK_1
allocated channel: ORA_MAINT_SBT_TAPE_1
channel ORA_MAINT_SBT_TAPE_1: sid=1037 devtype=SBT_TAPE
channel ORA_MAINT_SBT_TAPE_1: VERITAS NetBackup for Oracle - Release
5.0GA (2005111305)

RMAN> crosscheck backupset;

crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1266_1_20080214 recid=1129 stamp=646628261
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1265_1_20080214 recid=1130 stamp=646628260
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1267_1_20080214 recid=1131 stamp=646631805
............
backup piece handle=c-1946273778-20080220-00 recid=1155
stamp=647153705
Crosschecked 27 objects

RMAN> list backupset summary;


List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed
Tag
------- -- -- - ----------- --------------- ------- ------- ----------
---
4228 B 0 A SBT_TAPE 14-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4229 B 0 A SBT_TAPE 14-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4230 B 0 A SBT_TAPE 14-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4231 B 0 A SBT_TAPE 14-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4279 B F A SBT_TAPE 14-FEB-08 1 1 NO
TAG20080214T045136
4305 B 0 A SBT_TAPE 15-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4306 B 0 A SBT_TAPE 15-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4307 B 0 A SBT_TAPE 15-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4308 B 0 A SBT_TAPE 15-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4356 B F A SBT_TAPE 15-FEB-08 1 1 NO
TAG20080215T045450
4391 B A A SBT_TAPE 16-FEB-08 1 1 NO
TAG20080216T060318
4403 B F A SBT_TAPE 16-FEB-08 1 1 NO
TAG20080216T060827
4423 B 0 A SBT_TAPE 18-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4424 B 0 A SBT_TAPE 18-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4425 B 0 A SBT_TAPE 18-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4426 B 0 A SBT_TAPE 18-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4474 B F A SBT_TAPE 18-FEB-08 1 1 NO
TAG20080218T044914
4500 B 0 A SBT_TAPE 19-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4501 B 0 A SBT_TAPE 19-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4502 B 0 A SBT_TAPE 19-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4503 B 0 A SBT_TAPE 19-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4551 B F A SBT_TAPE 19-FEB-08 1 1 NO
TAG20080219T045106
4581 B 0 A SBT_TAPE 20-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4582 B 0 A SBT_TAPE 20-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4583 B 0 A SBT_TAPE 20-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4584 B 0 A SBT_TAPE 20-FEB-08 1 1 NO
JDE_HOT_LEVEL0
4632 B F A SBT_TAPE 20-FEB-08 1 1 NO
TAG20080220T045503

( notice dates and no old backups )

RMAN> list archivelog all;


List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
4576 1 20631 A 16-FEB-08 /jdb2/oradata/jde/arch/
1_20631_435584242.dbf

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 1192 15-AUG-05
Backup Piece 1804 15-AUG-05 al_808_1_566415662
Backup Set 1193 15-AUG-05
Backup Piece 1805 15-AUG-05 al_809_1_566417913
Backup Set 1194 15-AUG-05
Backup Piece 1806 15-AUG-05 al_810_1_566420165
Backup Set 1195 15-AUG-05
Backup Piece 1807 15-AUG-05 al_811_1_566422364
Backup Set 1196 15-AUG-05
Backup Piece 1808 15-AUG-05 al_812_1_566424557

......... 150 or so more records ......

Backup Set 1802 15-AUG-05
Backup Piece 1803 15-AUG-05 al_807_1_566413454

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

RMAN-06207: WARNING: 195 objects could not be deleted for SBT_TAPE
channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to
fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212: Object Type Filename/Handle
RMAN-06213: ---------------
---------------------------------------------------
RMAN-06214: Backup Piece al_808_1_566415662
RMAN-06214: Backup Piece al_809_1_566417913
RMAN-06214: Backup Piece al_810_1_566420165
RMAN-06214: Backup Piece al_811_1_566422364

............ 150 or so more records.......

RMAN-06214: Backup Piece al_807_1_566413454

RMAN> crosscheck backupset;

crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1266_1_20080214 recid=1129 stamp=646628261
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1265_1_20080214 recid=1130 stamp=646628260
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1267_1_20080214 recid=1131 stamp=646631805
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1268_1_20080214 recid=1132 stamp=646631824

.......

crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=c-1946273778-20080220-00 recid=1155
stamp=647153705
Crosschecked 27 objects

RMAN> delete expired backup;


RMAN> delete expired backupset;


RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 1193 15-AUG-05
Backup Piece 1805 15-AUG-05 al_809_1_566417913
Backup Set 1194 15-AUG-05
Backup Piece 1806 15-AUG-05 al_810_1_566420165

........

Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=al_809_1_566417913 recid=682 stamp=566417914
deleted backup piece
backup piece handle=al_810_1_566420165 recid=683 stamp=566420165
Deleted 2 objects

RMAN-06207: WARNING: 192 objects could not be deleted for SBT_TAPE
channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to
fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212: Object Type Filename/Handle
RMAN-06213: ---------------
---------------------------------------------------
RMAN-06214: Backup Piece al_811_1_566422364
RMAN-06214: Backup Piece al_812_1_566424557
RMAN-06214: Backup Piece al_813_1_566426756

............

Do you really want to delete the above objects (enter YES or NO)? YES
deleted backup piece
backup piece handle=al_809_1_566417913 recid=682 stamp=566417914
deleted backup piece
backup piece handle=al_810_1_566420165 recid=683 stamp=566420165
Deleted 2 objects

RMAN-06207: WARNING: 192 objects could not be deleted for SBT_TAPE
channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to
fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212: Object Type Filename/Handle
RMAN-06213: ---------------
---------------------------------------------------
RMAN-06214: Backup Piece al_811_1_566422364
RMAN-06214: Backup Piece al_812_1_566424557
RMAN-06214: Backup Piece al_813_1_566426756
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 07:53 AM
Ben
 
Posts: n/a
Default Re: crosscheck backup and obsolete

On Feb 20, 3:55*pm, sybra...@hccnet.nl wrote:
> Comments embedded
>
> On Wed, 20 Feb 2008 11:52:09 -0800 (PST), Ben <benal...@yahoo.com>
> wrote:
>
> >10.2.0.2 EE & rman

>
> >If I issue

>
> >rman>report obsolete

>
> >I get a listing of around 100 old archivelogs that were backed up 4
> >years ago and no longer exist. I have tried to delete obsolete, but I
> >get an error saying there is a mismatch and to crosscheck to fix the
> >issue.

>
> >I run a crosscheck on backup, backupset, archivelog all and still
> >doesn't work when I try to delete obsolete.

>
> as expected.
> After a crosscheck the command is
> delete expired
>
> Delete obsolete expects the backups still to be there.
> If you expect them not to be there
> use
> delete force obsolete.
> Warning: this will remove the backuppiece from the catalog/controlfile
> without warning, even if its there but inaccessible.
>
>
>
> >I issued a
> >crosscheck backuppiece 1805, 1806;
> >then
> >delete expired;
> >and it works.

>
> >now how can i get around listing out each individual backuppiece
> >number?

>
> You don't need to.
> crosscheck backup of archivelog all
> works.
>
> Apart from that: the only thing you need to do is just a little bit of
> doc reading.
> Something most people like to avoid at all cost.
>
> --
> Sybrand Bakker
> Senior Oracle DBA


thank you Sybrand, delete force obsolete worked. I take it that
obsolete backups don't show when you use list backup?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 07:53 AM
Yong Huang
 
Posts: n/a
Default Re: crosscheck backup and obsolete

On Feb 21, 10:38 am, Ben <benal...@yahoo.com> wrote:
> RMAN-06207: WARNING: 192 objects could not be deleted for SBT_TAPE
> channel(s) due
> RMAN-06208: to mismatched status. Use CROSSCHECK command to
> fix status
> RMAN-06210: List of Mismatched objects
> RMAN-06211: ==========================
> RMAN-06212: Object Type Filename/Handle
> RMAN-06213: ---------------
> ---------------------------------------------------
> RMAN-06214: Backup Piece al_811_1_566422364
> RMAN-06214: Backup Piece al_812_1_566424557
> RMAN-06214: Backup Piece al_813_1_566426756


Maybe one of the following Metalink notes can help:

301705.1, 290559.1, 275826.1, 309833.1

Yong Huang
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com