DATABASE ADMIN GUIDE

Setup SAP HANA scaleout system

tips to make it as a distributed env..

Shaheer
databasetips

--

SAP HANA can run on single node system or a multinode setup a.k.a Scale-out/Cluster. Setup of SAP HANA database in a scaleout is pretty easier and straight forward as just like on a single node system. You just need to execute the instructions given along.

Prerequisite:-

  1. Required S/w version binary files
  2. Hosts (a.k.a nodes) should be reachable within cluster (internode connectivity)
  3. OS user is setup (if HANA database name is ABC, then os user is abcadm)

Binaries download instruction (if you haven’t have it already on the system):

Preparing binaries:-

go to support.sap.com > Software Downloads > Installations & Upgrades >

Search for the software for download

select relavant version for download

select SAPCAR extractor and add to download basket

Once you have the selected version in download basket, download it to local machine or transfer to the system where you are plan to run SAP HANA.

Run hdblcm from the downloaded files location (Under SAP_HANA_DATABASE dir):

host1:/hana_backup_location/SAP_HANA_DATABASE # ./hdblcm
SAP HANA Lifecycle Management — SAP HANA 1.00.122.24.1553744092
***************************************************************
Scanning Software Locations…
Detected components:
SAP HANA Database (1.00.122.24.1553744092) in /hana_backup_location/SAP_HANA_DATABASE/server
SAP HANA Database Client (1.00.120.123.1553287279) in /hana_backup_location/SAP_HANA_CLIENT/client
Choose system to update, or choose installation
Index | System | Database Properties
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
1 | Install new system |
| |
2 | Extract components |
3 | Exit (do nothing) |
Enter selected system index [4]: 2
SAP HANA Database version ‘1.00.122.24.1553744092’ will be installed.
Select additional components for installation:
Index | Components | Description
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
1 | server | No additional components
2 | all | All components
3 | client | Install SAP HANA Database Client version 1.00.120.123.1553287279
Enter comma-separated list of the selected indices [3]: 1
Enter Installation Path [/hana/shared]:
Enter Local Host Name [host1]: host1
Do you want to add additional hosts to the system? (y/n) [n]:
Enter SAP HANA System ID: ABC
The defined user ‘abcadm’ already exists on the system. Neither the password, nor any other attribute of the user will be changed.
Verify that the user is correct.
Enter Instance Number [00]: 04
Index | Database Mode | Description
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
1 | single_container | The system contains one database
2 | multiple_containers | The system contains one system database and 1..n tenant databases
Select Database Mode / Enter Index [1]: 1
Index | System Usage | Description
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -
1 | production | System is used in a production environment
2 | test | System is used for testing, not production
3 | development | System is used for development, not production
4 | custom | System usage is neither production, test nor development
Select System Usage / Enter Index [4]:
Enter Location of Data Volumes [/hana/data/ABC]:
Enter Location of Log Volumes [/hana/log/ABC]:
Restrict maximum memory allocation? [n]:
Enter Certificate Host Name For Host ‘host1’ [host1]:
Enter System Administrator (abcadm) Password:
Enter Database User (SYSTEM) Password:
Confirm Database User (SYSTEM) Password:
Restart system after machine reboot? [n]:
Summary before execution:
=========================
SAP HANA Components Installation
Installation Parameters
Remote Execution: ssh
Installation Path: /hana/shared
Local Host Name: host1
SAP HANA System ID: ABC
Instance Number: 04
Database Mode: single_container
System Usage: custom
Location of Data Volumes: /hana/data/ABC
Location of Log Volumes: /hana/log/ABC
Certificate Host Names: host1 -> host1
System Administrator Home Directory: /usr/sap/ABC/home
System Administrator Login Shell: /bin/bash
System Administrator User ID: 708884045
ID of User Group (sapsys): 708877546
Software Components
SAP HANA Database
Install version 1.00.122.24.1553744092
Location: /hana_backup_location/SAP_HANA_DATABASE/server
SAP HANA Database Client
Do not install
Note: The defined user ‘abcadm’ already exists on the system. Neither the password, nor any other attribute of the user will be changed.
Verify that the user is correct.
Do you want to continue? (y/n): y
Installing components…
Installing SAP HANA Database…
Preparing package ‘Saphostagent Setup’…
Preparing package ‘Python Support’…
Preparing package ‘Python Runtime’…
Preparing package ‘Product Manifest’…
Preparing package ‘Binaries’…
Preparing package ‘Data Quality’…
Preparing package ‘Krb5 Runtime’…
Preparing package ‘Installer’…
Preparing package ‘Ini Files’…
Preparing package ‘HWCCT’…
Preparing package ‘Emergency Support Package’…
Preparing package ‘EPM’…
Preparing package ‘Documentation’…
Preparing package ‘Delivery Units’…
Preparing package ‘DAT Languages’…
Preparing package ‘DAT Configfiles’…
Creating System…
Extracting software…
Installing package ‘Saphostagent Setup’…
Installing package ‘Python Support’…
Installing package ‘Python Runtime’…
Installing package ‘Product Manifest’…
Installing package ‘Binaries’…
Installing package ‘Data Quality’…
Installing package ‘Krb5 Runtime’…
Installing package ‘Installer’…
Installing package ‘Ini Files’…
Installing package ‘HWCCT’…
Installing package ‘Emergency Support Package’…
Installing package ‘EPM’…
Installing package ‘Documentation’…
Installing package ‘Delivery Units’…
Installing package ‘DAT Languages’…
Installing package ‘DAT Configfiles’…
Creating instance…
Starting SAP HANA Database system…
Starting 1 process on host ‘host1’ (worker):
Starting on ‘host1’: hdbupdconf
Starting 7 processes on host ‘host1’ (worker):
Starting on ‘host1’: hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
Starting on ‘host1’: hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
Starting on ‘host1’: hdbdaemon, hdbindexserver, hdbwebdispatcher, hdbxsengine
Starting on ‘host1’: hdbdaemon, hdbwebdispatcher, hdbxsengine
Starting on ‘host1’: hdbdaemon, hdbwebdispatcher
All server processes started on host ‘host1’ (worker).
Importing delivery units…
Importing delivery unit HCO_INA_SERVICE
Importing delivery unit HANA_DT_BASE
Importing delivery unit HANA_IDE_CORE
Importing delivery unit HANA_TA_CONFIG
Importing delivery unit HANA_UI_INTEGRATION_SVC
Importing delivery unit HANA_UI_INTEGRATION_CONTENT
Importing delivery unit HANA_XS_BASE
Importing delivery unit HANA_XS_DBUTILS
Importing delivery unit HANA_XS_EDITOR
Importing delivery unit HANA_XS_IDE
Importing delivery unit HANA_XS_LM
Importing delivery unit HDC_ADMIN
Importing delivery unit HDC_BACKUP
Importing delivery unit HDC_IDE_CORE
Importing delivery unit HDC_SEC_CP
Importing delivery unit HDC_XS_BASE
Importing delivery unit HDC_XS_LM
Importing delivery unit SAPUI5_1
Importing delivery unit SAP_WATT
Importing delivery unit HANA_BACKUP
Importing delivery unit HANA_HDBLCM
Importing delivery unit HANA_SEC_BASE
Importing delivery unit HANA_SEC_CP
Importing delivery unit HANA_ADMIN
Importing delivery unit HANA_WKLD_ANLZ
Installing Resident hdblcm…
Updating SAP HANA Instance Integration on Local Host…
Deploying SAP Host Agent configurations…
Creating Component List…
SAP HANA system installed
Log file written to ‘/var/tmp/hdb_ABC_hdblcm_install_2020–09–11_23.09.35/hdblcm.log’ on host ‘host1’.

Validate if the setup looks fine (by checking something called landscape in SAP’s language, also try connecting the database with system user which is the database user setup during installation)

landscape view
landscape view with single node
abcadm@host1:/usr/sap/ABC/HDB04/exe/python_support> hdbsql -i4 -u system
Password:
Welcome to the SAP HANA Database interactive terminal.
Type: \h for help with commands
\q to quit
hdbsql ABC=> exit

Now that we have setup HANA database in single node, we just need to execute hdbnsutil -reconfig — hostnameResolution=global before adding another node to the system. Make sure we execute this as adm user (here, abcadm):

abcadm@host1:/usr/sap/ABC/HDB04> hdbnsutil -reconfig — hostnameResolution=global
done.

ssh to the 2nd node, and execute following as root user:

host2:~ # cd /hana/shared/ABC/global/hdb/install/bin
host2:/hana/shared/ABC/global/hdb/install/bin # ./hdbaddhost
SAP HANA Lifecycle Management — Database Addhost 1.00.122.24.1553744092
***********************************************************************
Enter Local Host Name [host2]: host2
The defined user ‘ABCadm’ already exists on the system. Neither the password, nor any other attribute of the user will be changed.
Verify that the user is correct.
Enter System Administrator (ABCadm) Password:
Index | Host Role | Description
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
1 | worker | Host is used for database processing
2 | standby | Host is idle and available for failover of database processing
3 | extended_storage_worker | Host is used for Dynamic Tiering
4 | extended_storage_standby | Host is idle and available for failover of Dynamic Tiering
5 | ets_worker | Host is used for the Accelerator for SAP ASE
6 | ets_standby | Host is idle and available for failover of the Accelerator for SAP ASE
7 | streaming | Host is used for Smart Data Streaming
8 | rdsync | Host is used for Remote Data Sync
9 | xs_worker | Host is used for SAP HANA XS Advanced Runtime
10 | xs_standby | Host is idle and available for failover of SAP HANA XS Advanced Runtime
Select Host Role / Enter Index [1]:
Enter Host Failover Group [default]:
Summary before execution:
Installation Path: /hana/shared
SAP HANA System ID: ABC
Local Host Name: host2
Host Role: worker
Host Failover Group: default
Do you want to continue? (y/n): y
Checking master nameserver
Add new host ‘host2’ to SAP HANA Database system ‘ABC’
Adding host ‘host2’ to instance ‘04’…
hdbnsutil: adding host host2 to distributed landscape with role=worker, group=default …
Starting SAP HANA Database…
Starting 1 process on host ‘host2’ (worker):
Starting on ‘host2’: hdbupdconf
Starting 5 processes on host ‘host2’ (worker):
Starting on ‘host2’: hdbcompileserver, hdbdaemon, hdbindexserver, hdbnameserver, hdbpreprocessor
Starting on ‘host2’: hdbcompileserver, hdbdaemon, hdbindexserver, hdbpreprocessor
Starting on ‘host2’: hdbdaemon, hdbindexserver
All server processes started on host ‘host2’ (worker).
hdbaddhost done
Log file written to ‘/var/tmp/hdb_ABC_addhost_2020–09–11_23.24.03/hdbaddhost.log’ on host ‘host2’.

Check if the landscape looks good with new node information (as you can see we selected the additional node as worker, you can add as standby as well). For the worker nodes, the data is accessible from this node as well to the applications.

landscape view with node 2 info
landscape view with node 2 added

If you have additional volumes available for backups, ensure this is setup in database configuration as well, and a full backup to ensure you setup correctly:

hdbsql ABC=> ALTER SYSTEM ALTER CONFIGURATION (‘global.ini’, ‘SYSTEM’ ) SET (‘persistence’, ‘basepath_databackup’) = ‘/hana_backup/ABC/data’ WITH RECONFIGURE;
0 rows affected (overall time 92.612 msec; server time 90.776 msec)
hdbsql ABC=> ALTER SYSTEM ALTER CONFIGURATION (‘global.ini’, ‘SYSTEM’ ) SET (‘persistence’, ‘basepath_logbackup’) = ‘/hana_backup/ABC/log’ WITH RECONFIGURE;
0 rows affected (overall time 93.204 msec; server time 90.795 msec)
hdbsql ABC=> backup data all using file (‘FULLDBBACKUP’);
0 rows affected (overall time 8094.725 msec; server time 8092.601 msec)
hdbsql ABC=> exit

subsequent log backups are sent to newly configured backup path (just like data backups), in case you want to sent manually:

abcadm@host1:/usr/sap/ABC/HDB04> hdbcons “log backup”
SAP HANA DB Management Client Console (type ‘\?’ to get help for client commands)
Try to open connection to server process ‘hdbindexserver’ on system ‘ABC’, instance ‘04’
SAP HANA DB Management Server Console (type ‘help’ to get help for server commands)
Executable: hdbindexserver (PID: 58055)
[OK]

Log up to position 34734848 sent to backup
[OK]

[EXIT]

[BYE]
abcadm@host1:/hana_backup/ABC/data> cd /hana_backup/ABC/log
-rw-r----- 1 abcadm sapsys 12288 Sep 11 23:29 log_backup_0_0_0_0.1599866944601
drwxrwxrwx 4 abcadm sapsys 15507456 Sep 11 23:29 .

If you find anything +/-, let me know.

--

--