Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
This is the second installment of our nZDM Java process example. This blog post is specific for systems running on IBM DB2 for Linux, Unix, and Windows (LUW) databases. First you should prepare the target hosts as described in the blog post nZDM Java Part 1: Prepare the Physical Host of your Target System.

For performing the system copy or cloning, use any procedure and tool of your preference. Here we describe just one example how you can copy the system using Software Provisioning Manager (SWPM). You should use the database-specific homogeneous system copy procedure to create the target system. Note that this cloning method requires more time and effort than any of the virtualization-based cloning methods.

Performing the Database Backup on the Source System



NOTE: Keep in mind that throughout this blog post we use “database” when we mean “NetWeaver database”, for the sake of readability.



You should create online backup of your database system. You can use different approach provided by your database. There are many database-specific methods available; we describe just one of them.

For more information, see the System Copy – Target Databases Other than SAP HANA relevant for your system, section SAP ASE Server-Specific Procedure. section IBM Db2 for Linux, UNIX, and Windows-Specific Procedures. You should perform an online backup.

1. Starting the system copy

  1. Login to your target system host as the <administrator> user.

  2. Create the installation directory.

  3. Download the latest version of the Software Provisioning Manager 1.0 archive SWPM10SP<Support_Package_Number>_<Version_Number>.SAR from https://support.sap.com/sltoolset ->System Provisioning ->Download Software Provisioning Manager.


to the installation directory.

  1. Copy SAPCAR from your source system kernel directory (DIR_CT_RUN) to your target system host installation directory.

  2. Unpack the Software Provisioning Manager SAR archive by executing the following command in your installation directory:
    SAPCAR -xvf SWPM10SPxxxxxxxx.SAR​


  3. Start sapinst in your installation directory with the appropriate switches:
    sapinst SAPINST_USE_HOSTNAME=<source_hostname> JAVA_COPY_REMOVE_INSTANCES_IN_DB=no​



For additional information, see the nZDM Java user documentation.

Installing the Target System


Install target system on one host or on several hosts.

SWPM can install database server software. You can install it manually or provide installation media that SWPM should install.

1. Installing the target system with all instances on the same host

  1. Start SWPM to install database instance. Choose following from product catalog:
    <SAP Product> -> IBM Db2 for Linux, UNIX, and Windows -> System Copy -> Target System -> Standard System -> Based on Java -> Standard System

  2. Fill in all required information in the system copy screens. Make sure that all parameters, such as SID, instance numbers, ports, and passwords exactly match the same parameters of the source system. Pay attention to the following screens:





    • On the Welcome to SAP Installation screen, choose the option that matches the release, database platform, and distribution of the source system.

    • On the SAP System Database screen, choose Homogeneous System Copy (SAP ASE-specific: Attach database device or Load database dump).

    • On the Java System Copy screen, leave Target System Will Replace Source System unselected.

    • Choose Local Domain.

    • SWPM asks you if you want to use either an already existing SAP ASE installation on the target system, or the database software from the installation media. Depending on the method chosen, you have to enter either the path to the database dump files or the location of the database manifest file. SWPM tries to find the database devices mentioned in the manifest file automatically, otherwise it asks for the files during the installer execution phase.




After the Parameter Summary dialog, the system copy procedure starts and runs until the step Install database server software.

Then the system copy procedure runs until the step Backup/Restore database. In this step, it stops and asks you to restore the backup before continuing. Execute section Restoring the Database Backup on IBM DB2 database.

3. Return to the SAPinst GUI and click OK to continue the system copy. The system copy procedure resumes and runs without further manual steps to the end.


As a result of a successful execution, the target system is ready for use. The SCS and SMD Agent instances are running, and the Java instance is not running. You can start it manually at this point or follow the steps described in Copying Kernel and JVM Files from the Source System before starting it.

For information see the System Copy – Target Databases Other than SAP HANA  relevant for your system, section IBM Db2 for Linux, UNIX, and Windows-Specific Procedures.

3.2 Installing a distributed system

If the system is distributed on several hosts, choose Distributed.

<SAP Product> -> IBM Db2 for Linux, UNIX, and Windows -> System Copy -> Target System -> Distributed System -> Based on Java

All mandatory instances are distributed on separate hosts. Mandatory instances of an SAP system are:

  • Central services instance (SCS instance)

  • Database instance

  • Application server instance


You can have one or more additional application server instances. You can find the installation for additional application server instances in Additional SAP System Instances.

<SAP Product> -> IBM Db2 for Linux, UNIX, and Windows -> Installation -> Additional SAP System Instances

2.1 Installing the SCS instance

<SAP Product> -> IBM Db2 for Linux, UNIX, and Windows -> System Copy -> Target System -> Distributed System -> Based on Java -> SCS instance

Fill in all required information in the system copy screens. Make sure that all parameters, such as SID, instance numbers, ports, and passwords exactly match the same parameters of the source system. Pay attention to the following screens:

  • On the Welcome to SAP Installation screen, choose the option that matches the release, database platform, and distribution of the source system.

  • Choose Local Domain.


2.2. Installing the database instance

  1. Start SWPM to install database instance. Choose following from product catalog:
    <SAP Product> -> IBM Db2 for Linux, UNIX, and Windows -> System Copy -> Target System -> Distributed System -> Based on Java -> Database instance

  2. Fill in all required information in the system copy screens. Make sure that all parameters, such as SID, instance numbers, ports, and passwords exactly match the same parameters of the source system. Pay attention to the following screens:





    • On the Welcome to SAP Installation screen, choose the option that matches the release, database platform, and distribution of the source system.

    • On the SAP System Database screen, choose Homogeneous System Copy (Database Copy Method).

    • On the Java System Copy screen, leave Target System Will Replace Source System unselected.

    • Choose Local Domain.

    • SWPM asks you if you want to use either an already existing SAP ASE installation on the target system or the database software from the installation media.
      Depending on the method chosen, you have to enter either the path to the database dump files or the location of the database manifest file. SWPM tries to find the database devices mentioned in the manifest file automatically, otherwise it asks for the files during the installer execution phase.




After the Parameter Summary dialog, the system copy procedure starts and runs until the step Install database server software.

The system copy procedure runs until the step Backup/Restore database. In this step, it will stop and ask you to restore the backup before continuing. Execute section Restoring the Database Backup on IBM DB2 database.

3. Return to the SAPinst GUI and click OK to continue the system copy. The system copy procedure will resumes and hopefully run without further manual steps to the end.


As a result of a successful execution, the target DB instance is ready for use.

For information, see the system copy guide System Copy - Target Databases Other than SAP HANA: section IBM Db2 for Linux, UNIX, and Windows-Specific Procedures.

  1. Performing the database restore on the Target System


For information see the System Copy – Target Databases Other than SAP HANA relevant for your system, section IBM Db2 for Linux, UNIX, and Windows-Specific Procedure.

Finishing the System Copy


Return to the SAPinst GUI and click OK to continue the system copy. The procedure resumes and runs without further manual steps to the end. The warning message An error occurred updating the system history for Java... might appear. You can ignore it and continue.

Installing the Application Server Instance


If the system is distributed on several hosts install AS.

  • On the Welcome to SAP Installation screen, choose the option that matches the release, database platform, and distribution of the source system.

  • On the Java System Copy screen, leave Target System Will Replace Source System unselected.

  • Choose Local Domain.


As a result of a successful execution, the target system is ready for use. The SCS and SMD Agent instances are running, and the Java instance is stopped. You can start it manually at this point, or follow the steps described in section Copying Kernel and JVM Files from the Source System before starting it.

For additional information, see the nZDM Java user documentation for your system, section Creating the Target System.

Copying Kernel and JVM Files from the Source System


For information see nZDM Guide: Creating the Target System.

To have a completely identical target system, it is recommended to copy the kernel and JVM files from the source system. In some cases, you may be forced to do this if you have issues with starting the Java instance due to a kernel that is too old for the OS.

1. Copying Kernel and JVM Files on Linux OS

  1. Make sure that all target system instances (SCS and Java) are stopped. On Linux, you can stop them by logging as <sid>adm and executing the following command for each instance:
    sapcontrol -nr <nr> -function Stop​



You can monitor the status of the instance processes by running



sapcontrol -nr <nr> -function GetProcessList

and the status of the Java processes by running
sapcontrol -nr <nr> -function J2EEGetProcessList


  1. Rename all target system executable directories. On Linux, login to your target system host as <sid>adm and execute the following commands:
    cd /usr/sap/<SID>/SYS/exe/uc/
    mv linuxx86_64 linuxx86_64.1
    cd /usr/sap/<SID>/SYS/exe/jvm/
    mv linuxx86_64 linuxx86_64.1
    cd /usr/sap/<SID>/J<nr>
    mv exe exe.1
    cd /usr/sap/<SID>/SCS<nr>
    mv exe exe.1​


  2. Copy all executable directories from the source system host. On Linux, login to your source system host as <sid>adm and execute the following commands:
    cd /usr/sap/<SID>/SYS/exe/uc/
    scp -p -r ./linuxx86_64 <sid>adm@<hostname1>:/usr/sap/<SID>/SYS/exe/uc/
    cd /usr/sap/<SID>/SYS/exe/jvm/
    scp -p -r ./linuxx86_64 <sid>adm@<hostname1>:/usr/sap/<SID>/SYS/exe/jvm/
    cd /usr/sap/<SID>/J<nr>
    scp -p -r ./exe <sid>adm@<hostname1>:/usr/sap/<SID>/J<nr>/
    cd /usr/sap/<SID>/SCS<nr>
    scp -p -r ./exe <sid>adm@<hostname1>:/usr/sap/<SID>/SCS<nr>/​


  3. Edit the Java instance profile and specify the correct value for the SAPJVM_VERSION parameter.

  4. Start all instances that were previously running. On Linux, you do that by logging as <sid>adm and executing the following command for each instance:
    sapcontrol -nr <nr> -function Start​

    or you can use sapstart if it exists
    sapstart​



6. You can perform the above steps to copy the kernel and JVM files also for the SMD Agent instance. Make sure you login as the correct user since this instance is installed under a different SID, usually DAA.


2. Copying Kernel and JVM Files on Windows OS

  1. Make sure that all target system instances (SCS and Java) are stopped.

  2. Rename all target system executable directories:





    • <drive>:\usr\sap\<SID>\SYS\exe\uc\NTAMD64 to <drive>:\usr\sap\<SID>\SYS\exe\uc\NTAMD64.old

    • <drive>:\usr\sap\<SID>\SYS\exe\jvm\NTAMD64 to <drive>:\usr\sap\<SID>\SYS\exe\jvm\NTAMD64.old

    • <drive>:\usr\sap\<SID>\J<nr>\exe to <drive>:\usr\sap\<SID>\J<nr>\exe.old





  1. Copy all executable directories from the source system host to the target system host. From the target system copy do the following:





    • Copy \\<Source_System_IP>\saploc\<SID>\SYS\exe\uc\NTAMD64 to <drive>:\usr\sap\<SID>\SYS\exe\uc\NTAMD64

    • Copy \\<Source_System_IP>\saploc\<SID>\SYS\exe\jvm\NTAMD64 to <drive>:\usr\sap\<SID>\SYS\exe\jvm\NTAMD64

    • Copy \\<Source_System_IP>\saploc\<SID>\J<nr>\exe to <drive>:\usr\sap\<SID>\J<nr>\exe





  1. Edit the Java instance profile and specify the correct value for the SAPJVM_VERSION parameter:





    • Open folder <drive>:\usr\sap\<SID>\SYS\exe\jvm\NTAMD64 and check name of folder sapjvm_<digits> (The <digits> are the SAPJVM_VERSION value)

    • Open file <drive>:\usr\sap\<SID>\SYS\profile\<SID>J<nr><source_system>

    • Change value of SAPJVM_VERSION to <digits>.

    • Save the file.




5. Start all instances.



Copying Kernel and JVM Files from the Source System to the Target System SMD Agent


Perform the above steps to copy the kernel and JVM files also for the SMD Agent instance.

This instance is installed under a different SID, usually DAA.

  • Instead of J<nr> use SMD<xx>.

  • For parameter SAPJVM_VERSION use the value from <drive>:\usr\sap\DAA\SMDA<xx>\exe\sapjvm_<nr>\buildinfo.txt -> parameter vmVersion.


Connecting to the Target System


Connect to the target system via IP address or target host name of the target system. You should not use virtual hostnames (in this case it is source host names), as it is common for both source and target systems.

Also, you should use IP address to connect to the source system in nZDM Java UI to connect to the source system.

You can also check the target system setup process for other databases:

Also see the following resources: