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 SAP HANA 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.



Create an online backup of your database system. Use the optimal available approach for your database. There are many database-specific methods available, but we describe just one of them.

For information, see the System Copy - Target Database SAP HANA guide relevant for your system, section SAP HANA Database-Specific Procedure.

Starting the System Copy



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

  2. Create the installation directory

  3. Download to the installation directory 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.

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

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




  1. 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 for your system, section Creating the Target System.

Installing the Target System


Install database server software. Afterwards install the target system on one host or on several hosts.

Installing the target system with all instances on the same host

For information, see the System Copy - Target Database SAP HANA guide relevant for your system, section SAP HANA Database-Specific Procedure.

  1. Start SWPM to install database instance. Choose following from product catalog:
    <SAP Product> -> SAP HANA Database -> 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 HANA-specific Backup/Recovery).

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

    • Choose Local Domain.

    • On the SAPControl Connect Data dialogs, first enter the password of the <SID>adm user of the target database and the related SAPControl URL. The system pre-fills the SAPControl URL; it usually does not have to be changed. In addition, select File or Backint as the Destination Type in accordance with the backup type created. In the next dialog - Database Recovery, enter the directory and the name (prefix) of the backup. As the directory, enter the directory to which you copied the backup files. As a prefix, enter the prefix of the backup that you chose. In the case of a Backint backup, enter the database SID of the source system. In the case of a file backup, you can also specify whether you want the system to check whether the backup exists. If this check is deactivated and the backup does not exist, the installation terminates with an error at a later time.




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 section Copying Kernel and JVM Files from the Source System before starting it.

Installing the Distributed System


If the system is distributed on several hosts, perform the steps described below.

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> -> SAP HANA Database -> Installation -> Additional SAP System Instances

Installing the SCS Instance


<SAP Product> -> SAP HANA Database -> 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.


Installing the Database Instance



  1. Start SWPM to install database instance. Choose following from product catalog:
    <SAP Product> -> SAP HANA Database -> 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 (SAP HANA-specific Backup/Recovery).

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

    • Choose Local Domain.

    • On the SAPControl Connect Data dialogs, first enter the password of the <SID>adm user of the target database and the related SAPControl URL. The system pre-fills the SAPControl URL; it usually does not have to be changed. In addition, select File or Backint as the Destination Type in accordance with the backup type created.
      In the next dialog - Database Recovery, enter the directory and the name (prefix) of the backup. As the directory, enter the directory where you copied the backup files. As a prefix, enter the prefix of the backup that you chose. In the case of a Backint backup, enter the database SID of the source system. In the case of a file backup, you can also specify if you want the system to check whether the backup exists. If this check is deactivated and the backup does not exist, the installation terminates with an error at a later time.




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

For information, see the System Copy - Target Database SAP HANA guide relevant for your system, section SAP HANA Database-Specific Procedure.

Performing the Database Restore on the Target System


For information, see the System Copy - Target Database SAP HANA guide relevant for your system, section SAP HANA Database-Specific Procedure.

Finishing the System Copy


Return to the SAPinst GUI and choose 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, execute the following steps.

  • 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 not running. 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 additional information, see the nZDM Java user documentation for your system, section 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 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​



 

  1. 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>/​



 

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

  2. 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


  3. 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:





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

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

    3. Change value of SAPJVM_VERSION to <digits>

    4. Save the file.





  1. Start all instances.

  2. 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 using the IP address or target host name of the target system. You should not use virtual host names (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.

Also see the following resources: