VM agents

This section describes the VM agents that VM Recovery Manager HA supports.

DB2
Scripts:
The KSYS VM daemon uses the following scripts to start, stop, and monitor the DB2 application.
  • /usr/sbin/agents/db2/startdb2
  • /usr/sbin/agents/db2/stopdb2
  • /usr/sbin/agents/db2/monitordb2
To add the DB2 VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=DB2 instancename=<VALUE#1> (database=<VALUE#2>) [<ATTR#n>=<VALUE#n>]
Example:
ksysvmmgr -s add app db2app type=DB2 instancename=db2inst1 database=dbone
In this example, db2inst1 is the database instance owner and dbone is the database to monitor.
Attributes:
  • type: While creating the DB2 application, the type attribute must have the value, DB2.
  • instancename: The instancename attribute must be specified with the DB2 instance owner.

The instancename attribute is also passed as a parameter to the start and stop scripts.

Oracle

Prerequisites

After configuring the Oracle VM agent on the virtual machine and before adding the Oracle application to the VMM agent, ensure that the value in the mount attribute is set to true. For example, in the /etc/filesystems /u01 file:
dev         = /dev/oracleinst1
vfs         = jfs2
log         = /dev/loglv00
mount       = true
account     = false
Scripts:
The KSYS VM daemon uses the following scripts to start, stop and monitor the Oracle application.
  • /usr/sbin/agents/oracle/startoracle
  • /usr/sbin/agents/oracle/stoporacle
  • /usr/sbin/agents/oracle/monitororacle
To add the Oracle VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=ORACLE instancename=<VALUE#1> 
database=<VALUE#2> [<ATTR#n>=<VALUE#n>]
Example:
ksysvmmgr -s add app oracleapp type=ORACLE instancename=orauser database=DBRESP
In this example, orauser is the Oracle username and DBRESP is the Oracle system identifier (SID) or database name.

When you are installing the Oracle database, you can optionally specify the IP address and Ethernet interface. The specified IP address and Ethernet interface is used to access the Oracle database. If you have specified the IP address and Ethernet interface for the Oracle database, you must specify the IP address and Ethernet interface in the configfile.

To add the Oracle VM agent in the configfile, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=ORACLE instancename=<VALUE#1> database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Example:
ksysvmmgr -s add app oracleapp type=ORACLE instancename=orauser database=DBRESP configfile=/var/ksys/config/samples/ORACLEconfig.xml
Attributes:
  • type: While creating the ORACLE application, the type attribute must have the value, ORACLE.
  • instancename: The instancename attribute must be specified with the ORACLE username.
  • database: The database name must be specified with the ORACLE system identifier (SID).
  • configfile: The configfile attribute specifies the file path of the configuration file that stores settings of the application configuration. If SAP NetWeaver environment is configured with Oracle, you must specify the path of the configuration file while adding the Oracle application. A sample configuration file, ORACLEconfig.XML is provided in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values. If you do not specify appropriate values in the configuration file, you cannot add the Oracle application agent with configfile.
The following table lists the description of the attributes present in the Oracle configuration file.
Table 1. Oracle attributes
Attribute Description
INSTANCE_NAME The INSTANCE_NAME is the ORACLE user name. This attribute is mandatory in the configuration file.
IPAddress_or_name The IPAddress_or_name is the ORACLE DB IP. This is mandatory attribute in configfile if ORACLE DB is configured with SAP NetWear. This attribute is not mandatory in configfile if ORACLE DB is not configured with SAP NetWear.
interfacename The interfacename is the ethernet interface name. This is mandatory attribute in configfile if ORACLE DB is configured with SAP NetWear. This attribute is not mandatory in configfile if ORACLE DB is not configured with SAP NetWear.
The following screen displays an example of a ORACLE configuration file (/var/ksys/config/samples/ORACLEconfig.xml) with example data:
<?xml version='1.0' encoding='UTF-8'?>
  <!--NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES. -->
<ORACLEconfig>

    <ORACLE configure="yes">
        <INSTANCE_NAME>orauser</INSTANCE_NAME>
        <IPAddress_or_name>10.10.10.121</IPAddress_or_name>
        <interfacename>en0</interfacename>
    </ORACLE>

</ORACLEconfig>
POSTGRES
Scripts:

The KSYS VM daemon uses the following scripts to start, stop and monitor the POSTGRES application.

  • /usr/sbin/agents/postgres/startpostgres
  • /usr/sbin/agents/postgres/stoppostgres
  • /usr/sbin/agents/postgres/monitorpostgres
To add the POSTGRES VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=POSTGRES instancename=<VALUE#1> 
database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Example:
ksysvmmgr -s add app postgresapp type=POSTGRES instancename=postgres database=testdb configfile=/var/ksys/config/samples/POSTGRESconfig.xml
In this example, postgres is the instance owner and testdb is the database name.
Attributes:
  • type: While creating the POSTGRES application, the type attribute must have the value, POSTGRES.
  • instancename: The instancename attribute must be specified with the POSTGRES instance owner.
  • database: The database name is optional.
    Note: If the database name is specified, the script monitors only the specified database. And if the database name is not specified, the script monitors all database of the postgres instance.
  • configfile: The configfile attribute specifies the file path of the configuration file that stores settings of the application configuration. You must specify the path of the configuration file while adding the POSTGRES application. A sample configuration file, POSTGRESconfig.XML is provided in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values.

    If you do not specify appropriate values in the configuration file, you cannot add the POSTGRES application agent.

The following table lists the description of the attributes present in the POSTGRES configuration file.
Table 2. POSTGRES attributes
Attribute Description
POSTGRESinstance ID The ID of the POSTGRES instance owner. This attribute is mandatory in the configuration file.
data_directory

The file system location of the database configuration files. This attribute is specified while initializing the POSTGRES application (by using the init command with the -D option). This attribute is mandatory in the configuration file.

The following screen displays an example of a POSTGRES configuration file (/var/ksys/config/samples/POSTGRESconfig.xml) with example data:
<?xml version="1.0" encoding="UTF-8"?>
<POSTGRESConfig>
<!--NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES.-->
    <POSTGRESinstance id="pginst123">
        <data_directory>/var/lib/pgsql/data</data_directory>
    </POSTGRESinstance>

    <!--POSTGRESinstance id="instOwner"-->
        <!--data_directory>/var/lib/pgsql/data</data_directory-->
    <!--/POSTGRESinstance-->
</POSTGRESConfig>
SAP_HANA
IBM® VM Recovery Manager HA for Power Systems supports the following SAP HANA configurations:
  1. SAP HANA scale up configuration with host-based replication: you can create a replication between two SAP HANA nodes and add them to a VM agent. IBM VM Recovery Manager HA for Power Systems manages the SAP HANA nodes and replication between the two nodes, such as takeover of primary node failures.
  2. SAP HANA scale up configuration without replication: You can install the SAP HANA DB and add it to a VM agent. The VM agent monitors the database status and manages any failures.
Scripts:

The KSYS VM daemon uses the following scripts to start, stop and monitor the SAP HANA application.

  • /usr/sbin/agents/sap/startsaphana
  • /usr/sbin/agents/sap/stopsaphana
  • /usr/sbin/agents/sap/monitorsaphana
To add the SAPHANA VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPHANA instancename=<VALUE#1> 
database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Examples:
  • To add the SAP HANA application without replication:
    ksysvmmgr -s add app sapapp1 type=SAPHANA instancename=S01 database=HDB01
  • To add the SAP HANA application with replication:
    ksysvmmgr -s add app sapapp2 type=SAPHANA instancename=S01 database=HDB01 configfile=/var/ksys/config/samples/SAPHANAconfig.xml
In these examples, S01 is the SAPHANA system ID, HDB01 is the database name.
Attributes:
  • type: While creating a SAP HANA application, the type attribute must have the value, SAPHANA.
  • instancename: The instancename attribute must be specified with SAP HANA system ID.
  • database: The database attribute must be specified with the SAP HANA database name.
  • configfile: The configfile attribute specifies the file path of the configuration file, which stores settings of the application configuration. This attribute is not required for the SAP HANA application without replication configuration. But, you must specify the path of the configuration file while adding the SAP HANA application with replication configuration. A sample configuration file, SAPHANAconfig.xml is provided in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values. If you do not specify the configuration file path or appropriate values in the configuration file, the SAP HANA application will be added without replication configuration.

    The SAPHANAconfig.xml file contains the following attributes:
    SAPinstance id, replication, role, localsite, remotesite, secondarymode, virtualip, interfacename, executabledir, timeout and remotenode.

    If the replication attribute of the instance is set to yes, you must specify values for all mandatory attributes (for example, replication, role, localsite, remotesite, secondary mode, and remotenode). If you do not specify values for all mandatory attributes, the SAP HANA application will not be added to the virtual machine.

    Few attributes are optional: virtualip, interfacename, executabledir and timeout.

The following table lists the description of the attributes present in the SAP HANA configuration file.
Table 3. SAP_HANA attributes
Attributes Description
SAPinstance id The SAP HANA system ID must be specified while installing the SAP HANA application.
replication

Defines whether the SAP HANA application runs in stand-alone or in replication mode.

  • The keyword yes indicates that the SAP HANA application is in replication mode
  • The keyword no indicates that the SAP HANA application is in stand-alone mode
role

The value of the attribute can be primary, sync, syncmem, or async.

For a primary node, the value of this attribute is primary and for secondary node, the value of this attribute is sync, syncmem, or async.
localsite The site name of the current node (the value that is specified while configuring the SAP HANA replication).
remotesite The site name of the remote node (the value that is specified while configuring the SAP HANA replication).
secondarymode The mode of secondary node. The value of the attribute can be sync, syncmem, or async.
remotenode Hostname of the remote node. This name should be the same as the name shown in the output of the SAP command, hdbnsutil -sr_state.
virtualip

The service or virtual IP address that can be aliased to interfacename and through which the primary or secondary node can be accessed by other applications. You can also configure the netmask using the ipaddress/netmask format for the interface. If a subnet mask is not provided, the virtualip takes the default value ipaddress/32.

subnet mask The subnet mask can be used with the service or the virtualip address.
interfacename

The interface on which the specified virtual or service IP address will be aliased.

executabledir The directory path where the shared libraries and executable files of SAP_HANA VM agent are present.
timeout The duration of time within which the SAP_HANA command is expected to complete. This value is indicated in seconds. The default value is 120 seconds.
Note: start of changeThe virtualip tag should not use the VM IP as the virtualip in a config XML file.end of change
An example configuration file for the SAP HANA configuration without replication setup follows:
<?xml version="1.0" encoding="UTF-8"?>
<HANAConfig>
<NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES.
If replication attribute is 'yes', then all below attributes are mandatory.>
<SAPinstance id="S01">
<replication>no</replication>
<role>primary</role>
<localsite>local.hostname.ibm.com</localsite>
<remotesite>remote.hostname.ibm.com</remotesite>
<secondarymode>sync/syncmem/async</secondarymode>
<virtualip>192.168.2.3/24</virtualip>
<interfacename>eth2</interfacename>
<remotenode>remotenode_name</remotenode>
<timeout>120</timeout>
<executabledir>/usr/sap/S01/HDB01/exe</executabledir>
</SAPinstance>
</HANAConfig> 
An example configuration file for the secondary node SAP HANA configuration with replication follows:
<?xml version="1.0" encoding="UTF-8"?>
<HANAConfig>
<NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES.
If replication attribute is 'yes', then all below attributes are mandatory.>
<SAPinstance id="S01">
<replication>yes</replication>
<role>syncmem</role>
<localsite>local.hostname.ibm.com</localsite>
<remotesite>remote.hostname.ibm.com</remotesite>
<secondarymode>syncmem</secondarymode>
<virtualip>192.168.2.3</virtualip>
<interfacename>eth2</interfacename>
<remotenode>remotenode_name</remotenode>
<timeout>120</timeout>
<executabledir>/usr/sap/S01/HDB01/exe</executabledir>
</SAPinstance>
</HANAConfig>
start of changeConfiguring SAP HANA agent
After successfully adding the SAP HANA application, you can configure the SAP HANA specific attributes for monitoring.
  • To modify the attributes of a registered application, run the following command:
    ksysvmmgr [-s] [-l {0|1|2|3}] modify app <NAME> <ATTR#1>=<VALUE#1>[,<ATTR#n>=<VALUE#n>]
    For example, to set the monitoring period to 60 seconds and the timeout to 45 seconds as per your requirements, run the following command:
    ksysvmmgr -s modify app SAP_HANA_APP monitor_period=60 monitor_timeout=45
    This ensures that the monitoring script (monitor_script) is run every 60 seconds, and the monitor waits for 45 seconds to receive a response from the script before considering it as failed.
end of change
start of changeSAP NetWeaverend of change
start of changeIBM VM Recovery Manager HA for Power Systems supports the SAP NetWeaver VM agent. You can use the following option to configure SAP NetWeaver:end of change
start of changeConfiguring SAP NetWeaver ABAP Stack with Oracle Database:end of change
start of changeConfiguring SAP NetWeaver ABAP Stack with Oracle Database integrates the SAP's ABAP based applications with Oracle's powerful database management system. The process includes installing and configuring Oracle Database software, preparing the database for SAP installation, installing SAP NetWeaver ABAP stack software, and configuring the connection between SAP and Oracle. This establishes a seamless and reliable link, ensure efficient data storage, and retrieval for SAP applications running in the back-end Oracle.

Prerequisites

In the SAP NetWeaver application, the Primary Application Server (PAS) instance and Additional Application Server (AAS) instance depend on Oracle DB. You must configure the Oracle DB, Primary Application Server (PAS) instance, and Additional Application Server (AAS) instance during the SAP NetWeaver installation. Then, create application dependency between the Oracle DB, Primary Application Server (PAS) instance, and Additional Application Server (AAS) instance. If you do not configure Oracle DB during SAP NetWeaver installation and use an independent Oracle DB image that is downloaded from the Oracle website, you must separately configure Oracle DB, Primary Application Server (PAS) instance, and Additional Application Server (AAS) instance before using the SAP NetWeaver VM agent.

Scripts

The KSYS VM daemon uses the following scripts to start, stop, and monitor the SAP NetWeaver application:
  • /usr/sbin/agents/sapnw/startsap
  • /usr/sbin/agents/sapnw/stopsap
  • /usr/sbin/agents/sapnw/monitorsap
To add the SAP NetWeaver VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPNW_ABAP_SCS| SAPNW_ABAP_ERS| SAPNW_AS| SAPNW_AAS instancename=<VALUE#1> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Example
ksysvmmgr -s add app SapNW_ASCS type=SAPNW_ABAP_SCS instancename=ASCS00 configfile=/var/ksys/config/samples/SAPNWconfig.xml
In this example, ASCS00 is the name of the instance. In the SAPNWconfig.xml file, the value of the instancename attribute is same as the INSTANCE_NAME attribute in the SAPNWconfig.xml file.
Attributes:
  • type: When you create the SAP NetWeaver application, the type attribute must have one of the following values: SAPNW_ABAP_SCS, SAPNW_ABAP_ERS, SAPNW_AS, or SAPNW_AAS.
  • instancename: The instancename attribute must have the same value as in the SAPNWconfig.xml file.
  • configfile: The configfile attribute specifies the file path of the configuration file that stores settings of the application configuration. You must specify the path of the configuration file while adding the SAP NetWeaver application. A sample configuration file, SAPNWconfig.XML is available in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values. If you do not specify appropriate values in the configuration file, you cannot add the SAP NetWeaver application agent.
The following screen displays an example of a SAP NetWeaver configuration file (/var/ksys/config/samples/SAPNWconfig.xml) with example data:
<?xml version='1.0' encoding='UTF-8'?>
  <!--NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES. -->
<SAPNWconfig>
  <!--NOTE: If the SAP System has both, ABAP SCS instance and Java SCS Instance,
            they are expected to run on the same machine and both will be configured to be managed through a
            single Resource Group -->

  <SAPNW_ABAP_SCS configure="yes">
    <!-- SAP ABAP SCS Instance name -->
    <INSTANCE_NAME>ASCS00</INSTANCE_NAME>
    <!-- SAP ABAP SCS Instance Number -->
    <INSTANCE_NUMBER>00</INSTANCE_NUMBER>
    <!-- Primary Node where ABAP SCS instance is running at present -->
    <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
    <!-- SAP ABAP SCS Instance Directory Path -->
    <!-- It is expected that this path is on a shared VG which must be accessible from both Primary and Takeover nodes -->
    <INSTANCE_DIRECTORY>/root/instance_dir</INSTANCE_DIRECTORY>
    <!-- SAP LOCAL/Shared VOLUME GROUP-->
    <!--  volume group which is hosting instance directory for application instance -->
    <VOLUME_GROUP>/root/vg</VOLUME_GROUP>

    <!-- Hostname is the value of SAPINST_USE_HOSTNAME used while installing ABAP SCS Instance -->
    <!-- This hostname is expected to be an aliased address -->
    <HOSTNAME>
      <IPAddress_or_name>IPAddress_1</IPAddress_or_name>
      <!-- which Ethernet interface to use for network communication -->
      <interfacename>en0</interfacename>
      <!-- Prefix_or_Netmask -->
      <Prefix_or_Netmask>/32</Prefix_or_Netmask>
      <!-- Servive_Netmask for aliasing service ip -->
      <Service_Network>dummy</Service_Network>
    </HOSTNAME>

  </SAPNW_ABAP_SCS>

  <SAPNW_JAVA_SCS configure="no">
    <INSTANCE_NAME></INSTANCE_NAME>
    <INSTANCE_NUMBER></INSTANCE_NUMBER>
    <PrimaryNode></PrimaryNode>
    <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
    <VOLUME_GROUP></VOLUME_GROUP>

    <HOSTNAME>
      <IPAddress_or_name></IPAddress_or_name>
      <interfacename></interfacename>
      <Prefix_or_Netmask></Prefix_or_Netmask>
      <Service_Network></Service_Network>
    </HOSTNAME>

  </SAPNW_JAVA_SCS>

  <SAPNW_ABAP_ERS configure="yes">
    <INSTANCE_NAME>ERS10</INSTANCE_NAME>
    <INSTANCE_NUMBER>10</INSTANCE_NUMBER>
    <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
    <INSTANCE_DIRECTORY>/usr/sap/TS2/ERS10</INSTANCE_DIRECTORY>
    <VOLUME_GROUP>hdisk4</VOLUME_GROUP>

    <HOSTNAME>
      <IPAddress_or_name>IPAddress_2</IPAddress_or_name>
      <interfacename>en0</interfacename>
      <Prefix_or_Netmask>/32</Prefix_or_Netmask>
      <Service_Network>dummy</Service_Network>
    </HOSTNAME>

  </SAPNW_AS> 
  <SAPNW_JAVA_JC configure="no">
     <INSTANCE_NAME></INSTANCE_NAME> 
     <INSTANCE_NUMBER></INSTANCE_NUMBER> 
     <PrimaryNode></PrimaryNode> 
     <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY> 
     <VOLUME_GROUP></VOLUME_GROUP> 

     <HOSTNAME> 
       <IPAddress_or_name></IPAddress_or_name> 
       <interfacename></interfacename> 
       <Prefix_or_Netmask></Prefix_or_Netmask> 
       <Service_Network></Service_Network> 
     </HOSTNAME> 

  </SAPNW_JAVA_JC> 

  <SAPNW_AAS configure="yes"> 
    <INSTANCE_NAME>D02</INSTANCE_NAME> 
    <INSTANCE_NUMBER>02</INSTANCE_NUMBER> 
    <PrimaryNode>Primary_Vm_Name_1</PrimaryNode> 
    <INSTANCE_DIRECTORY>/usr/sap/TS2/D02/</INSTANCE_DIRECTORY> 
    <VOLUME_GROUP>rootvg</VOLUME_GROUP> 

    <HOSTNAME> 
      <IPAddress_or_name>IPAddress_4</IPAddress_or_name> 
      <interfacename>en0</interfacename> 
      <Prefix_or_Netmask>/32</Prefix_or_Netmask> 
      <Service_Network>dummy</Service_Network> 
    </HOSTNAME> 

  </SAPNW_AAS> 

  <SAPNW_JAVA_J configure="no"> 
    <INSTANCE_NAME></INSTANCE_NAME> 
    <INSTANCE_NUMBER></INSTANCE_NUMBER> 
    <PrimaryNode></PrimaryNode> 
    <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY> 
    <VOLUME_GROUP></VOLUME_GROUP> 

  <HOSTNAME> 
    <IPAddress_or_name></IPAddress_or_name> 
    <interfacename></interfacename> 
    <Prefix_or_Netmask></Prefix_or_Netmask> 
    <Service_Network></Service_Network> 
  </HOSTNAME> 

  </SAPNW_JAVA_J> 

  <!-- It is recommended to set "configure" to "no" if all instances are in single machine. 
       Set "configure" to "yes" and provide  NFS server IP, if NFS based mount needed --> 
  <NFS_ADDRESS configure="no"> 
        <IPAddress_or_name></IPAddress_or_name> 
  </NFS_ADDRESS>

</SAPNWconfig>
For the SAP NetWeaver Primary Application Server (ABAP) instances that depend on Oracle DB, you can create application dependency between Oracle DB and SAP NetWeaver's Primary Application Server (ABAP) and Additional Application Server (ABAP) instances by completing the following procedure:
  1. To add an Oracle VM agent in the configfile, run the following command:
    ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=ORACLE instancename=<VALUE#1> database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
    Example:
    ksysvmmgr -s add app oracleapp type=ORACLE instancename=orauser database=DBRESP configfile=/var/ksys/config/samples/ORACLEconfig.xml
    For more details about adding an Oracle VM agent application, see the Oracle VM agent topic.
  2. Create an application dependency between Oracle DB, SAP NetWeaver's Primary Application Server (PAS) instances, and Additional Application Server (AAS) instances.
    • To create start_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app1,app2,app3 dependency_type=start_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=oracleapp,PAS,AAS dependency_type=start_sequence
    • To create stop_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app3,app2,app1 dependency_type=stop_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=AAS,PAS,oracleapp dependency_type=stop_sequence
  3. To verify dependency between an Oracle DB and SAP NetWeaver Primary Application Server (ABAP) instance, run the following command:
    ksysvmmgr query dependency
    After creating the dependency, if the virtual machine reboots or if the virtual machine is relocated from one host to another host, then the virtual machine monitor (VMM) brings up the Oracle application before the SAP NetWeaver Primary Application Server (ABAP) instance.
end of change
start of change Configuring SAP NetWeaver Java Stack with Oracle Database:end of change
start of change

Configuring SAP NetWeaver Java Stack with Oracle Database involves integrating the SAP's Java based applications with Oracle's database system. The process includes installing and configuring Oracle Database software, preparing the database for SAP installation, and configuring the connection between SAP NetWeaver Java Stack and Oracle. This establishes a reliable link for storing and managing data for SAP Java applications using Oracle as the backend database.

Prerequisites

In the SAP NetWeaver application, the Java Central (JC) instance and Java application server (J) instance depend on Oracle DB. You must configure the Oracle DB, Java Central (JC) instance, and application server (J) instance during the SAP NetWeaver installation. Then, create application dependency between the Oracle DB, Java Central (JC) instance, and application server (J) instance. If you do not configure Oracle DB during SAP NetWeaver installation and use an independent Oracle DB image that is downloaded from the Oracle website, you must separately configure Oracle DB, Java Central (JC) instance, and application server (J) instance before using the SAP NetWeaver VM agent.

Scripts

The KSYS VM daemon uses the following scripts to start, stop, and monitor the SAP NetWeaver application:
  • /usr/sbin/agents/sapnw/startsap
  • /usr/sbin/agents/sapnw/stopsap
  • /usr/sbin/agents/sapnw/monitorsap
To add the SAP NetWeaver VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPNW_JAVA_SCS| SAPNW_JAVA_ERS| SAPNW_JAVA_JC| SAPNW_JAVA_J instancename=<VALUE#1> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Example
ksysvmmgr -s add app SapNW_JSCS type=SAPNW_JAVA_SCS instancename=SCS00 configfile="/var/ksys/config/samples/SAPNWconfig.xml"
In this example, SCS00 is the name of the instance. In the SAPNWconfig.xml file, the value of the instancename attribute is same as the INSTANCE_NAME attribute in the SAPNWconfig.xml file.
Attributes:
  • type: When you create the SAP NetWeaver application, the type attribute must have one of the following values: SAPNW_JAVA_SCS, SAPNW_JAVA_ERS, SAPNW_JAVA_JC, or SAPNW_JAVA_J.
  • instancename: The instancename attribute must have the same value as in the SAPNWconfig.xml file.
  • configfile: The configfile attribute specifies the file path of the configuration file that stores settings of the application configuration. You must specify the path of the configuration file while adding the SAP NetWeaver application. A sample configuration file, SAPNWconfig.XML is available in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values. If you do not specify appropriate values in the configuration file, then you cannot add the SAP NetWeaver application agent.
The following screen displays an example of a SAP NetWeaver configuration file (/var/ksys/config/samples/SAPNWconfig.xml) with example data:

<?xml version='1.0' encoding='UTF-8'?>
  <!--NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES. -->
<SAPNWconfig>
  <!--NOTE: If the SAP System has both, ABAP SCS instance and Java SCS Instance,
            they are expected to run on the same machine and both will be configured to be managed through a
            single Resource Group -->

<SAPNW_ABAP_SCS configure="no">
  <!-- SAP ABAP SCS Instance name -->
  <INSTANCE_NAME></INSTANCE_NAME>
  <!-- SAP ABAP SCS Instance Number -->
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <!-- Primary Node where ABAP SCS instance is running at present -->
  <PrimaryNode></PrimaryNode>
  <!-- SAP ABAP SCS Instance Directory Path -->
  <!-- It is expected that this path is on a shared VG which must be accessible from both Primary and Takeover nodes -->
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <!-- SAP LOCAL/Shared VOLUME GROUP-->
  <!-- volume group which is hosting instance directory for application instance -->
  <VOLUME_GROUP></VOLUME_GROUP>

  <!-- Hostname is the value of SAPINST_USE_HOSTNAME used while installing ABAP SCS Instance -->
  <!-- This hostname is expected to be an aliased address -->
  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <!-- which Ethernet interface to use for network communication -->
    <interfacename></interfacename>
    <!-- Prefix_or_Netmask -->
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <!-- Servive_Netmask for aliasing service ip -->
    <Service_Network></Service_Network>
  </HOSTNAME>

</SAPNW_ABAP_SCS>

<SAPNW_JAVA_SCS configure="yes">
  <INSTANCE_NAME>SCS00</INSTANCE_NAME>
  <INSTANCE_NUMBER>00</INSTANCE_NUMBER>
  <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
  <INSTANCE_DIRECTORY>/usr/sap/TS2/SCS00/</INSTANCE_DIRECTORY>
  <VOLUME_GROUP>SCSVG</VOLUME_GROUP>


  <HOSTNAME>
    <IPAddress_or_name>IPAddress_1</IPAddress_or_name>
    <interfacename>en0</interfacename>
    <Prefix_or_Netmask>/32</Prefix_or_Netmask>
    <Service_Network>dummy</Service_Network>
    </HOSTNAME>

</SAPNW_JAVA_SCS>

<SAPNW_ABAP_ERS configure="no">
  <INSTANCE_NAME></INSTANCE_NAME>
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <PrimaryNode></PrimaryNode>
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <VOLUME_GROUP></VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <interfacename></interfacename>
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <Service_Network></Service_Network>
  </HOSTNAME>

</SAPNW_ABAP_ERS>

<SAPNW_JAVA_ERS configure="yes">
  <INSTANCE_NAME>ERS10</INSTANCE_NAME>
  <INSTANCE_NUMBER>10</INSTANCE_NUMBER>
  <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
  <INSTANCE_DIRECTORY>/usr/sap/TS2/ERS10</INSTANCE_DIRECTORY>
  <VOLUME_GROUP>ERSVG</VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name>IPAddress_2</IPAddress_or_name>
    <interfacename>en0</interfacename>
    <Prefix_or_Netmask>/32</Prefix_or_Netmask>
    <Service_Network>dummy</Service_Network>
  </HOSTNAME>

</SAPNW_JAVA_ERS>

<SAPNW_AS configure="no">
  <INSTANCE_NAME></INSTANCE_NAME>
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <PrimaryNode></PrimaryNode>
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <VOLUME_GROUP></VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <interfacename></interfacename>
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <Service_Network></Service_Network>
  </HOSTNAME>

</SAPNW_AS>

<SAPNW_JAVA_JC configure="yes">
  <INSTANCE_NAME>J01</INSTANCE_NAME>
  <INSTANCE_NUMBER>01</INSTANCE_NUMBER>
  <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
  <INSTANCE_DIRECTORY>/usr/sap/TS2/J01/</INSTANCE_DIRECTORY>
  <VOLUME_GROUP>rootvg</VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name>IPAddress_3</IPAddress_or_name>
    <interfacename>en0</interfacename>
    <Prefix_or_Netmask>/32</Prefix_or_Netmask>
    <Service_Network>dummy</Service_Network>
  </HOSTNAME>

</SAPNW_JAVA_JC>

<SAPNW_AAS configure="no">
  <INSTANCE_NAME></INSTANCE_NAME>
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <PrimaryNode></PrimaryNode>
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <VOLUME_GROUP></VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <interfacename></interfacename>
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <Service_Network></Service_Network>
  </HOSTNAME>

</SAPNW_AAS>

<SAPNW_JAVA_J configure="yes">
  <INSTANCE_NAME>J02</INSTANCE_NAME>
  <INSTANCE_NUMBER>02</INSTANCE_NUMBER>
  <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
  <INSTANCE_DIRECTORY>/usr/sap/TS2/J02</INSTANCE_DIRECTORY>
  <VOLUME_GROUP>rootvg</VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name>IPAddress_4</IPAddress_or_name>
    <interfacename>en0</interfacename>
    <Prefix_or_Netmask>/32</Prefix_or_Netmask>
    <Service_Network>dummy</Service_Network>
  </HOSTNAME>

</SAPNW_JAVA_J>

<!-- It is recommended to set "configure" to "no" if all instances are in single machine.
     Set "configure" to "yes" and provide NFS server IP, if NFS based mount needed -->

<NFS_ADDRESS configure="no">
      <IPAddress_or_name></IPAddress_or_name>
</NFS_ADDRESS>

</SAPNWconfig>

For the SAP NetWeaver Java Central (JC) instances that depend on Oracle DB, you can create application dependency between Oracle DB and SAP NetWeaver's Java Central (JC) and application server (J) instances by completing the following procedure:

  1. To add an Oracle VM agent in the configfile, run the following command:
    ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=ORACLE instancename=<VALUE#1> database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
    Example:
    ksysvmmgr -s add app oracleapp type=ORACLE instancename=orauser database=DBRESP configfile=/var/ksys/config/samples/ORACLEconfig.xml
    For more details about adding an Oracle VM agent application, see the Oracle VM agent topic.
  2. Create an application dependency between Oracle DB, SAP NetWeaver's Java Central (JC), and application server (J) instances.
    • To create start_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app1,app2,app3 dependency_type=start_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=oracleapp,JC,J dependency_type=start_sequence
    • To create stop_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app3,app2,app1 dependency_type=stop_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=J,JC,oracleapp dependency_type=stop_sequence
  3. To verify dependency between an Oracle DB and SAP NetWeaver Java Central (JC) instance, run the following command:
    ksysvmmgr query dependency
    After creating the dependency, if the virtual machine reboots or if the virtual machine is relocated from one host to another host, then the virtual machine monitor (VMM) brings up the Oracle application before the SAP NetWeaver Java Central (JC) instance.
end of change
start of change Configuring SAP NetWeaver ABAP Stack with HANA Database:end of change
start of changeConfiguring SAP NetWeaver ABAP Stack with HANA Database involves setting up SAP's ABAP based applications to utilize SAP HANA as the underlying database. The process includes installing SAP HANA, configuring the HANA database for SAP NetWeaver, and establishing a connection between the ABAP stack and HANA. This aims to leverage the HANA's in-memory computing capabilities for enhanced performance and real-time data processing within the SAP environment.

Prerequisites

In the SAP NetWeaver application, the Primary Application Server (PAS) instance depend on HANA DB. You must configure the HANA DB during the SAP NetWeaver installation. Establish an application dependency between the HANA DB, Primary Application Server (PAS) instance to ensure seamless integration and data flow. Since PAS depends on HANA DB, PAS should be configured to start only after the HANA DB application has started, ensuring proper startup order and system stability.

Scripts

The KSYS VM daemon uses the following scripts to start, stop, and monitor the SAP NetWeaver application:
  • /usr/sbin/agents/sapnw/startsap
  • /usr/sbin/agents/sapnw/stopsap
  • /usr/sbin/agents/sapnw/monitorsap
To add the SAP NetWeaver VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPNW_ABAP_SCS| SAPNW_ABAP_ERS| SAPNW_AS| SAPNW_AAS instancename=<VALUE#1> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Example
ksysvmmgr -s add app SapNW_ASCS type=SAPNW_ABAP_SCS instancename=ASCS00 configfile=/var/ksys/config/samples/SAPNWconfig.xml
In this example, ASCS00 is the name of the instance. In the SAPNWconfig.xml file, the value of the instancename attribute is same as the INSTANCE_NAME attribute in the SAPNWconfig.xml file.
Attributes:
  • type: When you create the SAP NetWeaver application, the type attribute must have one of the following values: SAPNW_ABAP_SCS, SAPNW_ABAP_ERS, SAPNW_AS, or SAPNW_AAS.
  • instancename: The instancename attribute must have the same value as in the SAPNWconfig.xml file.
  • configfile: The configfile attribute specifies the file path of the configuration file that stores settings of the application configuration. You must specify the path of the configuration file while adding the SAP NetWeaver application. A sample configuration file, SAPNWconfig.XML is available in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values. If you do not specify appropriate values in the configuration file, then you cannot add the SAP NetWeaver application agent.
The following screen displays an example of a SAP NetWeaver configuration file (/var/ksys/config/samples/SAPNWconfig.xml) with example data:


<?xml version='1.0' encoding='UTF-8'?>
  <!--NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES. -->
<SAPNWconfig>
  <!--NOTE: If the SAP System has both, ABAP SCS instance and Java SCS Instance,
            they are expected to run on the same machine and both will be configured to be managed 
            through a single Resource Group -->


  <SAPNW_ABAP_SCS configure="yes">
    <!-- SAP ABAP SCS Instance name -->
    <INSTANCE_NAME>ASCS00</INSTANCE_NAME>
    <!-- SAP ABAP SCS Instance Number -->
    <INSTANCE_NUMBER>00</INSTANCE_NUMBER>
    <!-- Primary Node where ABAP SCS instance is running at present -->
    <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
    <!-- SAP ABAP SCS Instance Directory Path -->
    <!-- It is expected that this path is on a shared VG which must be accessible from both 
         Primary and Takeover nodes -->
    <INSTANCE_DIRECTORY>/root/instance_dir</INSTANCE_DIRECTORY>
    <!-- SAP LOCAL/Shared VOLUME GROUP-->
    <!-- volume group which is hosting instance directory for application instance -->
    <VOLUME_GROUP>/root/vg</VOLUME_GROUP>

    <!-- Hostname is the value of SAPINST_USE_HOSTNAME used while installing ABAP SCS Instance -->
    <!-- This hostname is expected to be an aliased address -->
    <HOSTNAME>
      <IPAddress_or_name>IPAddress_1</IPAddress_or_name>
      <!-- which Ethernet interface to use for network communication -->
      <interfacename>en0</interfacename>
      <!-- Prefix_or_Netmask -->
      <Prefix_or_Netmask>/32</Prefix_or_Netmask>
      <!-- Servive_Netmask for aliasing service ip -->
      <Service_Network>dummy</Service_Network>
    </HOSTNAME>

</SAPNW_ABAP_SCS>

<SAPNW_JAVA_SCS configure="no">
  <INSTANCE_NAME></INSTANCE_NAME>
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <PrimaryNode></PrimaryNode>
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <VOLUME_GROUP></VOLUME_GROUP>


  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <interfacename></interfacename>
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <Service_Network></Service_Network>
  </HOSTNAME>

</SAPNW_JAVA_SCS>

<SAPNW_ABAP_ERS configure="yes">
  <INSTANCE_NAME>ERS10</INSTANCE_NAME>
  <INSTANCE_NUMBER>10</INSTANCE_NUMBER>
  <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
  <INSTANCE_DIRECTORY>/usr/sap/TS2/ERS10</INSTANCE_DIRECTORY>
  <VOLUME_GROUP>hdisk4</VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name>IPAddress_2</IPAddress_or_name>
    <interfacename>en0</interfacename>
    <Prefix_or_Netmask>/32</Prefix_or_Netmask>
    <Service_Network>dummy</Service_Network>
  </HOSTNAME>

</SAPNW_ABAP_ERS>

<SAPNW_JAVA_ERS configure="no">
  <INSTANCE_NAME></INSTANCE_NAME>
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <PrimaryNode></PrimaryNode>
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <VOLUME_GROUP></VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <interfacename></interfacename>
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <Service_Network></Service_Network>
  </HOSTNAME>

</SAPNW_JAVA_ERS>

<SAPNW_AS configure="yes">
  <INSTANCE_NAME>D01</INSTANCE_NAME>
  <INSTANCE_NUMBER>01</INSTANCE_NUMBER>
  <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
  <INSTANCE_DIRECTORY>/usr/sap/TS2/D01/</INSTANCE_DIRECTORY>
  <VOLUME_GROUP>rootvg</VOLUME_GROUP>


  <HOSTNAME>
    <IPAddress_or_name>IPAddress_3</IPAddress_or_name>
    <interfacename>en0</interfacename>
    <Prefix_or_Netmask>/32</Prefix_or_Netmask>
    <Service_Network>dummy</Service_Network>
  </HOSTNAME>

</SAPNW_AS>

<SAPNW_JAVA_JC configure="no">
  <INSTANCE_NAME></INSTANCE_NAME>
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <PrimaryNode></PrimaryNode>
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <VOLUME_GROUP></VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <interfacename></interfacename>
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <Service_Network></Service_Network>
  </HOSTNAME>

</SAPNW_JAVA_JC>

<SAPNW_AAS configure="yes">
  <INSTANCE_NAME>D02</INSTANCE_NAME>
  <INSTANCE_NUMBER>02</INSTANCE_NUMBER>
  <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
  <INSTANCE_DIRECTORY>/usr/sap/TS2/D02/</INSTANCE_DIRECTORY>
  <VOLUME_GROUP>rootvg</VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name>IPAddress_4</IPAddress_or_name>
    <interfacename>en0</interfacename>
    <Prefix_or_Netmask>/32</Prefix_or_Netmask>
    <Service_Network>dummy</Service_Network>
  </HOSTNAME>

</SAPNW_AAS>

<SAPNW_JAVA_J configure="no">
  <INSTANCE_NAME></INSTANCE_NAME>
  <INSTANCE_NUMBER></INSTANCE_NUMBER>
  <PrimaryNode></PrimaryNode>
  <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
  <VOLUME_GROUP></VOLUME_GROUP>

  <HOSTNAME>
    <IPAddress_or_name></IPAddress_or_name>
    <interfacename></interfacename>
    <Prefix_or_Netmask></Prefix_or_Netmask>
    <Service_Network></Service_Network>
  </HOSTNAME>

 </SAPNW_JAVA_J>

 <!-- It is recommended to set "configure" to "no" if all instances are in single machine.
     Set "configure" to "yes" and provide NFS server IP, if NFS based mount needed -->

 <NFS_ADDRESS configure="no">
       <IPAddress_or_name></IPAddress_or_name>
 </NFS_ADDRESS>

</SAPNWconfig>

For the SAP NetWeaver Primary Application Server (PAS) instances that depend on HANA DB, you can create application dependency between HABA DB and SAP NetWeaver's Primary Application Server (PAS) and Additional Application Server (PAS) instances by completing the following procedure:
  1. To add an HANA DB VM agent, run the following command in the virtual machine where HANA Database is installed during the SAP NetWeaver environment setup:
    ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPHANA instancename=<VALUE#1> database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
    Example:
    ksysvmmgr -s add app SAP_yin013 type=SAPHANA instancename=S01 database=HDB01 configfile=/var/ksys/config/samples/SAPHANAconfig.xml
    To add the HANA Database application agent by using the SAPHANA sample configuration file use the following command:
    ksysvmmgr -s add app SAP_yin013 type=SAPHANA instancename=S01 database=HDB01 configfile=/var/ksys/config/samples/SAPHANAconfig.xml
  2. Create an application dependency between SAP NetWeaver's Java Central (JC), and application server (J) instances.
    • To create start_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app1,app2 dependency_type=start_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=PAS,AAS dependency_type=start_sequence
    • To create stop_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app2,app1 dependency_type=stop_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=AAS,PAS dependency_type=stop_sequence
  3. To verify dependency between SAP NetWeaver Primary Application Server (PAS) instance and Additional Application Server (AAS), run the following command:
    ksysvmmgr query dependency
  4. Establish an application dependency between HANA Database and SAP NetWeaver's Primary Application Server (PAS) instances at the ksys node level for coordinated startup and communication. To create parent_child dependency type, run the following command:
    ksysmgr add app_dependency <name>
          app_list=<vmname1:appname1,vmname2:appname2[,...]>
          type=<parent_child|primary_secondary>
          [mode=<sync|async>]
       add => ad*, cr*, make, mk
       app_dependency => app_dep*
    Example:
    ksysmgr add app_dependency SAPNW_HANADB_DEP type=parent_child app_list=yin013:SAP_yin013,e52den005:AS
    After creating the dependency, if the virtual machine reboots or if the virtual machine is relocated from one host to another host, then the virtual machine monitor (VMM) brings up the HANA application before the SAP NetWeaver ABAP Application Server (AS) instance.
end of change

Configuring SAP NetWeaver Java Stack with HANA Database

Configuring SAP NetWeaver Java Stack with HANA Database involves adapting SAP's Java based applications to utilize SAP HANA as the underlying database. The process involves installing SAP HANA, configuring it for SAP NetWeaver, and establishing a connection between the Java stack and HANA. This aims to leverage the HANA's in-memory computing capabilities for optimized performance and real-time data processing within the SAP environment.

start of change Configuring SAP NetWeaver Java Stack with HANA Databaseend of change
start of changeConfiguring SAP NetWeaver Java Stack with HANA Database involves adapting SAP's Java based applications to utilize SAP HANA as the underlying database. The process involves installing SAP HANA, configuring it for SAP NetWeaver, and establishing a connection between the Java stack and HANA. This aims to leverage the HANA's in-memory computing capabilities for optimized performance and real-time data processing within the SAP environment.

Prerequisites

In the SAP NetWeaver application, the Java Central (JC) instance depend on HANA DB. You must configure the HANA DB during the SAP NetWeaver installation. Establish an application dependency between the HANA DB, Java Central (JC) instance to ensure seamless integration and data flow. Since JC depends on HANA DB, JC should be configured to start only after the HANA DB application has started, ensuring proper startup order and system stability.

Scripts

The KSYS VM daemon uses the following scripts to start, stop, and monitor the SAP NetWeaver application:
  • /usr/sbin/agents/sapnw/startsap
  • /usr/sbin/agents/sapnw/stopsap
  • /usr/sbin/agents/sapnw/monitorsap
To add the SAP NetWeaver VM agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPNW_JAVA_SCS| SAPNW_JAVA_ERS| SAPNW_JAVA_JC| SAPNW_JAVA_J instancename=<VALUE#1> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Example
ksysvmmgr -s add app SapNW_JSCS type=SAPNW_JAVA_SCS instancename=SCS00 configfile="/var/ksys/config/samples/SAPNWconfig.xml"
In this example, SCS00 is the name of the instance. In the SAPNWconfig.xml file, the value of the instancename attribute is same as the INSTANCE_NAME attribute in the SAPNWconfig.xml file.
Attributes:
  • type: When you create the SAP NetWeaver application, the type attribute must have one of the following values: SAPNW_JAVA_SCS, SAPNW_JAVA_ERS, SAPNW_JAVA_JC, or SAPNW_JAVA_J.
  • instancename: The instancename attribute must have the same value as in the SAPNWconfig.xml file.
  • configfile: The configfile attribute specifies the file path of the configuration file that stores settings of the application configuration. You must specify the path of the configuration file while adding the SAP NetWeaver application. A sample configuration file, SAPNWconfig.XML is available in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values. If you do not specify appropriate values in the configuration file, then you cannot add the SAP NetWeaver application agent.
The following screen displays an example of a SAP NetWeaver configuration file (/var/ksys/config/samples/SAPNWconfig.xml) with example data:

<?xml version='1.0' encoding='UTF-8'?>
  <!--NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES. -->
<SAPNWconfig>
  <!--NOTE: If the SAP System has both, ABAP SCS instance and Java SCS Instance,
            they are expected to run on the same machine and both will be configured to be managed 
            through a single Resource Group -->


  <SAPNW_ABAP_SCS configure="no">
    <!-- SAP ABAP SCS Instance name -->
    <INSTANCE_NAME></INSTANCE_NAME>
    <!-- SAP ABAP SCS Instance Number -->
    <INSTANCE_NUMBER></INSTANCE_NUMBER>
    <!-- Primary Node where ABAP SCS instance is running at present -->
    <PrimaryNode></PrimaryNode>
    <!-- SAP ABAP SCS Instance Directory Path -->
    <!-- It is expected that this path is on a shared VG which must be accessible from both 
         Primary and Takeover nodes -->
    <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
    <!-- SAP LOCAL/Shared VOLUME GROUP-->
    <!-- volume group which is hosting instance directory for application instance -->
    <VOLUME_GROUP></VOLUME_GROUP>

    <!-- Hostname is the value of SAPINST_USE_HOSTNAME used while installing ABAP SCS Instance -->
    <!-- This hostname is expected to be an aliased address -->
    <HOSTNAME>
      <IPAddress_or_name></IPAddress_or_name>
      <!-- which Ethernet interface to use for network communication -->
      <interfacename></interfacename>
      <!-- Prefix_or_Netmask -->
      <Prefix_or_Netmask></Prefix_or_Netmask>
      <!-- Servive_Netmask for aliasing service ip -->
      <Service_Network></Service_Network>
    </HOSTNAME>

 </SAPNW_ABAP_SCS>

 <SAPNW_JAVA_SCS configure="yes">
   <INSTANCE_NAME>SCS00</INSTANCE_NAME>
   <INSTANCE_NUMBER>00</INSTANCE_NUMBER>
   <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
   <INSTANCE_DIRECTORY>/usr/sap/TS2/SCS00/</INSTANCE_DIRECTORY>
   <VOLUME_GROUP>SCSVG</VOLUME_GROUP>

   <HOSTNAME>
     <IPAddress_or_name>IPAddress_1</IPAddress_or_name>
     <interfacename>en0</interfacename>
     <Prefix_or_Netmask>/32</Prefix_or_Netmask>
     <Service_Network>dummy</Service_Network>
   </HOSTNAME>

 </SAPNW_JAVA_SCS>

 <SAPNW_ABAP_ERS configure="no">
   <INSTANCE_NAME></INSTANCE_NAME>
   <INSTANCE_NUMBER></INSTANCE_NUMBER>
   <PrimaryNode></PrimaryNode>
   <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
   <VOLUME_GROUP></VOLUME_GROUP>

   <HOSTNAME>
     <IPAddress_or_name></IPAddress_or_name>
     <interfacename></interfacename>
     <Prefix_or_Netmask></Prefix_or_Netmask>
     <Service_Network></Service_Network>
   </HOSTNAME>

 </SAPNW_ABAP_ERS>

 <SAPNW_JAVA_ERS configure="yes">
   <INSTANCE_NAME>ERS10</INSTANCE_NAME>
   <INSTANCE_NUMBER>10</INSTANCE_NUMBER>
   <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
   <INSTANCE_DIRECTORY>/usr/sap/TS2/ERS10</INSTANCE_DIRECTORY>
   <VOLUME_GROUP>ERSVG</VOLUME_GROUP>

   <HOSTNAME>
     <IPAddress_or_name>IPAddress_2</IPAddress_or_name>
     <interfacename>en0</interfacename>
     <Prefix_or_Netmask>/32</Prefix_or_Netmask>
     <Service_Network>dummy</Service_Network>
   </HOSTNAME>

 </SAPNW_JAVA_ERS>

 <SAPNW_AS configure="no">
   <INSTANCE_NAME></INSTANCE_NAME>
   <INSTANCE_NUMBER></INSTANCE_NUMBER>
   <PrimaryNode></PrimaryNode>
   <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
   <VOLUME_GROUP></VOLUME_GROUP>

   <HOSTNAME>
     <IPAddress_or_name></IPAddress_or_name>
     <interfacename></interfacename>
     <Prefix_or_Netmask></Prefix_or_Netmask>
     <Service_Network></Service_Network>
   </HOSTNAME>

 </SAPNW_AS>

 <SAPNW_JAVA_JC configure="yes">
   <INSTANCE_NAME>J01</INSTANCE_NAME>
   <INSTANCE_NUMBER>01</INSTANCE_NUMBER>
   <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
   <INSTANCE_DIRECTORY>/usr/sap/TS2/J01/</INSTANCE_DIRECTORY>
   <VOLUME_GROUP>rootvg</VOLUME_GROUP>

   <HOSTNAME>
     <IPAddress_or_name>IPAddress_3</IPAddress_or_name>
     <interfacename>en0</interfacename>
     <Prefix_or_Netmask>/32</Prefix_or_Netmask>
     <Service_Network>dummy</Service_Network>
   </HOSTNAME>

 </SAPNW_JAVA_JC>

 <SAPNW_AAS configure="no">
   <INSTANCE_NAME></INSTANCE_NAME>
   <INSTANCE_NUMBER></INSTANCE_NUMBER>
   <PrimaryNode></PrimaryNode>
   <INSTANCE_DIRECTORY></INSTANCE_DIRECTORY>
   <VOLUME_GROUP></VOLUME_GROUP>

   <HOSTNAME>
     <IPAddress_or_name></IPAddress_or_name>
     <interfacename></interfacename>
     <Prefix_or_Netmask></Prefix_or_Netmask>
     <Service_Network></Service_Network>
   </HOSTNAME>

 </SAPNW_AAS>

 <SAPNW_JAVA_J configure="yes">
   <INSTANCE_NAME>J02</INSTANCE_NAME>
   <INSTANCE_NUMBER>02</INSTANCE_NUMBER>
   <PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
   <INSTANCE_DIRECTORY>/usr/sap/TS2/J02</INSTANCE_DIRECTORY>
   <VOLUME_GROUP>rootvg</VOLUME_GROUP>

   <HOSTNAME>
     <IPAddress_or_name>IPAddress_4</IPAddress_or_name>
     <interfacename>en0</interfacename>
     <Prefix_or_Netmask>/32</Prefix_or_Netmask>
     <Service_Network>dummy</Service_Network>
   </HOSTNAME>

 </SAPNW_JAVA_J>

 <!-- It is recommended to set "configure" to "no" if all instances are in single machine.
      Set "configure" to "yes" and provide NFS server IP, if NFS based mount needed -->

 <NFS_ADDRESS configure="no">
       <IPAddress_or_name></IPAddress_or_name>
 </NFS_ADDRESS>

</SAPNWconfig>

For the SAP NetWeaver Java Central (JC) instances that depend on HANA DB, create application dependency between HABA DB and SAP NetWeaver's Java Central (JC) and application server (J) instances by completing the following procedure:
  1. To add an HANA DB VM agent, run the following command in the virtual machine where HANA Database is installed during the SAP NetWeaver environment setup:
    ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPHANA instancename=<VALUE#1> database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
    Example:
    ksysvmmgr -s add app SAP_yin013 type=SAPHANA instancename=S01 database=HDB01 configfile=/var/ksys/config/samples/SAPHANAconfig.xml
  2. Create an application dependency between SAP NetWeaver's Java Central (JC), and application server (J) instances.
    • To create start_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app1,app2 dependency_type=start_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=JC,J dependency_type=start_sequence
    • To create stop_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app2,app1 dependency_type=stop_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=J,JC dependency_type=stop_sequence
  3. To verify dependency between an HANA DB and SAP NetWeaver Java Central (JC) instance, run the following command:
    ksysvmmgr query dependency
  4. Establish an application dependency between HANA Database and SAP NetWeaver's Java Central (JC) instances at the ksys node level for coordinated startup and communication. To create parent_child dependency type, run the following command:
    ksysmgr add app_dependency <name>
          app_list=<vmname1:appname1,vmname2:appname2[,...]>
          type=<parent_child|primary_secondary>
          [mode=<sync|async>]
       add => ad*, cr*, make, mk
       app_dependency => app_dep*
    Example:
    ksysmgr add app_dependency SAPNW_HANADB_DEP type=parent_child app_list=yin013:SAP_yin013,e52den005:JC
    After creating the dependency, if the virtual machine reboots or if the virtual machine is relocated from one host to another host, then the virtual machine monitor (VMM) brings up the HANA application before the SAP NetWeaver Java Central (JC) instance.
end of change

Configuring S4HANA ABAP Stack with HANA Database On Linux

Configuring S4HANA ABAP Stack with HANA Database involves setting up SAP's ABAP based applications to utilize SAP HANA as the underlying database on a Linux server. The process includes installing SAP HANA, configuring the HANA database for S4HANA, and establishing a connection between the ABAP stack and HANA. This aims to leverage the HANA's in-memory computing capabilities for enhanced performance and real-time data processing within the SAP environment.

Prerequisites

In the S4HANA application, the Primary Application Server (PAS) instance depend on HANA DB. You must configure the HANA DB during the S4HANA installation. Establish an application dependency between the HANA DB, Primary Application Server (PAS) instance to ensure seamless integration and data flow. Since PAS depends on HANA DB, PAS should be configured to start only after the HANA DB application has started, ensuring proper startup order and system stability.

Linux Platform

By deploying on a Linux server, you benefit from the flexibility and scalability of the Linux operating system, which is widely supported by SAP HANA.

Scripts

The KSYS VM uses the following scripts to start, stop, and monitor the S4HANA application:
  • /usr/sbin/agents/s4hana/startsap
  • /usr/sbin/agents/s4hana/stopsap
  • /usr/sbin/agents/s4hana/monitorsap
To add the S4HANA agent, run the following command:
ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=S4HANA_ABAP_SCS| S4HANA_ABAP_ERS| S4HANA_ABAP_AS| S4HANA_ABAP_AAS instancename=<VALUE#1> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
Example
ksysvmmgr -s add app S4HANA_ASCS type=S4HANA_ABAP_SCS instancename=ASCS00 configfile=/var/ksys/config/samples/S4HANAconfig.xml
In this example, SCS00 is the name of the instance. In the S4HANAconfig.xml file, the value of the instancename attribute is same as the INSTANCE_NAME attribute in the S4HANAconfig.xml file.
Attributes:
  • type: When you create the S4HANA application, the type attribute must have one of the following values: S4HANA_ABAP_SCS, S4HANA_ABAP_ERS, S4HANA_ABAP_AS, or S4HANA_ABAP_AAS.
  • instancename: The instancename attribute must have the same value as in the S4HANAconfig.xml file.
  • configfile: The configfile attribute specifies the file path of the configuration file that stores settings of the application configuration. You must specify the path of the configuration file while adding the S4HANA application. A sample configuration file, S4HANAconfig.XML is available in the /var/ksys/config/samples folder. You can use this sample file by updating the attribute values. If you do not specify appropriate values in the configuration file, then you cannot add the S4HANA application agent.
The following screen displays an example of a S4HANA modified configuration file (/var/ksys/config/samples/S4HANAconfig.xml) with example data:



<?xml version='1.0' encoding='UTF-8'?>
<!--NOTE: PLEASE UNCOMMENT THE REQUIRED ATTRIBUTES AND SET APPROPRIATE VALUES. -->
<S4HANAconfig>
<!--NOTE: If the SAP System has ABAP SCS instance,
it is expected to run on the same machine and both will be configured to be managed through a
single Resource Group -->


<S4HANA_ABAP_SCS configure="yes">
<!-- SAP ABAP SCS Instance name -->
<INSTANCE_NAME>ASCS00</INSTANCE_NAME>
<!-- SAP ABAP SCS Instance Number -->
<INSTANCE_NUMBER>00</INSTANCE_NUMBER>
<!-- Primary Node where ABAP SCS instance is running at present -->
<PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
<!-- SAP ABAP SCS Instance Directory Path -->
<!-- It is expected that this path is on a shared VG which must be accessible from both Primary and Takeover nodes -->
<INSTANCE_DIRECTORY>/usr/sap/S01/ASCS00</INSTANCE_DIRECTORY>
<!-- SAP LOCAL/Shared VOLUME GROUP-->
<!-- volume group which is hosting instance directory for application instance -->
<VOLUME_GROUP>ASCSVG</VOLUME_GROUP>


<!-- Hostname is the value of SAPINST_USE_HOSTNAME used while installing ABAP SCS Instance -->
<!-- This hostname is expected to be an aliased address -->
<HOSTNAME>
<IPAddress_or_name>IPAddress_1</IPAddress_or_name>
<!-- which Ethernet interface to use for network communication -->
<interfacename>eth0</interfacename>
<!-- Prefix_or_Netmask
specifies the network range or subnet for the SAP virtual IP address used with ABAP Central Services,
such as “255.255.255.0” for IPv4 or a numeric prefix for IPv6. -->
<Prefix_or_Netmask>/20</Prefix_or_Netmask>
<!-- Servive_Netmask for aliasing service ip -->
<!-- The Service_Network tag designates the network interface or subnet for SAP ASCS/ERS service traffic;
as of now, please use the string "dummy" since VMM does not process this tag at the code base—it is included for future reference and can be updated later when needed. -->
<Service_Network>dummy</Service_Network>
</HOSTNAME>


</S4HANA_ABAP_SCS>


<S4HANA_ABAP_ERS configure="yes">
<INSTANCE_NAME>ERS10</INSTANCE_NAME>
<INSTANCE_NUMBER>10</INSTANCE_NUMBER>
<PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
<INSTANCE_DIRECTORY>/usr/sap/S01/ERS10</INSTANCE_DIRECTORY>
<VOLUME_GROUP>ERSVG</VOLUME_GROUP>


<HOSTNAME>
<!-- Update IP address or Name tag with IP address -->
<IPAddress_or_name>IPAddress_2</IPAddress_or_name>
<interfacename>eth0</interfacename>
<Prefix_or_Netmask>/20</Prefix_or_Netmask>
<Service_Network>dummy</Service_Network>
</HOSTNAME>


</S4HANA_ABAP_ERS>


<S4HANA_ABAP_PAS configure="yes">
<INSTANCE_NAME>D01</INSTANCE_NAME>
<INSTANCE_NUMBER>01</INSTANCE_NUMBER>
<PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
<INSTANCE_DIRECTORY>/usr/sap/S01/D01</INSTANCE_DIRECTORY>
<VOLUME_GROUP>rootvg</VOLUME_GROUP>


<HOSTNAME>
<IPAddress_or_name>IPAddress_3</IPAddress_or_name>
<interfacename>eth0</interfacename>
<Prefix_or_Netmask>/20</Prefix_or_Netmask>
<Service_Network>dummy</Service_Network>
</HOSTNAME>


</S4HANA_ABAP_PAS>




<S4HANA_ABAP_AAS configure="yes">
<INSTANCE_NAME>D02</INSTANCE_NAME>
<INSTANCE_NUMBER>02</INSTANCE_NUMBER>
<PrimaryNode>Primary_Vm_Name_1</PrimaryNode>
<INSTANCE_DIRECTORY>/usr/sap/S01/D02</INSTANCE_DIRECTORY>
<VOLUME_GROUP>rootvg</VOLUME_GROUP>


<HOSTNAME>
<IPAddress_or_name>IPAddress_4</IPAddress_or_name>
<interfacename>eth0</interfacename>
<Prefix_or_Netmask>/20</Prefix_or_Netmask>
<Service_Network>dummy</Service_Network>
</HOSTNAME>


</S4HANA_ABAP_AAS>


<!-- It is recommended to set "configure" to "no" if all instances are in single machine.
Set "configure" to "yes" and provide NFS server IP, if NFS based mount needed -->


<NFS_ADDRESS configure="no">
<IPAddress></IPAddress>
</NFS_ADDRESS>


<!-- Set "configure" to "yes" and provide the required mount information.
The mount points format for Linux environments is as follows:
mount <disk path> <destination path>


- *Disk Path*: Refers to the logical volume or device mapper path
that represents the storage device (e.g., /dev/mapper/ACSVG-ASCSLV).


- *Destination Path*: Refers to the directory in the file system
where the volume will be mounted (e.g., /usr/sap/TS2/ASCS00).


Please ensure the tags contain values in the format:
<disk path> <destination path>


Example:
/dev/mapper/ACSVG-ASCSLV /usr/sap/TS2/ASCS00


Note:
- If all SAP instances are on a single machine, you do not need to
update the NFS_SHARE_1 and NFS_SHARE_2 tags. -->


<LINUX_MOUNT_INFO configure="yes">
<ASCS_MOUNT>/dev/mapper/ACSVG-ASCSLV /usr/sap/S01/ASCS00</ASCS_MOUNT>
<ERS_MOUNT>/dev/mapper/ERSVG-ERSLV /usr/sap/S01/ERS10</ERS_MOUNT>
<TRANS_MOUNT_1>/dev/mapper/TRANSVG-TRANSLV1 /usr/sap/trans</TRANS_MOUNT_1>
<TRANS_MOUNT_2>/dev/mapper/TRANSVG-TRANSLV2 /sapmnt/S01</TRANS_MOUNT_2>
<NFS_SHARE_1>/dev/mapper/NFSVG-NFSLV1 /export/usr/sap/trans</NFS_SHARE_1>
<NFS_SHARE_2>/dev/mapper/NFSVG-NFSLV2 /export/sapmnt/S01</NFS_SHARE_2>
</LINUX_MOUNT_INFO>


</S4HANAconfig>

For the S4HANA instances that depend on HANA DB, create application dependency between HABA DB and S4HANA's Primary Application server (PAS) instance by completing the following procedure:
  1. To add an HANA DB VM agent, run the following command in the virtual machine where HANA Database is installed during the S4HANA environment setup:
    ksysvmmgr [-s] [-l {0|1|2|3}] add app <NAME> type=SAPHANA instancename=<VALUE#1> database=<VALUE#2> configfile=<VALUE#3> [<ATTR#n>=<VALUE#n>]
    Example:
    ksysvmmgr -s add app SAP_yin013 type=SAPHANA instancename=S01 database=HDB01 configfile=/var/ksys/config/samples/SAPHANAconfig.xml
  2. Create an application dependency between S4HANA's ASCS, ERS, Primary Application Server(PAS) and AAS instances.
    • To create start_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app1,app2,app3,app4 dependency_type=start_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=ASCS,ERS,PAS,AAS dependency_type=start_sequence
    • To create stop_sequence dependency type, run the following command:
      ksysvmmgr -s add dependency dependency_list=app4,app3,app2,app1 dependency_type=stop_sequence
      Example:
      ksysvmmgr -s add dependency dependency_list=AAS,PAS,ERS,ASCS dependency_type=stop_sequence
  3. To verify dependency between S4HANA Primary Application Server (PAS) instance and Additional Application Server (AAS), run the following command:
    ksysvmmgr query dependency
  4. Establish an application dependency between HANA Database and S4HANA's Primary Application Server (PAS) instances at the ksys node level for coordinated start up and communication. To create parent_child dependency type, run the following command:
    
    ksysmgr add app_dependency <name>
    app_list=<vmname1:appname1,vmname2:appname2[,...]>
    type=<parent_child|primary_secondary>
    [mode=<sync|async>]
    add => ad*, cr*, make, mk
    app_dependency => app_dep*
    Example:
    ksysmgr add app_dependency S4HANA_HANADB_DEP type=parent_child app_list=yin013:SAP_yin013,e52den005:AS
    After creating the dependency, if the virtual machine reboots or if the virtual machine is relocated from one host to another host, then the virtual machine monitor (VMM) brings up the HANA application before the S4HANA ABAP Primary Application Server (PAS) instance.