This is a discussion on Deleting in RMAN within the Oracle Database forums, part of the Database Server Software category; --> Hi, We are running RMAN in 8i (8.1.7.4). Is there a way to report on backups that are obsolete ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, We are running RMAN in 8i (8.1.7.4). Is there a way to report on backups that are obsolete or not needed, and delete all of them in one command? Or, do I need to delete each piece individually? I see a lot of documentation on RMAN, but nothing that really tells me if there a command to do it all. Thanks, Arthur |
| |||
| As an addendum, I ran a 'report obsolete orphan' command and received the following output. I'm trying to see how I can delete 'datafile copies'. RMAN> report obsolete orphan; RMAN-03022: compiling command: report Report of obsolete backups and copies Type Key Completion Time Filename/Handle -------------------- ------ ------------------ -------------------- Datafile Copy 14316 02-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 14351 02-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 15064 03-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 15101 03-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 21341 04-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 21381 04-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlf |
| |||
| On 5 May 2005 08:24:15 -0700, amerar@iwc.net wrote: > >Hi, > >We are running RMAN in 8i (8.1.7.4). Is there a way to report on >backups that are obsolete or not needed, and delete all of them in one >command? Or, do I need to delete each piece individually? > >I see a lot of documentation on RMAN, but nothing that really tells me >if there a command to do it all. > >Thanks, > >Arthur "delete obsolete" works for me. |
| |||
| I get this: RMAN> delete obsolete; RMAN-00571: ================================================== ========= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ================================================== ========= RMAN-00558: error encountered while parsing input commands RMAN-01005: syntax error: found "obsolete": expecting one of: "expired, script" RMAN-01007: at line 1 column 8 file: standard input RMAN-00571: ================================================== ========= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ================================================== ========= RMAN-00558: error encountered while parsing input commands RMAN-01005: syntax error: found ";": expecting one of: "allocate, alter, beginline, catalog, change, connect, create, crosscheck, configure, debug, delete, drop, exit, endinline, host, {, library, lis t, mount, open, print, register, release, replace, report, renormalize, reset, resync, rman, rpct6Cą " RMAN-01007: at line 1 column 16 file: standard input And it does not work within a run bracket either: RMAN> run { 2> delete obsolete; RMAN-00571: ================================================== ========= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ================================================== ========= RMAN-00558: error encountered while parsing input commands RMAN-01005: syntax error: found "delete": expecting one of: "allocate, alter, backup, beginline, cat alog, change, copy, duplicate, debug, execute, endinline, host, mount, open, plsql, recover, release , replicate, restore, resync, set, setlimit, sql, switch, startup, shutdown, send, validate" RMAN-01007: at line 3 column 1 file: standard input |
| |||
| On 5 May 2005 08:24:15 -0700, amerar@iwc.net wrote: > >Hi, > >We are running RMAN in 8i (8.1.7.4). Is there a way to report on >backups that are obsolete or not needed, and delete all of them in one >command? Or, do I need to delete each piece individually? > >I see a lot of documentation on RMAN, but nothing that really tells me >if there a command to do it all. > >Thanks, > >Arthur > Hi Arthur, In 8i you need to delete them individually, yes. In 9i and above it's as simple as e.g. RMAN>delete obsolete recovery window of 7 days; Deletes all backup pieces not needed for recovery within the last week. RMAN is greatly enhanced in 9i, e.g. it gives you restartable backups, restartable restores, block media recovery and a more frindly syntax, just to mention a few things. Another good reason to upgrade... - Kenneth Koenraadt |
| |||
| Hi Ken, Delete then individually? How do I identify them? They all have the same name.... RMAN> report obsolete orphan; RMAN-03022: compiling command: report Report of obsolete backups and copies Type Key Completion Time Filename/Handle -------------------- ------ ------------------ -------------------- Datafile Copy 14316 02-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 14351 02-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 15064 03-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 15101 03-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 21341 04-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile Datafile Copy 21381 04-MAY-05 /u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile |
| |||
| On 5 May 2005 11:16:47 -0700, amerar@iwc.net wrote: >Hi Ken, > >Delete then individually? How do I identify them? They all have the >same name.... > >RMAN> report obsolete orphan; > >RMAN-03022: compiling command: report >Report of obsolete backups and copies >Type Key Completion Time Filename/Handle >-------------------- ------ ------------------ -------------------- >Datafile Copy 14316 02-MAY-05 >/u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile >Datafile Copy 14351 02-MAY-05 >/u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile >Datafile Copy 15064 03-MAY-05 >/u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile >Datafile Copy 15101 03-MAY-05 >/u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile >Datafile Copy 21341 04-MAY-05 >/u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile >Datafile Copy 21381 04-MAY-05 >/u02/backup/mpcpilot/rman_backup/backup_mpcpilot_ctlfile > You identify them by their primary key as listed : change datafilecopy 14316,14351,15064,15101,21341,21381 delete; - Kenneth Koenraadt |
| |||
| Hi Ken, That is not working: RMAN> change datafilecopy 14316,14351,15064,15101,21341,21381 delete; RMAN-03022: compiling command: change RMAN-03024: performing implicit full resync of recovery catalog RMAN-03023: executing command: full resync RMAN-08002: starting full resync of recovery catalog RMAN-08004: full resync complete RMAN-03026: error recovery releasing channel resources RMAN-00571: ================================================== ========= RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ================================================== ========= RMAN-03002: failure during compilation of command RMAN-03013: command type: change RMAN-06004: ORACLE error from recovery catalog database: RMAN-20230: datafile copy not found in the recovery catalog |
| ||||
| On 5 May 2005 13:37:54 -0700, amerar@iwc.net wrote: >Take a look at the script prgrmanc.sql in the $ORACLE_HOME/rdbms/admin >directoy. It would be nice if these things were documented! IIRC it is. However, most people don't read documentation. -- Sybrand Bakker, Senior Oracle DBA |