Restore SAP Oracle Database Backup To Another SAP System
Restore SAP Oracle Database Backup To Another SAP System
SAP system ?
Example :
STORAGE
== == == == =
Step 1: First, you need to plan for a offline backup of production SAP database and it
should be successful. Make sure that the tapes used for this backup are secure and are
inside the library slots for immediate mounting.
Step 2: Make all the SAP file systems on QTY server like PRD server with same size (or
+1GB % utilize). If filesystems already exist then clean or empty them. Any SAP filesystems
will be in the format of
/oracle/SID/sapdata1
/oracle/SID/orilog1
/oracle/SID/sapreorg
/oracle/SID/saparch1
/oracle/SID/saptrace/usertrace
/oracle/SID/saptrace/background
/oracle/SID/sapcheck
/oracle/SID/sapbackup
Here SID is the Oracle SID - ideally PRD for production & QTY for quality systems. You have
to remove any existing data in these filesystems by using rm -rf command (command
depends on OS).
Step 3: In this step you have to copy all the TDP SAP configuration files from Production
system to the Quality system. The TDP SAP configuration files and their locations are
/oracle/PRD/1*2_64/dbs/initPRD.sap
/oracle/PRD/1*2_64/dbs/initPRD.utl
You need to copy these files and paste them in the same location in the Quality System by
changing their name as shown below
/oracle/QTY/1*2_64/dbs/initQTY.sap
/oracle/QTY/1*2_64/dbs/initQTY.utl
If files with the same name already exists, then rename the old files with another name before
copying above files.
Step 4: In TDP SAP, after the database backup (online & offline) completes it generates
the log file. For offline the log file extension is (.aff) and for online backup the log
file extension is (.anf). Because we are restoring latest offline backup we need to copy the
latest .aff file from production system to quality system. The file location is shown below.
Ln -s /oracle/QTY/ /oracle/PRD
Step 5: From the same location, we also have to copy the backPRD.log file to the same
location in the quality system.
Step 6: Next, we need to change permissions and ownership (dba user) of all the files
which are copied in the above steps.
chown oraqty:dba initQTY.sap initQTY.utl
chmod 777 initQTY.sap initQTY.utl
Step 7: In this step, we need to open initQTY.sap & initQTY.utl files and change the PRD
to QTY. Make sure you change these below important parameters.
In initQTY.sap file
util_par_file=/oracle/QTY/102_64/dbs/initQTY.utl (PRD → QTY)
compress_dir = /oracle/QTY/sapreorg
In initQTY.utl file
CONFIG_FILE /oracle/QTY/102_64/dbs/initQTY.bki (PRD → QTY)
Step 9: Next, we need to authenticate the TDP node with TSM server. This TDP node
name is nothing but the production TDP node name, we have to authenticate PRD TDP node
from QTY system.To do this you have to login using oracle user
su - oraqty
cd /oracle/QTY/102_64/dbs
./backint -p initQTY.utl -f password
or
su - oraqty
cd /oracle/QTY/102_64/dbs
./usr/tivoli/tsm/tdp_r3/ora64/backint -p initQTY.utl -f password
Type the TDP node password and press enter. It should successfully authenticate the
password for the production node through which you have taken the offline backup.
Step 10: Finally, restoring the backup data, you have to login as oracle user and run the
following command to restore whole database.
su - oraqty
cd /oracle/QTY/102_64/dbs
brrestore –m full –b brnnfghrk.aff –p initQTY.sap –c
Note: You can run brrestore utility from anywhere if the environment variable setting is
enabled for this utility. Otherwise you need to create soft link from /usr/sap/QTY/sys/exe/run
to the /oracle/QTY/102_64/dbs directory.
Commands to restore single database and individual archivelog file
Note : Which brrestore command should be used to find the correct brrestore.