Install SAP HANA on node-a

  1. Create a /sap-install directory on node-a which will contain the SAP HANA installation files.
mkdir /sap-install
  1. Download the SAP HANA installation files to /sap-install on node-a.
  1. Extract the SAP HANA installation files. In this example we are installing SAP HANA 2.0 SPS04 Platform Edition.
[root@node-a ~]# unzip /sap-install/hana-2-platform-edition-sp4.zip -d /sap-install/
  1. Run the hdblcm executable to begin the installation.
[root@node-a ~]# /sap-install/DATA_UNITS/HDB_LCM_LINUX_X86_64/hdblcm
  1. Enter the following parameters to complete a basic installation of the SAP HANA Database Server. Select other optional components during installation as required for your deployment. The icon indicates that the default option is chosen.
Field
Value
Enter selected action index 1 (install)
Components to install 2 (HDB Server)
Enter Installation Path /hana/shared
Enter Local Host Name node-a
Do you want to add hosts to the system? (y/n) n
Enter SAP HANA System ID SPS
Enter Instance Number 00
Enter Local Host Worker Group default
Select Usage / Enter Index 4 (custom)
Enter Location of Data Volumes /hana/data/SPS
Enter Location of Log Volumes /hana/log/SPS
Restrict maximum memory allocation? n
Enter Certificate Host Name for Host ‘node-a’ node-a
Enter System Administrator (spsadm) Password <spsadm User Password>
Confirm System Administrator (spsadm) Password <spsadm User Password>
Enter System Administrator Home Directory /usr/sap/SPS/home
Enter System Administrator Login Shell /bin/sh
Enter System Administrator User ID 1001 (or default value)
Enter ID of User Group (sapsys) 79 (or default value)
Enter System Database User (SYSTEM) Password <SYSTEM DB User Password>
Confirm System Database User (SYSTEM) Password <SYSTEM DB User Password>
Restart system after machine reboot? n
Do you want to continue? y
  1. Once the installation completes, execute the following command on node-a to verify that the HDB00 instance is running successfully:
[root@node-a ~]# su - spsadm -c "sapcontrol -nr 00 -function GetProcessList"
04.03.2021 23:42:13
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2021 03 04 23:38:10, 0:04:03, 23804
hdbcompileserver, HDB Compileserver, GREEN, Running, 2021 03 04 23:38:41, 0:03:32, 24044
hdbnameserver, HDB Nameserver, GREEN, Running, 2021 03 04 23:38:11, 0:04:02, 23822
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2021 03 04 23:38:41, 0:03:32, 24047
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2021 03 04 23:39:24, 0:02:49, 24454
hdbindexserver, HDB Indexserver-SPS, GREEN, Running, 2021 03 04 23:38:41, 0:03:32, 24093
hdbxsengine, HDB XSEngine-SPS, GREEN, Running, 2021 03 04 23:38:41, 0:03:32, 24096

Install SAP HANA on node-b

  1. Repeat the installation steps from the previous section on node-b, replacing “node-a” by “node-b” wherever it appears.
  1. Once the installation completes, execute the following command on node-b to verify that the HDB00 instance is running successfully.
[root@node-b ~]# su - spsadm -c "sapcontrol -nr 00 -function GetProcessList"
04.03.2021 23:44:09
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2021 03 04 23:38:16, 0:05:53, 10785
hdbcompileserver, HDB Compileserver, GREEN, Running, 2021 03 04 23:38:46, 0:05:23, 11111
hdbnameserver, HDB Nameserver, GREEN, Running, 2021 03 04 23:38:16, 0:05:53, 10804
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2021 03 04 23:38:46, 0:05:23, 11114
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2021 03 04 23:39:29, 0:04:40, 11438
hdbindexserver, HDB Indexserver-SPS, GREEN, Running, 2021 03 04 23:38:47, 0:05:22, 11159
hdbxsengine, HDB XSEngine-SPS, GREEN, Running, 2021 03 04 23:38:47, 0:05:22, 11162

Back up the SYSTEMDB and SPS Databases on Both Nodes

Execute the following commands on both node-a and node-b to create backups of the SYSTEMDB database and the SPS tenant database, replacing <SYSTEM User Password> with the password for the SYSTEM database user:

# su - spsadm -c "hdbsql -i 00 -u SYSTEM -p <SYSTEM User Password> -d SystemDB \"BACKUP DATA USING FILE ('/hana/shared/SPS/HDB00')\""
0 rows affected (overall time 7390.598 msec; server time 7388.081 msec)

# su - spsadm -c "hdbsql -i 00 -u SYSTEM -p <SYSTEM User Password> -d SPS \"BACKUP DATA USING FILE ('/hana/shared/SPS/HDB00')\""
0 rows affected (overall time 5104.380 msec; server time 5102.842 msec)

Copy the PKI ssfs KEY and DAT Files

  1. Execute the following command to stop the HDB00 instance on node-b.
[root@node-b ~]# su - spsadm -c “sapcontrol -nr 00 -function StopSystem HDB”
04.03.2021 23:55:10
StopSystem
OK
  1. Verify that the HDB00 instance has been successfully stopped on node-b.
[root@node-b ~]# su - spsadm -c "sapcontrol -nr 00 -function GetProcessList"
04.03.2021 23:55:51
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GRAY, Stopped, , , 10785
  1. Execute the following command to copy the /usr/sap/SPS/SYS/global/security/rsecssfs/data/SSFS_SPS.DAT and /usr/sap/SPS/SYS/global/security/rsecssfs/key/SSFS_SPS.KEY files from node-a to node-b.
[root@node-a ~]# scp -r /usr/sap/SPS/SYS/global/security/rsecssfs/ root@node-b:/usr/sap/SPS/SYS/global/security/
SSFS_SPS.DAT              100% 2960     2.8MB/s   00:00
SSFS_SPS.KEY              100%  187   190.9KB/s   00:00

Configure SAP HANA System Replication

  1. Execute the following command on node-a to enable system replication using site name SiteA.
[root@node-a ~]# su - spsadm -c "hdbnsutil -sr_enable --name=SiteA"
nameserver is active, proceeding ...
successfully enabled system as system replication source site
done.
  1. Execute the following command to register node-b as a secondary system replication site using site name SiteB.
[root@node-b ~]# su - spsadm -c "hdbnsutil -sr_register --remoteHost=node-a --remoteInstance=00 --replicationMode=sync --operationMode=logreplay --name=SiteB"
adding site ...
nameserver node-a:30001 not responding.
collecting information ...
updating local ini files ...
done.
  1. Execute the following command to start the HDB00 instance on node-b.
[root@node-b ~]# su - spsadm -c "sapcontrol -nr 00 -function StartSystem HDB"
05.03.2021 00:11:51
StartSystem
OK
  1. Execute the following commands to verify that the HDB00 instance is running successfully on node-b and that the replication and operation modes are primary/primary and sync/logreplay on node-a and node-b, respectively.
[root@node-b ~]# su - spsadm -c "sapcontrol -nr 00 -function GetProcessList"
05.03.2021 00:13:36
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2021 03 05 00:11:52, 0:01:44, 15816
hdbcompileserver, HDB Compileserver, GREEN, Running, 2021 03 05 00:11:57, 0:01:39, 15940
hdbindexserver, HDB Indexserver-SPS, GREEN, Running, 2021 03 05 00:11:57, 0:01:39, 15997
hdbnameserver, HDB Nameserver, GREEN, Running, 2021 03 05 00:11:52, 0:01:44, 15835
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2021 03 05 00:11:57, 0:01:39, 15943
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2021 03 05 00:12:02, 0:01:34, 16217
hdbxsengine, HDB XSEngine-SPS, GREEN, Running, 2021 03 05 00:11:57, 0:01:39, 16000


[root@node-b ~]# su - spsadm -c "hdbnsutil -sr_state"
System Replication State
~~~~~~~~~~~~~~~~~~~~~~~~

online: true

mode: sync
operation mode: logreplay
site id: 2
site name: SiteB

is source system: false
is secondary/consumer system: true
has secondaries/consumers attached: false
is a takeover active: false
active primary site: 1

primary masters: node-a

Host Mappings:
~~~~~~~~~~~~~~

node-b -> [SiteB] node-b
node-b -> [SiteA] node-a

Site Mappings:
~~~~~~~~~~~~~~
SiteA (primary/primary)
    |---SiteB (sync/logreplay)

Tier of SiteA: 1
Tier of SiteB: 2

Replication mode of SiteA: primary
Replication mode of SiteB: sync

Operation mode of SiteA: primary
Operation mode of SiteB: logreplay

Mapping: SiteA -> SiteB
done.

Now that the HDB00 instance is running on node-a and node-b and both nodes are registered in SAP HANA System Replication, we are ready to create the SAP HANA resource in LifeKeeper.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment