You are on page 1of 5

Performing SAP System

password handling is used

Cloning

when

manual

Although this procedure is provided as a reference, SAP documentation should


be used as the primary instructions when cloning SAP systems. For SAP-specific
changes, see also SAP Note 71254. This procedure assumes this environment:

v Two SAP R/3 systems are installed and operating on two different
machines.
v Data Protection for SAP for Oracle is installed and operating on both SAP
R/3 systems.

This procedure describes the tasks necessary to restore an Oracle SID to a


different machine with a different SID. Use the procedure that reflects the
password handling method for the environment. Perform these tasks when
manual password handling (passwordaccess=prompt) is used:If you are using
passwordaccess=prompt, you only need to set the nodename/password in the
initSID.utl file:
1. Create a backup copy of the initSID.utl file on the target system.
2. Copy the initSID.utl file from the source system to the target system.
Rename the file from initSID.utl to inittarget_SID.utl.
3. Edit the initSID.utl file on the target system to reflect all the correct file
and path names, especially for CONFIGFILE and TRACEFILE.
4. As SIDadm user, set the Data Protection for SAP for Oracle password on
the

target system: (UNIX or Linux):


backint -p /oracle/SID/dbs/initSID.utl -f password
(Windows):
backint -p drive:\orant\database\initSID.utl -f password
Issue the password when prompted. On Windows, the profile path can also
be
specified
in
UNC
notation
(for
example:
-p
\\SERVER_A\orant\database\initSID.utl
5. Restore the database according to the SAP recommendation.
6. Reset the initSID.utl file and the password on the target system.

How to restore SAP Oracle database backup to another


SAP system ?
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.
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).

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/102_64/dbs/initPRD.sap
/oracle/PRD/102_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/102_64/dbs/initQTY.sap
/oracle/QTY/102_64/dbs/initQTY.utl
If files with the same name already exists, then rename the old files with
another name before copying above files.

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.
Cy from /oracle/PRD/sapbackup/brnnfghrk.aff and paste it in
/oracle/QTY/sapbackup
filesystem.

5. From the same location, we also have to copy the backPRD.log file to the
same location in the quality system.

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
chown oraqty:dba brnnfghrk.aff backPRD.log
chmod 777 brnnfghrk.aff backPRD.log

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)

8. Next, we need to change the node in the


/usr/tivoli/tsm/client/api/bin64/dsm.sys file. use the same node name
which you have used for taking the production database backup. You have
to make sure that the SERVERNAME in all the files dsm.opt, initQTY.utl and
dsm.sys are same.

cd /usr/tivoli/tsm/client/api/bin64/dsm.sys
vi dsm.sys
nodename PRDnode

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.

Note: backint utility is by default located in /usr/tivoli/tsm/tdp_r3/ora64


directory. You can either make a soft link to the /oracle/PRD/102_64/dbs
directory or use the whole path name for authenticating TDP node as
above.

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

11.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 archivelog


files
1. For restoring only single file use the following command
brretore m /oracle/QTY/sapdata7/btabd_250/btabd.data250 b
brnnfghrk.aff p initQTY.sap c
2. For restoring one database file use the following command
brretore m /oracle/PRD/sapdata38/btabd_250/btabd.data250 b
brnnfghrk.aff p initQTY.sap -c

3. For restoring archive files online use below steps


Copy archPRD.log to QTY server
Change permission and owner as above
su oraQTY
Restoring one archive file
brrestore -u system/passw0rd -a 519407 (No. of archive file)

4. Restoring multiple archive files


brrestore -u system/passw0rd -a '519408-519498' (range of archive files)

You might also like