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 Adaptive Server Enterprise (ASE) 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, you can 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. This cloning method requires significantly 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 several database-specific methods that are available. We describe one of them.

For information see the System Copy – Target Databases Other than SAP HANA  relevant for your system, section SAP ASE Server-Specific Procedure.

The DUMP DATABASE command performs an online backup. DML and DDL operations are possible while the command is being executed. To ensure consistency, SAP ASE prevents truncation of the transaction log while the DUMP DATABASE is running. The DUMP DATABASE command creates an image of a database that can be restored using the LOAD DATABASE command.

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

Installing the Target System


Install target system on one host or on several hosts.

3.1 Installing the target system with all instances on the same host

Start SWPM to install the system. Choose following from product catalog:
<SAP Product> -> SAP ASE -> System Copy -> Target System -> Standard System -> Based on Java -> Standard System.

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 dialog, choose the option that matches the release, database platform, and distribution of the source system.

  • On the SAP System Database dialog, 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

  • Choose Local Domain.

  • On SAP ASE Database Load Method screen, choose Load a database dump.


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 information see the System Copy – Target Databases Other than SAP HANA guide relevant for your system, section SAP ASE Server-Specific Procedure.

3.2 Installing the distributed system

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

<SAP Product> -> SAP ASE -> 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> -> SAP ASE -> Installation -> Additional SAP System Instances

2.1 Installing the SCS instance

<SAP Product> -> SAP ASE -> 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

Start SWPM to install database instance. Choose following from product catalog:
<SAP Product> -> SAP ASE -> System Copy -> Target System -> Standard System -> Based on Java -> Standard System

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 dialog, choose Homogeneous System Copy (SAP ASE specific: Attach Database Device or Load Database Dump).

  • On the Java System Copy dialog, leave Target System Will Replace Source System

  • Choose Local Domain.

  • On SAP ASE Database Load Method dialog, choose Load a database dump.


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

For information see the System Copy – Target Databases Other than SAP HANA guide relevant for your system, section SAP ASE Server-Specific Procedure

 

Restoring the Database on the Target System


For information see the System Copy – Target Databases Other than SAP HANA guide relevant for your system, section SAP ASE Server-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.

Install the Application Server Instance


If the system is distributed on several hosts install the Application Server instance.

  • 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 dialog, 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 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 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



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


  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

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.





  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 for the SMD Agent instance as well.

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

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

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


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





  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 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 hostname of the target system. You should not use virtual hostnames (in this case it is source hostnames) as it is common for both source and target system.

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

Also see the following resources: