Introduction

With the aid of the SAP HANA system replication function, the SAP Business One, version for SAP HANA high availability (HA) solution ensures more reliable database service and nearly zero data loss in case of unplanned server outage. The HA functionality is available as of 9.0 PL03.

Prerequisites

  • Download HA package from Partner Edge https://sappartneredge.com/b1/documentation ==> 9.0 ==> B1 for HANA
    • Decompress zip file
    • Upload Linux scripts and configuration files to HANA servers
  • Install HANA on server1 and server2
  • Both HANA systems must share:
    • SYSTEM ID (SID): NDB
    • Instance number:00
    • Password for SYSTEM user
  • 64 and 32 bit client installed on both HANA servers and server tools server
  • Standalone Linux server for Apache Load Balancer and Server Tools
  • Your 2 HANA servers have the system time synchronized.  You can use the NTP service to accomplish this.

In order to enable HA you will need 3 server: 2 HANA servers and 1 Linux server for Apache Load Balancer and Server Tools.  The Linux server for Apache Load Balancer and Server Tools can be a vm.

Deployment and Configuration

The steps below provide an overview of what is installed to enable HA for Business One powered by HANA.  Please install in the order presented.  Do not skip ahead.

HANA components

The 64 and 32 bit version of the HANA client must be installed on all 3 servers.  Please use the default directories.  The 64-bit version installs to /usr/sap/hdbclient.  The 32-bit version installs to /usr/sap/hdbclient32.  You can install the client using ./hdbsetup (graphical) or ./hdbinst (console).

SAP Business One Server Tools

On the Linux Server where you are planning to install server tools, as root, navigate to the directory where the install.bin file resides and start it using ./install.bin.  The path is something like ../Packages Linux/ServerComponents.

An overview of the installation steps are available from https://scn.sap.com/community/business-one/blog/2013/08/08/90-bare-metal-to-live-system.

Please note the following points:

  • When prompted for the HANA hostname use the IP address of the primary HANA server.  Do not enter the hostname.
  • On the “Specify Security Certificates for Exteme App Framework select “Configure SSL after installation”.  Note 1929288 https://service.sap.com/sap/support/notes/1929288 contains more details

Post installation steps

  • In the browser open
    :40000/ControlCenter/”>https://
    :40000/ControlCenter/
  • Confirm the server tools system has been registered with SLD (system landscape directory)
  • Reinitialize the server tools
    • Logon to the server tools system with a SSH client
    • Copy the attached shell script reinit.sh to the installation path of the server tools (the default is /opt/sap/SAPBusinessOne/ServerTools).
    • Replace the following information in the script with your own data
      • REGISTER_HANA_SERVER=”10.58.1.121:30015;10.58.1.123:30015″

        Both HANA systems and the port for example 30015

      • REGISTER_HANA_SERVER_USER=”SYSTEM”
      • REGISTER_HANA_SERVER_PASSWD=”manager”
      • SLD_HANA_ADDRESS=’10.58.1.121:30015;10.58.1.123′

        The first set is primary HANAhost: the second is the Secondary HANAhost without the port

      • SLD_HANA_PORT=’30015′
      • SLD_DATABASE=’SLDDATA’
      • SLD_HANA_INSTANCE_NO=’00’
      • SLD_HANA_SERVER_USER=’SYSTEM’
      • SLD_HANA_SERVER_PASSWD=’manager’
      • TOMCAT_USER=”root”
      • TOMCAT_GROUP=”root”
      • SITE_PASSWD=’1234

        The value above becomes the value for B1SiteUser, if you do not want to change the value for B1SiteUser enter the existing password

    • Grant execute to reinit,sh using chmod 754 reinit.sh
    • Run the update scrip, reinit.sh, to reinitialize server tools
    • Execute /etc/init.d/sapb1servertools restart to restart the server tools
    • Delete reinit.sh to prevent the disclosure of private information

Installing the SAP Business One Server

The SBOCOMMON DB is required on both SAP HANA DBs.  The creation of the DB is accomplished by installing the SAP Business One Server on both HANA servers.  When the SAP Business One Server installer prompts for HANA DB provide the IP address for the HANA server on which you are installing the SAP Business One Server, do not provide the hostname.

Installing the SAP Business One Analytics powered by SAP HANA

The SAP Analytics must be installed on both SAP HANA DB server 1 and server 2.  When the SAP Business One Analytics installer prompts for HANA DB provide the IP address for the HANA server on which you are installing the SAP Business One Server, do not provide the hostname.

SAP Business One Analytics powered by SAP HANA post installation steps

  1. In the web browser navigate to :8443/Enablement/”>https://:8443/Enablement/ and confirm Analytics installed successful.  You should verify successful installation on both HANA hosts
  2. Logon to HANA host2 as ndbadm and stop B1AH by executing  ./B1AShutdown.sh from /opt/sap/SAPBusinessOne/AnalyticsPlatform/tomcat/bin
  3. Update the registration information of B1AH on Host1.
    1. In the SAP HANA studio, connect to SAP HANA Host1
    2. Execute UPDATE “SBOCOMMON”.”SLSPP” SET “ParamValue”=’’ WHERE “ParamKey”=’host’.  Replace with the name of your SAP Business One Server Tools host.
      1. You can use select “ParamValue” from “SBOCOMMON”.”SLSPP” WHERE “ParamKey”=’host’ to look up the host

Setting Up Apache Proxy Balancer

  1. Execute yast2 -i apache2 to confirm/install Apache
    1. You need to do this on the physical host or be connected with an xWindows client
    2. Before calling the command you can call xeyes to confirm your xWindows client is accepting requests
  2. Enable the http service with YaST you can find more information on https://www.suse.com/documentation/
    1. Network Services > HTTP server > Select network devices

2. Select Modules

3. Review Default Host settings and click next

4. Click next twice more then finish

3. Configure Apache, with yast, as shown below

1. HTTP Server ==> Server module ==> Add module.  In the pop-up select proxy_balancer

2. Enable the following modules:

    • proxy
    • proxy_http
    • ssl
    • proxy_balancer
    • headers

You enable the module by selecting it and clicking toggle status.

4. Run the following command to generate a private key and certificates for SSL:

  • mkdir –p /etc/apache2/b1
  • openssl req -nodes -newkey rsa:2048 -keyout /etc/apache2/b1/server.key -out /etc/apache2/b1/server.csr
  • openssl genrsa -des3 -out /etc/apache2/b1/sign.key 1024
  • openssl x509 -req -days 365 -in /etc/apache2/b1/server.csr -signkey /etc/apache2/b1/sign.key -out /etc/apache2/b1/server.crt
  • openssl rsa -in /etc/apache2/b1/sign.key -out /etc/apache2/b1/sign.key

5. In YaST add ports 8443 (B1AH) and 8000 (XAapp) to Apache

6. Copy the xs.conf and b1ah.conf files from download earlier to  /etc/apache2/vhosts.d directory, and then make the following updates with your own data:

  • b1ah.conf:
    • Update both balancer members with the IP addresses of the HANA database servers

  • xs.conf:
    • Update the balancer member with the IP address of Host1 (including the port number)
    • Update the header with the IP address of SAP Business One Server Tools server  (including the port numbers)

7. Restart Apache server using service apache2 restart

8. In a Web browser, navigate to https://:8443/Enablement/ to confirm you can access B1AH from the Apache proxy.

9. Update the Xapp information in the SLD

  1. In a Web browser, navigate to https://:40000/ControlCenter/ and log on as B1SiteUser.
  2. In the system landscape directory, on the Services tab, update the URL link of the Extreme App Framework service to HTTPS protocols: https://:80. For example, change the link to https://10.58.5.76:8000
  3. In a Web browser, navigate to the new URL link to confirm you can access the XApp from the Apache proxy

Enabling SAP HANA DB Replication

This section describes how to enable Primary and secondary HANA system replication.  Before proceeding please read section 14 of https://help.sap.com/hana/SAP_HANA_Administration_Guide_en.pdf.

1.  You must make the following change in global.ini of both HANA servers:

    • listeninterface: .global
    • Confirm the log_mode is set to  normal

2. Confirm both server can ping each other

3. Take a backup of HANA host 1 DB https://scn.sap.com/docs/DOC-44558#Task2_Backing_up_the_HANA_system_regularly

4. Enable system replication, on HANA host,1 by logging on as ndbadm and executing hdbnsutil -sr_enable –name=.  The command can be found in /usr/sap/NDB/HDB00/exe.

5. To enable system replication on Host2 and register Host2 with the primary site as the secondary site (standby database server), log on to Host2 as the ndbadm user and run the following commands:

  1. Shuts down the system: /usr/sap/NDB/HDB00/exe/sapcontrol -nr -function Stop
  2. Registery using hdbnsutil -sr_register –name= –remoteHost= –remoteInstance= –mode=syncmem the command can be found in /usr/sap/NDB/HDB00/exe
  3. Starts the SAP HANA system on Host2: HDB start

6. Confirm the replication status by connecting the SAP HANA Studio to SAP HANA host1 and opening the Administrator prospective.  In the administrator prospective select the Landscape tab select System Replication.

When you first enable replication you can track the replication status.

After the replication is completed you can check in the same location to confirm replication is enabled.

Enabling SSH Login without a Password

  1. Log on to SAP HANA Host1 as the ndbadm user.
  2. Run the following commands to generate a key pair:
    1. Generate a private/public key pair: ssh-keygen -t dsa -b 1024
    2. Create an authorized_keys file:
      1. cd /usr/sap/NDB/home/.ssh
      2. touch authorized_keys
      3. Assign read and write permission to the owner of the authorized_keys file: chmod 600 authorized_keys
  3. Log on to SAP HANA Host2 as the ndbadm user and generate a key pair as described in step 2.
  4. Log on to SAP Business One Server Tools server as a root user and run the following command to generate a key pair: ssh-keygen -t dsa -b 1024
  5. Copy the generated id_dsa.pub file to the two HANA hosts, and rename it as switch, as below:
    1. cd /root/.ssh
    2. scp id_dsa.pub ndbadm@:~/.ssh/switch
    3. scp id_dsa.pub ndbadm@:~/.ssh/switch
  6. Log on to HANA Host1 as the ndbadm user and do the following:
    1. Navigate to the ssh directory: cd ~/.ssh
    2. Append the public key to the authorized_keys file: cat switch >> authorized_keys
    3. Delete the temporary switch file: rm switch
  7. Log on to HANA Host2 as the ndbadm user and perform the same operations as in step 6.
  8. On SAP Business One Server tools server, run the following commands to try SSH login without a password:
    1. ssh ndbadm@
    2. ssh ndbadm@

Deploying Switch Script

This section describes how to deploy the monitoring and switch scripts. In the event of a failure on the active database server, you can switch on the standby database server to replace the active database.

Procedure

  1. Copy the attached b1h_switcher.sh and haenv.sh shell scripts to Server Tools Server.
  2. Open haenv.sh and update the following variables:
    1. hana_sid_user=ndbadm
    2. hana_instance_number=00
    3. hanadb01=10.58.1.121
    4. hanadb02=10.58.1.123

If you encounter a failure on your DB server, you run the b1h_switcher.sh script which will switch you to the standby server.

New NetWeaver Information at SAP.com

Very Helpfull

 

 

User Rating: Be the first one !