Re: Catalog RMAN backups on Tape?
Date: Tue, 26 Jan 2010 11:51:20 -0500
Message-ID: <b86ffce61001260851j458c4919q620ca623ac11d1e8_at_mail.gmail.com>
Also, if you use autobackups, and you do not have your spfile, controlfile or catalog available or missing entries, you can do the following if you have the tape mounted and scanned. You will need to allow other clients to do the restore if you want to do it there. I think the term used is alternative restore?
rman target / nocatalog
set DBID 1234567890;
startup nomount
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c2 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c3 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c4 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
RESTORE UNTIL TIME "to_date('14-DEC-09 23:00','dd-mon-yy hh24:mi')" SPFILE
TO PFILE '/home/oracle/initdb1.ora' FROM AUTOBACKUP maxdays 1;
SHUTDOWN ABORT;
}
STARTUP FORCE NOMOUNT PFILE='/home/oracle/initdb1.ora';
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c2 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c3 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c4 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
RESTORE UNTIL TIME "to_date('14-DEC-09 23:00','dd-mon-yy hh24:mi')"
CONTROLFILE FROM AUTOBACKUP maxdays 1;
ALTER DATABASE MOUNT;
RELEASE CHANNEL c1,c2,c3,c4;
}
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c2 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c3 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
ALLOCATE CHANNEL c4 DEVICE TYPE 'sbt_tape' PARMS
'SBT_LIBRARY=/u01/app/oracle/product/10.2.0/db_1/lib/libobk.so
ENV=(NB_ORA_SERV=netbackup_master_server_name,NB_ORA_CLIENT=oracle_server_name,NB_ORA_POLICY=nb_oracle_policy_name)';
SET UNTIL SCN 22936587811;
RESTORE DATABASE;
RECOVER DATABASE;
release channel c1; release channel c2; release channel c3; release channel c4;
}
On Tue, Jan 26, 2010 at 11:42 AM, Allen, Brandon <Brandon.Allen_at_oneneck.com>wrote:
> Here’s an example of the Netbackup command (bplist):
>
>
>
> unx01.baanprd /opt/oracle ->bplist -t 4 -k <YOUR_policy_name> -l -s
> 1/25/2010 -e 1/26/2010 -R /
>
> -rw------- oracle oracle 12582912 Jan 25 21:21
> /c-18889999-20100125-09
>
> -rw------- oracle oracle 2359296 Jan 25 21:18
> /baanprd_al_52855_1_709244222
>
> -rw------- oracle oracle 3383296K Jan 25 21:15
> /baanprd_db_52852_1_709243545
>
>
>
> And, here is the related command (bpclimagelist) that you use to check the
> retention settings in Netbackup:
>
>
>
> unx01.baanprd /opt/oracle ->bpclimagelist -t ANY -policy <YOUR_policy_name>
> -ct 4 -s 1/25/2010 -e 1/26/2010
>
> Backed Up Expires Files KB C Sched Type Policy
>
> ---------------- ---------- -------- ----------- - ------------
> ------------
>
> 01/25/2010 21:20 02/08/2010 5 12320 N User Backup
> TAR_DP-Oracle-BAANPRD-hot
>
> 01/25/2010 21:17 02/08/2010 5 2336 N User Backup
> TAR_DP-Oracle-BAANPRD-hot
>
> 01/25/2010 21:07 02/08/2010 5 3383328 N User Backup
> TAR_DP-Oracle-BAANPRD-hot
>
>
>
> Note that these commands are pretty picky so you have to get them just
> right (e.g. policy name is case-sensitive, must have client and server
> configured correctly, or set them correctly with command-line parameters) or
> they’ll just return “EXIT STATUS 227: no entity was found”.
>
>
>
> Also, the bpclimagelist command is the *client* version of bpimagelist,
> and I think it’s only referred to as bpimagelist in the documentation.
>
>
>
> Regards,
>
> Brandon
>
>
>
> *From:* Robert Freeman [mailto:robertgfreeman_at_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
>
>
>
> ------------------------------
> 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-lReceived on Tue Jan 26 2010 - 10:51:20 CST