Restore SAP Backups using RMAN
Hi
we are trying to do a desaster recovery test for SAP on Oracle. After having done successful backups the sap admin tries to recover the oracle database based on the backups we did with the brtools. When you to a list backup of database we get the correct output. When we try to do a validate or a restore command based on the tags, backup sets or timestamps we get the following issue:
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
581 Full 57.06G SBT_TAPE 00:14:26 08-MAR-11
BP Key: 581 Status: AVAILABLE Compressed: NO Tag: BEFJWXKQ
Handle: MI1001_befjwxkq.700_1 Media:
List of Datafiles in backup set 581
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 153016816 08-MAR-11 /oracle/db/MI1/sapdata5/system_1/system.data1
2 Full 153016816 08-MAR-11 /oracle/db/MI1/sapdata6/undo_1/undo.data1
4 Full 153016816 08-MAR-11 /oracle/db/MI1/sapdata1/sr3_1/sr3.data1
6 Full 153016816 08-MAR-11 /oracle/db/MI1/sapdata3/sr3_3/sr3.data3
8 Full 153016816 08-MAR-11 /oracle/db/MI1/sapdata1/sr3700_1/sr3700.data1
10 Full 153016816 08-MAR-11 /oracle/db/MI1/sapdata3/sr3700_3/sr3700.data3
RMAN> validate backupset 581;
using channel ORA_SBT_TAPE_1
using channel ORA_DISK_1
channel ORA_SBT_TAPE_1: starting validation of datafile backupset
channel ORA_SBT_TAPE_1: reading from backup piece MI1001_befjwxkq.700_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of validate command on ORA_SBT_TAPE_1 channel at 03/08/2011 22:11:40
ORA-19870: error reading backup piece MI1001_befjwxkq.700_1
ORA-19507: failed to retrieve sequential file, handle="MI1001_befjwxkq.700_1", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Backup file <MI1001_befjwxkq.700_1> not found in NetBackup catalog
During the rman restore of the SAP backup:
RMAN> run {
2> allocate channel t1 type 'SBT_TAPE';
3> allocate channel t2 type 'SBT_TAPE';
4> send 'NB_ORA_POLICY=SAP_MI1_ORACLE, NB_ORA_SERV=przlnbm001';
5> restore database from tag 'BEFITXUP';
6> }
allocated channel: t1
channel t1: sid=2492 instance=MI1001 devtype=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 7.0 (2010010419)
allocated channel: t2
channel t2: sid=2491 instance=MI1001 devtype=SBT_TAPE
channel t2: Veritas NetBackup for Oracle - Release 7.0 (2010010419)
sent command to channel: t1
sent command to channel: t2
Starting restore at 02-MAR-11
channel t1: starting datafile backupset restore
channel t1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/db/MI1/sapdata5/system_1/system.data1
restoring datafile 00002 to /oracle/db/MI1/sapdata6/undo_1/undo.data1
restoring datafile 00004 to /oracle/db/MI1/sapdata1/sr3_1/sr3.data1
restoring datafile 00006 to /oracle/db/MI1/sapdata3/sr3_3/sr3.data3
restoring datafile 00008 to /oracle/db/MI1/sapdata1/sr3700_1/sr3700.data1
restoring datafile 00010 to /oracle/db/MI1/sapdata3/sr3700_3/sr3700.data3
channel t1: reading from backup piece MI1001_befitxup.604_1
channel t2: starting datafile backupset restore
channel t2: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /oracle/db/MI1/sapdata5/sysaux_1/sysaux.data1
restoring datafile 00005 to /oracle/db/MI1/sapdata2/sr3_2/sr3.data2
restoring datafile 00007 to /oracle/db/MI1/sapdata4/sr3_4/sr3.data4
restoring datafile 00009 to /oracle/db/MI1/sapdata2/sr3700_2/sr3700.data2
restoring datafile 00011 to /oracle/db/MI1/sapdata4/sr3700_4/sr3700.data4
restoring datafile 00012 to /oracle/db/MI1/sapdata5/sr3usr_1/sr3usr.data1
restoring datafile 00013 to /oracle/db/MI1/sapdata6/undo_2/undo_2.data
channel t2: reading from backup piece MI1001_befitxup.605_1
ORA-19870: error reading backup piece MI1001_befitxup.604_1
ORA-19507: failed to retrieve sequential file, handle="MI1001_befitxup.604_1", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Backup file <MI1001_befitxup.604_1> not found in NetBackup catalog
ORA-19870: error reading backup piece MI1001_befitxup.605_1
ORA-19507: failed to retrieve sequential file, handle="MI1001_befitxup.605_1", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Backup file <MI1001_befitxup.605_1> not found in NetBackup catalog
failover to previous backup
Any idea
Thanks
Peter
There is a difference in policy type using Oracle RMAN or SAP RMAN. Oracle is using type 4 and SAP uses type 17. Make sure you use SAP brtools or RMAN, but don't mix them. If you do a bpimagelist of the object in question field 8 of the IMAGE line will show you the recorded client type.
http://www.symantec.com/docs/TECH5584
Update:
Also set the Netbackup variables when restoring using brtools:
setenv NB_ORA_SAP=dummy (force client type 17)
setenv SAP_CLIENT={client}
setenv NB_ORA_CLIENT={client}
init{SID}.sap
backup_dev_type = rman_util
rman_filesperset = 64
rman_parms = "BLKSIZE=65536 ENV=(NB_ORA_SAP=dummy, SAP_CLIENT={client}, NB_ORA_CLIENT={client})"
util_par_file = init{SID}.utl