Unix Technical Forum

Deleting in RMAN

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 ...


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-24-2008, 01:11 PM
amerar@iwc.net
 
Posts: n/a
Default Deleting in RMAN


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 01:12 PM
amerar@iwc.net
 
Posts: n/a
Default Re: Deleting in RMAN


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-24-2008, 01:12 PM
Jim
 
Posts: n/a
Default Re: Deleting in RMAN

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-24-2008, 01:12 PM
amerar@iwc.net
 
Posts: n/a
Default Re: Deleting in RMAN


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-24-2008, 01:12 PM
Kenneth Koenraadt
 
Posts: n/a
Default Re: Deleting in RMAN

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




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-24-2008, 01:12 PM
amerar@iwc.net
 
Posts: n/a
Default Re: Deleting in RMAN

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-24-2008, 01:12 PM
Kenneth Koenraadt
 
Posts: n/a
Default Re: Deleting in RMAN

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-24-2008, 01:12 PM
amerar@iwc.net
 
Posts: n/a
Default Re: Deleting in RMAN


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-24-2008, 01:12 PM
amerar@iwc.net
 
Posts: n/a
Default Re: Deleting in RMAN


WOW!

After some serious searching I finally found it.

Take a look at the script prgrmanc.sql in the $ORACLE_HOME/rdbms/admin
directoy. It would be nice if these things were documented!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-24-2008, 01:12 PM
Sybrand Bakker
 
Posts: n/a
Default Re: Deleting in RMAN

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
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 09:46 AM.


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