How to Do SAP System Copy? – A Step-by-Step Guide

Posted · 8 Comments
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
Copy files Using the restore date and time, copy PRODUCTION data files, log files, and controlfile from tape to  TEST.
Modify Control File Modify the control file to match the directory paths for TEST.
Rename database In SQLPLUS, perform the following command:
Recover database Use the Sqlplus command:
The date / time will depend on the time you want to restore to.
After this is complete, startup Oracle.
Check R/3 Connection R3trans –d

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
SLICENSE (Install the license for TEST) Click Install -> Enter system number and key (You can get this from SAP Service Marketplace.)


RZ10 (Delete old profiles and Import existing profiles) 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


STMS (Create the appropriate system layout) Delete the current transport routes and then create a new transport route by choosing the appropriate structure for your systems (Three systems in a group, Single system, etc.).


BDLS (Change Logical System Name) Enter the old logical system name.

Enter the new logical system name.

Uncheck ‘TEST Run’ and ‘Check existence of new names in tables’.


SE16 (Delete from tables) Delete all entries from the following tables: ALCONSEG, ALSYSTEMS, DBSNP, MONI, OSMON, PHAI, SDBAD, SDBAH, SDBAP, SDBAR, DDLOG, TLOCK.

Enter the table name -> Enter

Click Execute.

Choose all entries and delete.

SE38 (to delete old and cancelled batch jobs) Run program RSBTCDEL.

Choose * for job name and user name.

Choose ‘X’ for released, finished, cancelled, and delete with forced mode.



SPAD (Convert all printers to TEST) 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 RFCs) Check and adjust the appropriate RFC destinations form PRODUCTION to TEST.
SM58 (Clean the transactional RFC) Open the date range.

Enter * for the user name -> Execute


Delete all Errors


SECSTORE (Change the secstore) Go to tab ‘System Data Changed’.

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



RZ04 (Change OpModes) Remove old OpModes and create the new ones.

Double click on the OpMode.


Delete the current distribution of work processes.


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


SMLG (Logon Groups) Check the logon groups and delete the PRODUCTION logon groups and create the TEST logon groups.



SM13 (Delete Updates) Delete old update requests.



SM12 (Delete Locks) Delete old lock requests.
SM21 (Review System Log) Check system log for any errors.



SPAD (Cleanup Spool) SPAD -> Administration -> Cleanup Spool

Click all spool requests -> Continue


SPAD (Spool Consistency) SPAD -> Administration -> Check Consistency -> Delete all errors


SWU3 (Restart Workflow) SWU3 -> Red beach ball icon

Not all will activate, but that’s okay.


SM51 (Server Check) Make sure all servers show up and are available.


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



STMS (Catchup Transports) First, move the transports that went to TEST and not PRODUCTION. Next, move the transports that went into PRODUCTION after the freeze date / time.
SGEN (Regeneration of programs) Choose ‘Regenerate Existing Loads’

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

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


8 Responses to "How to Do SAP System Copy? – A Step-by-Step Guide"
  1. MM says:

    there are many steps missing!

    • Patrick says:

      It is not possible to mention each and every step because many of them are specific to a particular situation. Which missing steps do you mean?

  2. fernando says:

    is not better put all steps and to do a complete cheklist, please complete because is so interesting

  3. Himanshu says:

    is it possible that structure of table/DSO/datasource etc can also be copied apart from the data?

  4. Julian Serna says:

    Nice post, thanks a lot!

  5. imran khan says:

    NIce document and user friendly!!!

  6. Frank says:

    Hey together, thanks for the well done how-to.
    I have one remark – there is no table ‘PHAI’ – the correct name is ‘PAHI’

  7. Devki Nandan says:

    Hey – There are steps missing in (1) pre-copy steps, (2) copy steps, and is not the detailed step by step. Need to mention step by step process with command for each situation.

Leave a Reply

Your email address will not be published. Required fields are marked *