Re: Catalog RMAN backups on Tape?

From: Robert Freeman <robertgfreeman_at_yahoo.com>
Date: Tue, 26 Jan 2010 08:32:57 -0800 (PST)
Message-ID: <20495.92146.qm_at_web113211.mail.gq1.yahoo.com>


The key with dbms_backup_restore is that you need to know the piece names you are dealing with. I know there is a way with Netbackup to get these names (I've never done it but I've had an administrator do it for me). Here is an example of restoring a control file using Tivoli and dbms_backup_restore that I did in April of this year..... Other restores (ie backupsets) are similar.


-- PL/SQL to restore control file from Tivoli
-- Assumes:
-- 1. Tivoli setup properly on machine.
-- 2. You have the file name (Dan was able to extract file names for us).
-- 3. Instance must be started (not mounted or open).

DECLARE
devtype varchar2(256);
done boolean;
BEGIN
-- Makes the connection to the MML storage device. Note the TDPO file needs to be created.
devtype
:= dbms_backup_restore.DeviceAllocate (type =>'SBT_TAPE', params
=>'ENV=(TDPO_OPTFILE=/opt/oracle/backup/a004/rman/tdpo_a004.opt)',
ident =>'RESTORE_CFILE' );
dbms_backup_restore.RestoreSetDatafile;
-- This is where you set the restore location.
dbms_backup_restore.RestoreControlfileTo(cfname=>'/tmp/restore_control.ctl');
--
This is where you actually restore the file. Note in this case we are
restoring from a backup set piece that is a control file autobackup.
dbms_backup_restore.RestoreBackupPiece (done=>done, handle =>'c-2078049061-20090427-00');
dbms_backup_restore.DeviceDeallocate;
END;
/



RF



 Robert G. Freeman
Oracle ACE
Ask me about on-site Oracle Training! RMAN, DBA, Tuning, you name it!
Author:
Oracle Database 11g RMAN Backup and Recovery (Oracle Press) - ON ITS WAY SOON!
OCP: Oracle Database 11g Administrator Certified Professional Study Guide (Sybex)
Oracle Database 11g New Features (Oracle Press)
Oracle Database 10g New Features (Oracle Press)
Other various titles
Blog: http://robertgfreeman.blogspot.com
Check out my new blog series on installing Oracle Database 11gR2 on Windows using VMWare!




________________________________
From: Thomas Roach <troach_at_gmail.com>
To: Brandon.Allen_at_oneneck.com
Cc: "sims_at_suu.edu" <sims_at_suu.edu>; "oracle-l_at_freelists.org" <oracle-l@freelists.org>
Sent: Tue, January 26, 2010 8:42:55 AM
Subject: Re: Catalog RMAN backups on Tape?

Thanks to Robert, I was able to get the old entries.

I restored an old copy of the control file and then that had entries for what I needed. On another server I am going to restore the system tablespace, spfile, and the tablespace of the table I need to export. I will then export it and blow away the restored DB.

Please continue on with this conversation. Maybe I can try something with dbms_backup_restore with device type sbt?


On Tue, Jan 26, 2010 at 10:36 AM, Allen, Brandon <Brandon.Allen_at_oneneck.com> wrote:

>
>
>
>
>
>Hi April,
>1)     
>Yes, you can with dbms_backup_restore – there have been a few mentions of that already on this thread
>2)     
>Yes, it’s the MML layer that reads & writes to the tape
>a.      
>Not sure about your second question if they are retrievable – maybe that was for the OP?
>3)     
>I don’t put KEEP on anything, we manage retentions centrally in Netbackup here and I run crosscheck and delete expired on a monthly basis to prevent
> overgrowth of the RMAN catalog, but I also regularly backup my controlfile (autobackup in 9i+) and my recovery catalog so I have something to fall back on in case I accidentally delete the wrong records somehow.
>Regards,
>Brandon
> 
>________________________________
 Privileged/Confidential Information may be contained in this message or attachments hereto. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions
> and other information in this message that do not relate to the official business of this company shall be understood as neither given nor endorsed by it.
> 


-- 
Thomas Roach
813-404-6066
troach_at_gmail.com

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jan 26 2010 - 10:32:57 CST

Original text of this message