-
RMAN - removing old catalog entries
I want to remove RMAN catalog entries older than 30 days. The backup pieces have long since been moved off the system.
I understand I can use the RMAN CHANGE command to remove just the catalog records but I can't find the syntax anywhere. Can anyone help me?
Here's my best guess at piecing it together:
CHANGE BACKUP COMPLETED BEFORE 'SYSDATE-30' UNCATALOG;
Ken
-
Is this what you are looking for (CHANGE)?
-
 Originally Posted by ebrian
Is this what you are looking for ( CHANGE)?
Yea, I read the docs. They're just not clear on the syntax for the example above.
Cheers
-
Hi
Does this work
CHANGE BACKUPSETS COMPLETED BEFORE 'SYSDATE-30' UNCATALOG;
if that doesnt work one other way of doing that would be
http://www.orafaq.com/scripts/unix/purgecat.txt
Just change the line
echo "CHANGE BACKUPSET $key DELETE;" >>$CMDFILE
in that script to
echo "CHANGE BACKUPSET $key UNCATALOG;" >>$CMDFILE
and also this line
list backupset of database
from time 'SYSDATE-3000' until time 'SYSDATE-$DAYSTOKEEP'
Hmm Frank Nuade has done some smart MetaProgramming i beleive ;-)
regards
Hrishy
Last edited by hrishy; 07-02-2008 at 05:03 AM.
-
Exactly what I was looking for. Thank you Hrishy!
-
RMAN> change backupset completed before 'sysdate-30' uncatalog;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of uncatalog command at 07/02/2008 12:55:34
RMAN-06122: CHANGE .. UNCATALOG not supported for BACKUPSET
Found this...
Oracle Error : RMAN-06122: CHANGE .. UNCATALOG not supported for BACKUPSET
Cause: The CHANGE BACKUPSET .. UNCATALOG command was entered. The UNCATALOG operation is not supported with backup set.
Action: Use CHANGE BACKUPSET .. DELETE instead.
Then did this:
RMAN> change backupset completed before 'sysdate-30' delete;
...
Do you really want to delete the above objects (enter YES or NO)? YES
But when I "list backupset completed before 'sysdate-30';" they're all still there... urgh
Any ideas?
-
Hi
Can you try by deleting the backupset with the keys
by using the following script
http://www.orafaq.com/scripts/unix/purgecat.txt
regards
Hrishy
-
Have you tried:
Code:
RMAN> crosscheck backup completed before 'sysdate-30';
RMAN> delete expired backup completed before 'sysdate-30';
-
Thanks. I've just about re-engineered the purgecat.ksh script for 10.2 catalog. The commands and output are a little different.
I'll give this a check and see if that doesn't do the trick and report back. Thanks for your assistance.
-
 Originally Posted by ebrian
Have you tried:
Code:
RMAN> crosscheck backup completed before 'sysdate-30';
RMAN> delete expired backup completed before 'sysdate-30';
This works perfectly. Thank you!
Is there a way to feed into the script the "YES" response?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|