You are on page 1of 14

How to Do SAP System Copy?

A Step-by-
Step Guide

http://www.ivobe.com/sap-software/how-to-do-sap-system-copy/

An SAP system copy is one thing a SAP Basis administrator will undoubtedly be asked to do. It is
common for companies to want their SAP test system to look like their production system and thus,
will require a copy of SAP system. It may even be on a regular basis (i.e. quarterly). It is our intention
to walk you through the steps of performing an SAP system copy by detailing (1) pre-copy steps, (2)
copy steps, and (3) post-copy steps.

This procedure expects that the SAP system and Oracle are already installed and the system copy is
just a database switch.
A. Pre-Copy Steps
1. Note what date / time to which you will restore.
2. Issue a freeze on transports to TEST. Emergencies will then go directly to PRODUCTION (if
a different TEST system is not available).
3. Note all transports that have not gone into PRODUCTION, but are in TEST.
4. Note all transports that have gone to PRODUCTION after the date / time of the restore point.
5. Shutdown SAP and Oracle on the TEST system.
6. Remove all Oracle data files on TEST.

B. SAP System Copy Steps


Description Instruction

Using the restore date and time, copy PRODUCTION data files, log files, and controlfile from
Copy files
tape to TEST.

Modify Control File Modify the control file to match the directory paths for TEST.

In SQLPLUS, perform the following command:


Rename database
ALTER SYSTEM SET DB_NAME=<TEST SID> SCOPE=SPFILE;

Use the Sqlplus command:


RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL TIME YY-MM-
Recover database DD:HH24:MM:SS;
The date / time will depend on the time you want to restore to.
After this is complete, startup Oracle.

R3trans d
Check R/3
Connection
If R3trans d does not give a 0 return code it will be impossible to start SAP correctly.

Start SAP Start SAP for the post-copy steps.


C. Post-Copy Steps
Transaction Instruction

Click Install -> Enter system number and key (You can get this from SAP Service Marketplace.)

Choose the profiles of the PRODUCTION server Profile -> Delete -> All versions -> of a profile

Do this for all PRODUCTION profiles.


Then, import the correct profiles.

Utilities -> Import profiles -> Of active servers


Enter the old logical system name.

BDLS (Change Enter the new logical system name.


Logical System
Name) Uncheck TEST Run and Check existence of new names in tables.

Execute.

Delete all entries from the following tables: ALCONSEG, ALSYSTEMS,


DBSNP, MONI, OSMON, PHAI, SDBAD, SDBAH, SDBAP, SDBAR,
DDLOG, TLOCK.
SE16 (Delete from
tables)
Enter the table name -> Enter

Click Execute.

Choose all entries and delete

Run program RSBTCDEL.

Choose * for job name and user name.

Choose X for released, finished, cancelled, and delete with forced mode.
Utilities -> For output devices Assign server

A list will display.

Enter the TEST spool server and choose Display List.

Convert all to the TEST server.


SM59 (Adjusting Check and adjust the appropriate RFC destinations form
RFCs) PRODUCTION to TEST.

Open the date range.

Enter * for the user name -> Execute


Go to tab System Data Changed.

Enter the system number and Migration key (from SolMan).

Execute.

Remove old OpModes and create the new ones.

Double click on the OpMode.


Goto Settings -> Based on current status -> Existing instances -> Set

Check the logon groups and delete the PRODUCTION logon groups and create the TEST logon
groups.
Delete old update requests.
SM12 (Delete Locks) Delete old lock requests.

Check system log for any errors.


SPAD -> Administration -> Cleanup Spool

Click all spool requests -> Continue

SPAD -> Administration -> Check Consistency -> Delete all errors
SWU3 -> Red beach ball icon

Not all will activate, but thats okay.

Make sure all servers show up and are available.

SCC4 (Client Settings) Make sure the client settings are correct.

Make sure Change Settings are correct.


First, move the transports that went to TEST and not
STMS (Catchup
PRODUCTION. Next, move the transports that went into
Transports)
PRODUCTION after the freeze date / time.

Choose Regenerate Existing Loads

SGEN Execute in background (This will run for a long time. It is okay
(Regeneration of to continue to work in the TEST system, however it will be slow
programs) as the regeneration takes a lot of resources).

This step is necessary for regeneration of SAP program(s).

You might also like