Table of contents |
Related Topics |
Choosing the Restore Destination Restoring to a Different Client (Cross Machine Restore) Cross Machine Restore from CommCell Console Cross Machine Restore Using util_file Interface from Command Line Cross Machine Restore Using rman_Util Interface from Command Line Cross Client Restore to a Different SID Name Using BRRESTORE from Command Line Cross Client Restore to a Different SID Name Using BRRECOVER from Command Line Restoring Individual Data Files/Table Spaces Restoring with Specific Log Time Restoring with Log Serial Number Restoring Data From a Specific Time Range Browsing Data From Before the Most Recent Full Backup |
Capabilities and Required Actions Provides comprehensive information on licensing. Provides comprehensive information on running jobs from the command line. |
When restoring SAP for Oracle data, it is important to consider the backup type that was originally performed.
The following table illustrates the types of restores available for each backup type:
Backup Type |
Restore Level |
Notes |
Offline Backup | Restore Entire Database Recover Database |
Since the database is offline and is consistent, there is no need for logs. |
Online Backup | Restore Entire Database Restore Individual Data files/Table spaces Restore Archive Logs Restore Control File Point-In-Time Restores |
Control file restore can happen only when the database is in NOMOUNT mode. |
Selective Online Full Backup | Restore Entire Database Restore Individual Data files/Table spaces Restore Archive Logs Restore Control File Point-In-Time Restores |
Control file restore can happen only when the database is in NOMOUNT mode. |
Archive Log backup | Restore Archive Logs |
The restore operations automatically identifies and uses the same SAP Backup Interface that was used for the backup.
By default, the SAP for Oracle iDataAgent restores data to the client computer from which it originated; this is referred to as an in-place restore. You can also restore the data to another client computer in the CommCell. Keep in mind the following considerations when performing such restores:
The following section enumerates the types of restore destinations that are supported by the SAP iDataAgent.
When restoring data, the SAP for Oracle iDataAgent provides the facility to restore the data to the same path/destination on the client computer from which the data originated; this is referred to as an in-place restore.
All restore levels provide the facility to restore data to a different directory on the client computer from which the data originated; this is referred to as an out-of-place restore to a different path/destination. You can also restore data to a different client computer in the CommCell using the same path/destination. This can include restoring either individual data files or tablespaces, or the entire database to another computer.
Keep in mind the following considerations when performing out-of-place restores:
|
In cases when the original client computer is damaged, you need to restore the SAP for Oracle database to a different host. This is called a cross-machine restore. Whenever you perform such a restore, ensure that the destination machine has sufficient disk space to accommodate the restored database.
Prior to performing a cross-machine restore, do the following:
srcCrossClient
<source client display name in CommCell Console>
brrestore -d util_file -b2 becmmcsy.anf -m /oracle_setup/dbs/init<SID>.ora
brrestore -d util_file -b2 becmmcsy.anf -m /oracle_setup/dbs/init<SID>.sap
Use the following procedure to recover the latest backup which used the util_file interface to a different client computer from the SAP command line.
brrestore -d util_file -b2 \#NULL -m /home/oracle/product/10g/SAPDB/CER/sapbackup/backCER.log, /home/oracle/product/10g/SAPDB/CER/sapbackup/bebwkurt.anf
brrestore -d util_file -b last -m 0
brrestore -d util_file -b last -m all -u /
brrestore -d util_file -b2 \#NULL -m /home/oracle/product/10g/SAPDB/CER/saparch/archCER.log,/home/oracle/product/10g/SAPDB/CER/saparch/aebwlqlg.sve
brrestore -a <From ARCHIVE LOG# - To ARCHIVE LOG#>
Sql> recover database until time <YYYY-MM-DD hh.mm.ss> using backup controlfile until cancel;
sql>alter database open resetlogs
Use the following procedure to recover the latest backup which used the rman_file interface to a different client computer from the SAP command line.
brrestore -d util_file -b2 \#NULL -m /home/oracle/product/10g/SAPDB/CER/sapbackup/backCER.log, /home/oracle/product/10g/SAPDB/CER/sapbackup/bebwkurt.anf
brrestore -d util_file -b2 \#NULL -m /home/oracle/product/10g/SAPDB/CER/saparch/archCER.log,/home/oracle/product/10g/SAPDB/CER/saparch/aebwlqlg.sve
brrestore -d rman_util -b bebynain.anr -m 0 -c force -u / for data restores.
brrestore -d util_file -b2 SAP_1095_406 -m /home/oracle/product/10g/SAPDB/CER/sapreorg/cntrlCER.dbf -u / for log restores.
brrestore -d rman_util -b bebynain.anr -m all -c force -u /
brrestore -d rman_util -a 5 -c force -u /
Sql> recover database until time <YYYY-MM-DD hh.mm.ss> using backup controlfile until cancel;
sql>alter database open resetlogs
Use the following steps to restore to a different SID name using BRRESTORE from Command Line:
|
Example: D:\oracle\product\10.2.0\db_1\database>more initTRD.utl.txt numstreams 4 CvInstanceName Instance001 CvClientName sde-sap1 srcCrossClient sde-sap2 srccrossdbname CER |
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\initCER.sap= =D:\oracle\product\10.2.0\db_1\database
-r d:\param.txt D:\oracle\product\10.2.0\db_1\database |
|
Example: D:\oracle\product\10.2.0\db_1\database>move initCER.sap initTRD.sap |
|
Example: backup_root_dir = D:\oracle\CER\sapbackup |
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\initCER.ora= =D:\oracle\product\10.2.0\db_1\database
-r d:\param.txt D:\oracle\product\10.2.0\db_1\database\initCER.ora=
D:\oracle\product\10.2.0\db_1\database
-i D:\oracle\TRD\sapbackup\.rehkyntp.lst
-t file -p d:\param.txt': -i D:\oracle\TRD\sapbackup\.rehkyntp.lst
-t file -p d:\param.txt ] clientId=219 AppType=61 Failed D:\oracle\product\10.2.0\db_1\database\initCER.ora copy=36 BID=13310 reqBID=13310 afileFlags=4d D:\oracle\product\10.2.0\db_1\database\initCER.ora |
|
Example: D:\oracle\product\10.2.0\db_1\database>move initCER.ora initTRD.ora |
|
Example: control_files = (D:\oracle\trd\sapdata1\cntrl\ctrlCER.ctl, D:\oracle\trd\sapdata2\cntrl\ctrlCER.ctl, D:\oracle\trd\saparch\cntrl\ctrlCER.ctl) |
|
Example: D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba |
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\CER\sapbackup\backCER.log==D:\oracle\TRD\sapbackup
-r d:\param.txt |
|
Example: D:\oracle\TRD\sapbackup>move
backCER.log backTRD.log |
|
Example: D:\scripts>brrestore -d util_file
-b2 \#NULL -m D:\oracle\CER\saparch\archCER.log==D:\oracle\TRD\saparch -r
d:\param.txt |
|
Example: D:\oracle\TRD\saparch>move
archCER.log archTRD.log |
|
|
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\CER\sapbackup\behkctrv.anf==D:\oracle\TRD\sapbackup -r D:\param.txt |
|
brrestore -d util_file -b2 \#NULL -m D:\oracle\CER\saparch\aehkctzc.sve==D:\oracle\TRD\saparch -r D:\param.txt |
|
brrestore -d util_file -b last -m 0 -r D:\param.txt |
|
brrestore -d util_file -m all -b behkctrv.anf -r D:\param.txt |
|
brrestore -d util_file -a 65-75==D:\oracle\TRD\saparch -r D:\param.txt |
|
Perform the below on target machine. SQL> startup mount; ORACLE instance started. Total System Global Area 138412032 bytes Fixed Size 2063992 bytes Variable Size 125829512 bytes Database Buffers 8388608 bytes Redo Buffers 2129920 bytes Database mounted. SQL> alter database backup controlfile to 'D:\oracle\TRD\sapbackup\CNTRLTRD.NEW'; Database altered. SQL> alter database backup controlfile to trace as 'D:\oracle\TRD\sapbackup\control.ora'; Database altered. SQL> |
|
Example: Below case is Cross Client Restore from Online Backup: Now Shutdown DB. |
|
SQL> shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> SQL> STARTUP NOMOUNT ORACLE instance started. Total System Global Area 138412032 bytes Fixed Size 2063992 bytes Variable Size 125829512 bytes Database Buffers 8388608 bytes Redo Buffers 2129920 bytes SQL> CREATE CONTROLFILE SET DATABASE "TRD" RESETLOGS ARCHIVELOG 2 MAXLOGFILES 32 3 MAXLOGMEMBERS 2 4 MAXDATAFILES 254 5 MAXINSTANCES 16 6 MAXLOGHISTORY 1752 7 LOGFILE 8 GROUP 1 ( 9 'D:\ORACLE\TRD\ORIGLOGA\LOG1_M1.DBF', 10 'D:\ORACLE\TRD\MIRRLOGA\LOG1_M2.DBF' 11 ) SIZE 10M, 12 GROUP 2 ( 13 'D:\ORACLE\TRD\ORIGLOGB\LOG2_M1.DBF', 14 'D:\ORACLE\TRD\MIRRLOGB\LOG2_M2.DBF' 15 ) SIZE 10M, 16 GROUP 3 ( 17 'D:\ORACLE\TRD\ORIGLOGA\LOG3_M1.DBF', 18 'D:\ORACLE\TRD\MIRRLOGA\LOG3_M2.DBF' 19 ) SIZE 10M, 20 GROUP 4 ( 21 'D:\ORACLE\TRD\ORIGLOGB\LOG4_M1.DBF', 22 'D:\ORACLE\TRD\MIRRLOGB\LOG4_M2.DBF' 23 ) SIZE 10M 24 -- STANDBY LOGFILE 25 DATAFILE 26 'D:\ORACLE\TRD\SAPDATA1\SYSTEM_1\SYSTEM.DATA1', 27 'D:\ORACLE\TRD\SAPDATA1\UNDO_1\UNDO.DATA1', 28 'D:\ORACLE\TRD\SAPDATA1\SYSTEM_1\SYSAUX.DBF', 29 'D:\ORACLE\TRD\SAPDATA2\CER_1\CER.DATA1', 30 'D:\ORACLE\TRD\SAPDATA3\CERUSR_1\CERUSR.DATA1' 31 CHARACTER SET US7ASCII 32 ; Control file created. |
|
SQL> SQL> SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL; ORA-00279: change 397349 generated at 12/09/2011 22:45:58 needed for thread 1 ORA-00289: suggestion : D:\ORACLE\TRD\SAPARCH\ARC00074_0769082544.001 ORA-00280: change 397349 for thread 1 is in sequence #74 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} AUTO ORA-00279: change 397401 generated at 12/09/2011 22:47:55 needed for thread 1 ORA-00289: suggestion : D:\ORACLE\TRD\SAPARCH\ARC00075_0769082544.001 ORA-00280: change 397401 for thread 1 is in sequence #75 ORA-00278: log file 'D:\ORACLE\TRD\SAPARCH\ARC00074_0769082544.001' no longer needed for this recovery ORA-00279: change 397431 generated at 12/09/2011 22:49:04 needed for thread 1 ORA-00289: suggestion : D:\ORACLE\TRD\SAPARCH\ARC00076_0769082544.001 ORA-00280: change 397431 for thread 1 is in sequence #76 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} AUTO ORA-00308: cannot open archived log 'D:\ORACLE\TRD\SAPARCH\ARC00076_0769082544.001' ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 2) The system cannot find the file specified. ORA-00308: cannot open archived log 'D:\ORACLE\TRD\SAPARCH\ARC00076_0769082544.001' ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 2) The system cannot find the file specified. SQL> alter database open resetlogs; Database altered. SQL> ALTER TABLESPACE PSAPTEMP ADD TEMPFILE 'D:\ORACLE\TRD\SAPDATA1\TEMP_1\TEMP.DATA1' REUSE; Tablespace altered. SQL> |
Prior to performing a cross-client restore to a different SID name using BRRECOVER, do the following:
Use the following steps to restore to a different SID name using BRRECOVER from Command Line:
|
Example: D:\oracle\product\10.2.0\db_1\database>more initTRD.utl.txt numstreams 4 CvInstanceName Instance001 CvClientName sde-sap1 srcCrossClient sde-sap2 srccrossdbname CER |
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\initCER.sap= =D:\oracle\product\10.2.0\db_1\database
-r d:\param.txt D:\oracle\product\10.2.0\db_1\database D:\oracle\TRD\sapbackup\.rehkylvd.lst
-t file -p d:\param.txt': AppType=61 Failed BID=13310 reqBID=13310 afileFlags=4d |
|
Example: D:\oracle\product\10.2.0\db_1\database>move initCER.sap initTRD.sap |
|
Example: backup_root_dir = D:\oracle\CER\sapbackup |
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\product\10.2.0\db_1\database\initCER.ora= =D:\oracle\product\10.2.0\db_1\database
-r d:\param.txt D:\oracle\product\10.2.0\db_1\database\initCER.ora=
D:\oracle\product\10.2.0\db_1\database
-i D:\oracle\TRD\sapbackup\.rehkyntp.lst
-t file -p d:\param.txt': -i D:\oracle\TRD\sapbackup\.rehkyntp.lst
-t file -p d:\param.txt ] clientId=219 AppType=61 Failed D:\oracle\product\10.2.0\db_1\database\initCER.ora copy=36 BID=13310 reqBID=13310 afileFlags=4d D:\oracle\product\10.2.0\db_1\database\initCER.ora |
|
Example: D:\oracle\product\10.2.0\db_1\database>move initCER.ora initTRD.ora |
|
Example: control_files = (D:\oracle\trd\sapdata1\cntrl\ctrlCER.ctl, D:\oracle\trd\sapdata2\cntrl\ctrlCER.ctl, D:\oracle\trd\saparch\cntrl\ctrlCER.ctl) |
|
Example: D:\oracle\product\10.2.0\db_1\database>sqlplus / as sysdba |
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\CER\sapbackup\backCER.log==D:\oracle\TRD\sapbackup
-r d:\param.txt D:\oracle\TRD\sapbackup\.rehkyqtz.lst
-t file -p d:\param.txt': clientId=219 AppType=61 Failed archfilename=D:\oracle\CER\sapbackup\backCER.log copy=35 BID=13310 reqBID=13310 afileFlags=0d |
|
Example: D:\oracle\TRD\sapbackup>move
backCER.log backTRD.log |
|
Example: D:\scripts>brrestore -d util_file
-b2 \#NULL -m D:\oracle\CER\saparch\archCER.log==D:\oracle\TRD\saparch -r
d:\param.txt D:\oracle\TRD\sapbackup\.rehkyscr.lst
-t file -p d:\param.txt': clientId=219 AppType=61 Failed archfilename=D:\oracle\CER\saparch\archCER.log copy=36 BID=13310 reqBID=13310 afileFlags=14d |
|
Example: D:\oracle\TRD\saparch>move
archCER.log archTRD.log |
|
Example: D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\CER\sapbackup\behkctrv.anf==D:\oracle\TRD\sapbackup -r D:\param.txt |
|
brrestore -d util_file -b2 \#NULL -m
D:\oracle\CER\saparch\aehkctzc.sve==D:\oracle\TRD\saparch -r D:\param.txt BR0401I BRRESTORE 7.20 (1) D:\oracle\TRD\sapbackup\.rehkysrd.lst -t
file -p D:\param.txt': clientId=219 AppType=61 Failed archfilename=D:\oracle\CER\sapbackup\behkctrv.anf copy=35 BID=13310
reqBID=13310 afileFlags=0d from
Source machine and restore it.
detail file pertaining to the log backups
D:\oracle\CER\saparch\aehkctzc.sve==D:\oracle\TRD\saparch -r D:\param.txt
D:\oracle\TRD\sapbackup\.rehkytcm.lst -t file -p D:\param.txt': -t file -p D:\param.txt ] clientId=219 AppType=61 Failed archfilename=D:\oracle\CER\saparch\aehkctzc.sve copy=36 BID=13310 reqBID=13310 afileFlags=14d D:\oracle\TRD\saparch\aehkctzc.sve |
|
brrecover -f TRD -t dbpit -n last -c force -r D:\param.txt BR0701I BRRECOVER 7.20 (1) BR0705I Start of database recovery: vehkytgp.dpt 2011-12-14 10.05.35 BR0484I BRRECOVER log file: D:\oracle\TRD\sapbackup\vehkytgp.dpt BR0101I Parameters Name Value oracle_sid TRD oracle_home D:\oracle\product\10.2.0\db_1 oracle_profile D:\oracle\product\10.2.0\db_1\database\initTRD.ora sapdata_home D:\oracle\TRD sap_profile D:\oracle\product\10.2.0\db_1\database\initTRD.sap recov_type dbpit recov_copy_dir D:\oracle\TRD\sapbackup recov_interval 30 scroll_lines 20 backup_dev_type tape system_info Administrator SDE-SAP1 Windows 6.1 Build 7601 Service Pack 1 AMD64 oracle_info CER 10.2.0.4.0 make_info NTAMD64 OCI_10201_SHARE Feb 25 2010 command_line brrecover -f TRD -t dbpit -n last -c force -r D:\param.txt BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0707I Recovery of database: TRD BR0708I BRRECOVER action ID: vehkytgp BR0709I BRRECOVER function ID: dpt BR0710I Recovery type: dbpit BR0134I Unattended mode with 'force' active - no operator confirmation allowed BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0655I Control menu 103 # please decide how to proceed ------------------------------------------------------------------------------- Database point-in-time recovery main menu 1 = Set point-in-time for recovery 2 * Select database backup or flashback 3 * Check the status of database files 4 * Restore control files 5 * Restore data files 6 * Restore split incremental control files 7 * Restore and apply incremental backup 8 * Restore and apply archivelog files 9 * Restore archivelog files and flashback 10 * Open database and post-processing 11 * Exit program 12 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help ------------------------------------------------------------------------------- BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0134I Unattended mode with 'force' active - continuing processing with default reply '1' BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0657I Input menu 104 # please enter/check input values ------------------------------------------------------------------------------- Options for point-in-time recovery of database CER 1 # Database instance of archivelog thread (instance) . [] 2 ~ Last archivelog sequence to apply (last_seq) ...... [99999999] 3 ~ Last system change number to apply (last_scn) ..... [] 4 ~ End point-in-time for recovery (end_pit) .......... [] Standard keys: c - cont, b - back, s - stop, r - refr, h - help ------------------------------------------------------------------------------- BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0134I Unattended mode with 'force' active - continuing processing with default reply 'cont' BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0655I Control menu 103 # please decide how to proceed ------------------------------------------------------------------------------- Database point-in-time recovery main menu 1 + Set point-in-time for recovery 2 = Select database backup or flashback 3 * Check the status of database files 4 * Restore control files 5 * Restore data files 6 * Restore split incremental control files 7 * Restore and apply incremental backup 8 * Restore and apply archivelog files 9 * Restore archivelog files and flashback 10 * Open database and post-processing 11 * Exit program 12 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help ------------------------------------------------------------------------------- BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0134I Unattended mode with 'force' active - continuing processing with default reply '2' BR0699I Reading log file D:\oracle\TRD\sapbackup\backTRD.log ... BR0350I Backup utility will be inquired for backup confirmation BR0280I BRRECOVER time stamp: 2011-12-14 10.05.35 BR0229I Calling backup utility with function 'inquire'... BR0278I Command output of 'backint -u TRD -f inquire -i D:\oracle\TRD\sapbackup\.vehkytgp.lst -t file -p D:\param.txt -c': D:\oracle\TRD\sapbackup\.vehkytgp.lst -t file -p D:\param.txt -c ] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed D:\oracle\TRD\sapbackup\behkctrv.anf - log file incomplete (this is
OK if the log file was restored) D:\param.txt -m 0 -c force -l E] D:\param.txt -m 0 -c force -l E' 'D:\oracle\TRD', backup behkctrv.anf 'D:\oracle\CER' - log file incomplete (this is OK if the log file was restored) will be restored into the new sapdata_home D:\oracle\TRD D:\oracle\TRD\sapbackup\.rehkytgx.lst -t file -p D:\param.txt -c': D:\oracle\TRD\sapbackup\.rehkytgx.lst -t file -p D:\param.txt -c ] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed archfilename=D:\oracle\CER\sapbackup\CNTRLCER.DBF copy=35 BID=13310 reqBID=13310 afileFlags=0d D:\oracle\TRD\sapbackup\CNTRLCER.DBF go back to repeat the last action D:\param.txt -m all -c force -l E] D:\param.txt -m all -c force
-l E' 'D:\oracle\TRD', backup
behkctrv.anf 'D:\oracle\CER' - log file incomplete (this is OK if the log file was restored) into the new sapdata_home D:\oracle\TRD D:\oracle\TRD\sapbackup\.rehkytik.lst -t file -p D:\param.txt -c': D:\oracle\TRD\sapbackup\.rehkytik.lst -t file -p D:\param.txt -c ] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed total number of collect files generated. client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed nextFile=<D:\ORACLE\CER\SAPDATA2\CER_1\CER.DATA1> nextFile=<D:\ORACLE\CER\SAPDATA3\CERUSR_1\CERUSR.DATA1> nextFile=<D:\ORACLE\CER\SAPDATA1\UNDO_1\UNDO.DATA1> nextFile=<D:\ORACLE\CER\SAPDATA1\SYSTEM_1\SYSAUX.DBF> nextFile=<D:\ORACLE\CER\SAPDATA1\SYSTEM_1\SYSTEM.DATA1> ignore them or go back to
repeat the last action 'D:\oracle\TRD\sapbackup\vehkytgp\dummy.redo'
created 'D:\oracle\TRD\sapbackup\vehkytgp\dummy.redo'
dropped D:\oracle\TRD\sapbackup\.rehkytuy.lst
-t file -p D:\param.txt -c':
client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed
client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed nextFile=<D:\oracle\cer\saparch\ARC00074_0769082544.001> D:\oracle\TRD\saparch\ARC00074_0769082544.001 nextFile=<D:\oracle\cer\saparch\ARC00075_0769082544.001> D:\oracle\TRD\saparch\ARC00075_0769082544.001 not deleting them can lead to
space shortage in archive directory not deleting them can lead to
space shortage in archive directory ONLINE 4 52428800 2011-12-05
10.33.15 176706 3 FILE NOLINK ONLINE 5 10485760 2011-12-05
10.33.15 176736 3 FILE NOLINK ONLINE -1 104865792
2011-12-14 10.13.03 397522 3 FILE NOLINK ONLINE 2 104857600 2011-12-05
10.02.42 8337 3 FILE NOLINK ONLINE 3 104857600 2011-12-05
10.02.45 8460 3 FILE NOLINK SYSTEM 1 419430400 2011-12-05
10.02.36 7 3 FILE NOLINK 2011-12-14 10.12.52 397432 3
FILE NOLINK 2011-12-14 10.12.52 397432 3
FILE NOLINK 0000-00-00 00.00.00 0 3 FILE
NOLINK 0000-00-00 00.00.00 0 3 FILE
NOLINK 0000-00-00 00.00.00 0 3 FILE
NOLINK 0000-00-00 00.00.00 0 3 FILE
NOLINK 0000-00-00 00.00.00 0 3 FILE
NOLINK 0000-00-00 00.00.00 0 3 FILE
NOLINK 2011-12-14 10.12.52 397432 3
FILE NOLINK 2011-12-14 10.12.52 397432 3
FILE NOLINK 2011-12-14 10.12.52 397432 3
FILE NOLINK D:\oracle\TRD\sapbackup\vehkytgp\CNTRLTRD.NEW
11288576 created during or after the
selected backup behkctrv.anf 2011-12-09 22.45.55 ... after the selected backup
behkctrv.anf 2011-12-09 22.45.55 after the selected backup
behkctrv.anf 2011-12-09 22.45.55 D:\oracle\TRD\sapbackup\vehkytgp\control.sql D:\oracle\TRD\sapbackup\vehkytgp\control.sql |
|
brrecover -f TRD -t reset -c
force -r D:\param.txt - continuing processing with
default reply 'cont' |
|
D:\scripts>brrestore -d util_file -b2 \#NULL -m D:\oracle\CER\sapbackup\behjkmqh.aff==D:\oracle\TRD\sapbackup -r D:\param.txt BR0401I BRRESTORE 7.20 (1) BR0405I Start of file restore: rehlbzlt.rsf 2011-12-15 01.54.13 BR0484I BRRESTORE log file: D:\oracle\TRD\sapbackup\rehlbzlt.rsf BR0280I BRRESTORE time stamp: 2011-12-15 01.54.13 BR0407I Restore of database: TRD BR0408I BRRESTORE action ID: rehlbzlt BR0409I BRRESTORE function ID: rsf BR0415I File for restore using backup utility ID \#NULL: D:\oracle\CER\sapbackup\behjkmqh.aff=D:\oracle\TRD\sapbackup BR0416I 1 file found to restore, size 0.000 MB BR0421I Restore device type: util_file BR0280I BRRESTORE time stamp: 2011-12-15 01.54.13 BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE: c BR0280I BRRESTORE time stamp: 2011-12-15 01.54.16 BR0257I Your reply: 'c' BR0259I Program execution will be continued... BR0280I BRRESTORE time stamp: 2011-12-15 01.54.16 BR0229I Calling backup utility with function 'restore'... BR0278I Command output of 'backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehlbzlt.lst -t file -p D:\param.txt': Setting the Number of streams desired=<1> for 1 File restore. -------------------------- Output of restore --------------------- BI_BACKUP=<PARTIAL> BI_CALLER=<BRRESTORE> BI_REQUEST=<NEW> -------------------------- Parameter Specified -------------------- CvInstanceName=<Instance001> CvClientName=<sde-sap1> numstreams=<1> srccrossclient=<sde-sap2> srccrossdbname=<CER> destdbname=<TRD> -------------------------- backint Command Line -------------------- backintCmd=[backint -u TRD -f restore -i D:\oracle\TRD\sapbackup\.rehlbzlt.lst -t file -p D:\param.txt ] CommServeHostName=satishp CommClientHostName=sde-sap1.idcprodcert.loc Galaxy CommCellID=2 Galaxy ClientID=219 Src Cross Client=<sde-sap2> getInstanceId for InstanceName=[CER] client=[sde-sap1.idcprodcert.loc] clientId=219 AppType=61 Failed Instance=[CER] - May not have been configured. Galaxy SrcCrossClientID=218 Galaxy CrossClientInstanceID=559 Galaxy CrossClientAppType=61 Galaxy CrossClientAppID=2283 Number of streams desired=<1> Number of files to restore=<1> CMDLINE Job Restore has been requested SID=[CER] BkpSet=[default] AppType=[61] Success in getting Job id=14517 Token=<14517:2:1> Success in init with JM Cannot obtain the Index MediaAgent from the Archive Manager.. Attaching CommServer Session AfileNumber=19589, AcommCellId=2 AgroupNumber=22 archfilename=D:\oracle\CER\sapbackup\behjkmqh.aff copy=35 BID=12884 reqBID=12884 afileFlags=0d BR0280I BRRESTORE time stamp: 2011-12-15 01.54.40 #FILE..... D:\oracle\CER\sapbackup\behjkmqh.aff D:\oracle\TRD\sapbackup\behjkmqh.aff #RESTORED. 1021752_12884 Successful restore; 1 File(s); total transferred bytes=11991 Success in sending JMSUCCESS to server Success in sending JMSUCCESS to server BR0280I BRRESTORE time stamp: 2011-12-15 01.54.41 BR0374I 1 of 1 file restored by backup utility BR0230I Backup utility called successfully BR0406I End of file restore: rehlbzlt.rsf 2011-12-15 01.54.41 BR0280I BRRESTORE time stamp: 2011-12-15 01.54.41 BR0402I BRRESTORE completed successfully D:\scripts> |
However, in order to recover a database, you will also need to restore the logs. Both the data and the logs can be restored using the SAP utility or RMAN utility depending on which utility was used for the backup. You can restore the database in-place or out-of-place with the same directory structure and SID name.
If required, you can also restore individual data files or table spaces that was lost or corrupted. However, note that, you can only use the browse and restore method to restore the individual files.
In addition to restoring data files/ table spaces, the SAP for Oracle iDataAgent also enables you to restore the archive logs. Archive logs can be restored along with the data or separately.
Archive logs can be restored from the latest log backups or from log backups from a specific point in time.
Consider the following scenarios:
When restoring based on the log serial number, note the following:
A point in time restore job allows you to restore your database to a specific point in time, and, typically, this point in time would be just before an undesired transaction or update to your database.
When you select the Point in Time option, all necessary backups that are required to restore the database to the indicated time are restored.
brrestore -d util_file -b [detailFileName] -m 0
eg:
brrestore -d util_file -b bebwkurt.anf -m 0
brrestore -d util_file -b [detailFileName] -m all -u /
eg:
brrestore -d util_file -b2 SAP_007_1005 -m
home/oracle/product/10g/SAPDB/CER/saparch/archCER.log,/home/oracle/product/10g/SAPDB/CER/saparch/aebwlqlg.sve
brrestore -d util_file -a <From ARCHIVE LOG#>-<To ARCHIVE LOG#>
sql> recover database until time 'YYYY-MM-DD hh.mm.ss' using backup controlfile until cancel;
sql>alter database open resetlogs;
In certain cases, you might restore the data and then recover the database at a later point of time. To facilitate this capability, SAP for Oracle iDataAgent allows you to perform a recover operation independently.
The system automatically resets the logs and the database. Before you can restore and recover the database to the current time, it is good practice to perform another full backup and wait for it to complete successfully. |
In addition to restores from CommCell Console, you can also perform restores from the Command Line Interface. Note that backups taken from CommCell Console can be restored via Command Line and vice versa. However, backups taken from a previous version of CommCell Console can be restored only from the Command Line.
You can perform command line restores using one of the following methods:
However, SAP command line and BRTools are the most preferred methods for performing command line restores.
You can use qcommands to perform restore operations from the command line interface. You can also integrate these qcommands into your own scripts or scheduling programs. In addition, you can also generate scripts for specific operations from the CommCell Console using the Save As Script option. These scripts can later be executed using the commands from the command line interface.
For comprehensive information on command line restores, refer to the Command Line Interface documentation.
For the SAP for Oracle iDataAgent, data is restored using the BRRESTORE command. From the SAP command line, these programs can restore the following:
Database data files, control files, and archive log files that were saved using BRBACKUP
Non-database files that were saved using BRBACKUP
Profiles and logs
To restore data from the SAP command line using the BRRESTORE program:
When performing command line restores, note the following:
Customize init<SID>.utl and
init<SID>.sap. If init<SID>.sap
file do not exist under
$ORACLE_HOME/dbs DIR,
you need to create an empty init<SID>.sap file (For
example: touch $ORACLE_HOME/dbs/init<SID>.sap), and then restore it using
the following command:
Brrestore -d util_file -b2 \#NULL -m $ORACLE_HOME/dbs/init<SID>.sap
Database should be in MOUNT mode before you begin a restore operation from command line. If you are restoring logs only from the command line, the database could be in OPEN Mode. If you are restoring the Control File, the database should be in the NOMOUNT mode.
brrestore -b2 <archive file ID> -m <control file path>
For example,
brrestore -b2 SAP_1445_18400 -m /u01/app/oracer/product/10.2.0/db_1/CER/sapreorg/cntrlCER.dbf
If you want to restore an entire database, use the following command:
brrestore -d util_file -b last -m all
After a restore, you need to manually recover the database.
Whenever you restore the control file from Command Line Interface and manually recover the database, you need to reset the logs prior to opening the database. Refer Reset Logs for detailed information on resetting logs.
For SAP for Oracle iDataAgent, Job Details may display the name defaultDummyInstanceForSAP as the SID when a restore is run from the command line.
Examples:
Perform a full restore of the database using the util_file interface
brrestore -d util_file -m all -b beeonnpz.anf -u /
Perform a log only restore
brrestore -d util_file -a 1119-1121 -u /
Perform a control file restore
brrestore -b2 SAP_1020140_4613 -m /u01/app/oracer/product/10.2.0/db_1/CER/sapreorg/cntrlCER.dbf
Some of the command options commonly used by BRRestore command are listed below
Option | Argument | Values |
-a | -archive | [<DB_SID>,<log_no>[=<rest_dest>] |
-b | -backup | <log_name>|last |
-b2 | -backup2 | <util_backup_id>|#NULL |
-c | -confirm | force |
-d | -device | util_file|rman_util |
-m | -mode | all|full|incr| |
-o | -output | dist|time[,time|dist] |
If your restores will be using the SAP utility files, be sure to customize the init<SID>.utl and init <SID>.sap files by adding values for the following parameters. Note that some parameters are optional.
Ensure that the iDataAgent is installed on both the source computer and the target computer, and run the restore on the target computer. |
For example:
CvInstanceName
Instance001
CvClientName
bumblebee
numstreams
1
CV_restCopyPrec
1
srcCrossClient
hotdog
Use the following steps to run an RMAN restore from auxiliary copy using the SAP command line:
1. | Set the CV_restCopyPrec parameter in the init <SID>.sap file. | For example: rman_parms="BLKSIZE=1048576,SBT_LIBRARY=/opt/calypso/Base/libobk.so,ENV=(CvClientName=tigersnap2,CvInstanceName=Instance001,CV_restCopyPrec=4)" |
2. | Run the restore command from the SAP command line. | For example: brrestore -d rman_util -b last -m all |
When you restore from consistent online backups, the offline redo log files of the same backup can be imported.
Use the following steps to restore the data, logs, and the control file from a consistent online backup:
1. | Include the instance name and client name parameters in the init.utl file. | For example:
CvInstanceName Instance001 CvClientName client1 |
2. | Run the restore command from the SAP command line. | For example: brrestore -d util_file -m full -b begqxybq.fnf |
Use the following steps to restore only the data from a consistent online backup:
1. | Include the instance name and client name parameters in the init.utl file. | For example:
CvInstanceName Instance001 CvClientName client1 |
2. | Run the restore command from the SAP command line. | For example: brrestore -d util_file -m full -b begqxybq.fnf |
Use the following steps to restore only the logs from a consistent online backup:
1. | Include the instance name and client name parameters in the init.utl file. | For example:
CvInstanceName Instance001 CvClientName client1 |
2. | Run the restore command from the SAP command line. | For example: brrestore -d util_file -b2 1020458_18262 -m /database/oracle/10GR2/CER/saparch/1_102_756928037.dbf |
In addition to SAP command line, you can also use the BRTools user interface to perform backup and restore operations. BRTools is an easy-to-use interface that provides menus to run different types of backup or restore operations.
BACKINT is another interface program that internally uses the SAP BRTools to communicate with the SAP Oracle Database and perform backup and restore operations. It also allows you to inquire about backup requests and executes them.
backint -u <user_id> [-f <function>] [-t <type>] [-p <par_file>] [-i <in_file>] [-o <out_file>] [-c]
-u | Specifies the BACKINT user ID. Normally, this will be the database instance name (ORACLE_SID) | None |
-f | Specifies the operation (backup, restore, or inquire) | backup |
-t | Specifies the backup type: file or file_online | file |
-p | Specifies the backup utility
parameter file containing the parameters that determine the backup
procedure specific to the backup utility. The SAP BRtools specify the location of this utility parameter file in their own parameter file (parameter util_par_file), but they do not evaluate its contents. |
none |
-i | Specifies the input file (text file) that defines the files and directories to be backed up.
|
By default, the data is read from the standard input. |
-o | Specifies the output text file that will contain the processing messages and the results of the operation. | By default, the messages are displayed on the standard output. |
-c | unattended mode (does not involve user interaction) | attended mode |
The BACKINT interface allows you to restore files based on the user ID name, backup ID, or file name as specified in the input file. For example, if you include the tag #NULL in front of the file name, the specific file from the most recent backup will be restored.
backint -u C11 –f restore -t file –p /oracle/CER/dbs/initC11.utl -i dummy -o dummy.out
The output file looks like below:
Program: backint
Parameters:
Client node: RC1
Function: backup
Input File: dummy
Output File: dummy.out
Profile: /oracle/CER/dbs/initCER.utl
Parallel sessions: 1
BKI0032I: Number of bytes to restore: 0.012 MB.
Restore process started ...
#RESTORED SAP___9409020458 /oracle/CER/sapdata1/user1i_1/user1i.data1
BKI0023I: Bytes restored so far: 0.012 MB (100.0%).
The option to browse the backup data provides the facility to view and selectively restore/recover the data that was backed up.
The browse option can be invoked from the client, agent, or instance level depending on the functionality of a given agent.
Depending on the agent, there are several additional options to customize your browse, including:
Use the following steps to browse data:
|
![]() |
To browse data that is older than the most recent full backup specify a Browse Data Before date that pre-dates the full backup. Remember, the Browse Data Before date establishes the ending point of the search. Consequently, using a Browse Data Before date that pre-dates the most recent full backup starts the search in the previous full backup cycle. This is only valid if the data in that full backup cycle has not expired.
Follow the steps given below to browse data that was backed up before a specified time:
|
![]() |
Follow the steps given below to browse data backed up during a specified time interval:
The List Media feature can also be used in a number of other capacities. Refer to the List Media documentation for a complete overview of this feature.
Use the Data Before box to specify the end date and time.
Note that you can use the Specify Browse Time and Exclude Data Before options to list media between a specified date and time range.
The appropriate media is listed in the Media dialog box.
Use the Browse Data Before box to specify the end date and time.
Note that you can use the Specify Browse Time and Exclude Data Before options to list media between a specified date and time range.
The appropriate media is listed in the Media dialog box.
The Restore By Jobs feature provides the facility to select a specific backup job to be restored. This method of restoring data is considerably faster as it reads continuously on the tape and retrieves the data and does not depend on the indexing subsystem to get the seek offsets on the media.
This feature can be used in different scenarios such as the following:
Consider the following when restoring by jobs:
Use the following steps to restore data by jobs.
Once you initiate the restore operation, a restore job is generated in the Job Controller. Jobs can be managed in a number of ways. The following sections provide information on the different job management options available:
Jobs that fail to complete successfully are automatically restarted based on the job restartability configuration set in the Control Panel. This configuration can be changed at any time; however, changes to this configuration will affect all jobs run in the entire CommCell.
It is also possible to override the default CommServe configuration for individual jobs by configuring retry settings when initiating the job. This configuration, however, will apply only to the specific job.
Restore jobs for this Agent are re-started from the beginning. |
If a restore job fails to complete successfully, you can resubmit the job without the need to reconfigure the original job's restore options using the Resubmit Job feature. When a job is resubmitted, all the original options, restore destinations, and other settings configured for the job remain in tact.
The following controls are available for running jobs in the Job Controller window:
Suspend |
Temporarily stops a job. A suspended job is not terminated; it can be restarted at a later time. Only preemptible jobs can be suspended. |
Resume |
Resumes a job and returns the status to Waiting,
Pending, Queued, or Running depending on the availability of resources or
the state of the operation windows and activity control settings.
Restore jobs for this Agent are resumed from the beginning. |
Kill |
Terminates a job. |
These controls can be applied to:
Click Yes when the confirmation prompt appears if you are sure you want to kill the job. The job status may change to Kill Pending for a few moments while the operation completes. Once completed, the job status will change to Killed and it will be removed from the Job Controller window after five minutes.
The job status may change to Suspend Pending for a few moments while the operation completes. The job status then changes to Suspended.
As the Job Manager attempts to restart the job, the job status changes to Waiting, Pending, or Running.
BRTools Error Code | Message | Job Status |
0 | Successful | Completed |
1 | Warnings – all files were processed (for example, backed up or restored) | Completed With Warning |
2 | Canceled during the initialization phase by a user or other signal | Completed With One or More Errors |
3 | Errors occurred during the initialization phase, processing was not started | Completed With One or More Errors |
4 | Canceled by a user or other signal during processing | Completed With One or More Errors |
5 | Started, but not completed because errors occurred during processing | Completed With One or More Errors |
6 | Internal termination | Completed With One or More Errors |
Several additional options are available to further refine your restore operations. These options are available from the Advanced Backup Options window.
To access the Advanced restore Options window:
The following table describes the additional options:
Option | Description | related topic |
Use hardware revert capability if available |
This option allow you to revert the data to the time when the snapshot was created. Selecting this option brings back the entire LUN to the point when the snapshot was created, overwriting all the modifications to data since the snapshot creation. This option is available if the snapshot engine used for SnapProtect Backup supports the revert operation.
|
|
Startup Options |
The Job Manager will use the startup priority setting when allocating the required resources. This is useful if you have jobs that are very important and must complete, or jobs that can be moved to a lower priority.
|
Refer to Job Priority and Priority Precedence. |
Copy Precedence |
When you select Restore from copy precedence option, the system recovers or retrieves data from the selected storage policy copy (Synchronous Copy or Selective Copy). If data does not exist in the specified copy, the data recovery or retrieve operation fails even if the data exists in another copy of the same storage policy. When cleared, (or by default) the system recovers or retrieves data from the storage policy copy with the lowest copy precedence. If the data was pruned from the primary copy, the system automatically recovers or retrieves from the other copies of the storage policy in the lowest copy precedence to highest copy precedence order. Once the data is found, it is recovered or retrieved, and no further copies are checked.
|
Refer to Recovering Data From Copies. |
Data Path Options |
Data Recovery operations use a specific data path (Library, MediaAgent, Drive Pool, and Drive) to perform the restore operations as configured in the CommCell. By default, the system automatically identifies the data path for the restore operations. You can change the data path at the restore level by selecting a specific MediaAgent, library, drive pool or drive in the Advanced Restore Options dialog. The following are some of the important situations where you may need to change the data path:
|
Refer to Change Data Path. |
Alerts |
The Alert option is used for setting up the criteria to raise notifications/alerts
for job statuses such as failure, success, or any other conditions triggered by the
restore job. Adding alerts helps the user or the user group to get the
notification automatically about the status of the restore job.
|
Refer to Alert. |
Reset Database | When you select this option,
a new database incarnation record is created for the new database after
recovering the database.
|
|
Open DB | Once you recover the database,
you can choose whether to open the database after the restore/recovery operation
has completed. Selecting this option will open the database, and enable
the Reset Logs option.
|
|
Reset logs |
This option is available from the Options tab in the Advanced Restore
Options window.
Whenever you restore the control file from Command Line Interface and manually recover the database, you need to reset the logs prior to opening the database. To enable the Reset Logs option, the Open DB checkbox must be selected.
|