SAP Homogeneous System Copy using Backup Restore Procedure (R3COPY)

In this article I will show you the procedure of SAP homogeneous system copy using backup restore method. In this example I do the system copy on windows platform using SAP R/3 4.7 on Oracle 11G.

You can create a homogeneous copy of an Oracle database by copying database files. This method is suitable for creating an exact copy of an existing database. The source of the copy can be an offline backup or the file system of your source host.

Advantages

  • Existing offline backups can be used (provided redo logs were cleaned up with forced log switches).
  • Procedure is faster than the R3load method.

Disadvantages

  • Offline backup/copy of database files in a heterogeneous environment is not possible as hardware of the source and target systems must be binary compatible.
  • Source system host and target system host must be different.
  • SAP system and database must be shut down during offline backup/copy of database files.
  • You cannot change the database schema and the tablespace names.

Prerequisites

Make sure that the following requirements are met:
• The backup must be done offline.
• The source and target systems must run on different hosts for security reasons.
• The source and target systems must be binary compatible.
• The hard disk type and the disk management system of the source and target systems must be the same.
• Make sure that all redo log groups are archived.
• If errors occur when restoring the backup on the target system, the complete restore has to be repeated.

Process Flow
1. Generate the control file structure for the target database on the source system.
2. Prepare the target system.
3. If required, create an offline backup of the source database (precaution).
4. Restore the data files, log files, trace file and structure information file on the target system by using the offline backup or by copying the listed files directly from the source host.
5. Change the internal DB name by creating new control files.
6. Execute CONTROL.SQL with R3COPY.
7. Restart SAPinst.

PREPARATION IN SOURCE SYSTEM

1. Extract the latest orabrcopy tool to any folder.

sap-homogeneous-system-copy

2. Temporarily change the listener from “yourhost” to “localhost“.

Note: in some cases orabrcopy call localhost in listener host entry, so it’s better to change it temporarily during the system copy.

sap-homogeneous-system-copy

3. Restart the listener after changing the host entry and don’t forget to test the tnsnames connection

as <sidadm>  issue command:

c:\>lsnrctl stop
c:\>lsnrctl start

sap-homogeneous-system-copy

Test tnsnames connection:

c:\> tnsping <SID>

sap-homogeneous-system-copy
4. Go to orabrcopy tool folder and execute ora_br_copy script to generate CONTROL.SQL file.

Note:

  • your Oracle DB must be up and open.
  • the script parameter is case-sensitive, be aware to the lowercase/uppercase.

as <sid>adm

c:\>ora_br_copy.bat -forceLogSwitches -generateFiles -targetSid <SID> -listenerPort <port> -password <password>


sap-homogeneous-system-copy

The ora_br_copy script will run and generate CONTROL.SQL for you.

sap-homogeneous-system-copy
6. Check in the folder and make sure CONTROL.SQL is generated.

Note: the script also copies init<SID>.ora, you can use it at the target. sap-homogeneous-system-copy
Now you are ready to prepare the target system.

PREPARATION IN TARGET SYSTEM

Note:

You have to finish Database Software Installation and Central Installation on destination server before doing the steps below.

1. Now you continue the system copy on destination server. Call sapinst.

sap-homogeneous-system-copy

2. Choose “Database Instance Installation

sap-homogeneous-system-copy

3. Set your “SAP System ID” (should be the same as your Central Instance).

sap-homogeneous-system-copy

4. Now choose the installation method as “System Copy / Oracle Backup/Restore“.sap-homogeneous-system-copy

5. Fill the SAPSID and DBSID parameter.

sap-homogeneous-system-copy

6. Enter your Central Instance Information here:

SAPSID = Your SAP System ID

Instance Number = your SAP System number

Instance Host = the target server

sap-homogeneous-system-copy

7. Fill more parameters for your instance host:

Instance RAM [MB] : Adjust that suitable for you.

Domain Model :

  • Local installation : if you do local installation
  • Installation in Domain of current user : use the same domain of your current logged in user.
  • Installation Different Domain : use different domain


sap-homogeneous-system-copy

8. Fill the parameters for Instance Directories.

Choose:

  • Yes,... : if you will use it for heterogeneous system. You will locate SAP executable in Central Instance
  • No.. : if you use it for single platform.

Installation Drive : the location of your SAP Executable

Host with transport directory : the host where you put the central transport directory to.

 

sap-homogeneous-system-copy

9. Fill the parameters for Database System

Database schema : your oracle schema used for SAP (usually in the form of SAP<SID> or SAPR3)

Character Set: leave it default

Database home : the location of your Oracle installation

Database Server version : your installed oracle software version

Database Client version : your installed oracle client version

Drive for Server Directories: the drive to put the data  (sapdata1, 2 and so on)

Drive for Redo Log… : the drive to put the online redolog (origlogA, origlogB and so on)

sap-homogeneous-system-copy

10. You may get warning if you put the redolog on the same drive letter as data. Just continue.


sap-homogeneous-system-copy

11. You will have to enter the user and password for <sid>adm and SAPService<SID>.

sap-homogeneous-system-copy

sap-homogeneous-system-copy

12. Locate the correct SAP Kernel DVD and Oracle Client.

sap-homogeneous-system-copy

sap-homogeneous-system-copy

13. Untick “Keep listener.ora” and “Keep tnsnames.ora” 

sap-homogeneous-system-copy

14. Enter the password for Database Users.

sap-homogeneous-system-copy

15. Enter DDIC password (client 000).

sap-homogeneous-system-copy

16. Now you are ready to execute the installation process.

sap-homogeneous-system-copy

17. The installation will stop until the point where you have to restore the database on target server.

sap-homogeneous-system-copy

18. Make sure you have restored the data to target server. And you have put CONTROL.SQL in the installation directory.

sap-homogeneous-system-copy

19. Continue the installation. It will execute CONTROL.SQL to build new Oracle control files.

sap-homogeneous-system-copy

20. Wait until the installation is finished successfully.

sap-homogeneous-system-copy

sap-homogeneous-system-copy

 

Note:

For System copy using R3load export/import you can read article: How to do SAP System Copy

 

Leave a Reply