|
-
Hi Jodie,
I tried your script and it works only if the backup set exists on the disk. In my case it wont be because I would delete it from the disk.
The script fails and to overcome the problem i am using crosscheck and then deleting expired backups.
I have updated your script to
connect rman/rman@reccatdb
SET linesize 200 pagesize 0
SET heading OFF
set feedback OFF
set echo OFF
SET verify off
SET recsep off
SPOOL C:\RMANBACKUPS\DelBackupsets.txt
SELECT 'connect target internal/eh458lb@brutweb' FROM dual ;
SELECT 'connect catalog rman/rman@Reccatdb' FROM dual ;
SELECT 'allocate channel for maintenance type disk;' FROM dual ;
SELECT 'change backupset '||bs_key||' crosscheck;'
FROM rc_backup_set, rc_database
WHERE trunc(completion_time) <= trunc(SYSDATE) - 14
AND status = 'A'
AND rc_database.db_key=rc_backup_set.db_key
AND rc_database.name = 'SID9' ;
select 'delete expired backup;' from dual;
SELECT 'release channel;' FROM dual ;
SELECT 'exit' FROM dual ;
SPOOL off
exit
Thanks for your help.
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
|