LLI Wiki — My Digital Knowledge Base

Install SAP HANA 2.0 on Linux with hdblcm

Walkthrough of an interactive SAP HANA 2.0 installation with hdblcm: prerequisites, parameters, post-install checks with hdbsql.

This article walks through an interactive installation of an SAP HANA 2.0 database on Linux with hdblcm (SAP HANA Database Lifecycle Manager), and the first checks to run afterwards.

Prerequisites

#!/bin/bash
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

Start the installation

Run hdblcm as root from the extracted SAP_HANA_DATABASE directory. Note that the program is hdblcm, not hdbclm.

cd /path/to/SAP_HANA_DATABASE
./hdblcm

hdblcm scans the software location and lists the detected components (database and client). Answer n to the question about additional component locations, then choose the action 1 (install new system).

Index Action Description
1 install Install new system
2 extract_components Extract components
3 print_detected_components Print detected components
4 Exit (do nothing)

Parameters asked by the installer

The installer proposes a default value for most prompts (shown between brackets). The values used in this example:

Prompt Value
Additional components 2 (server, no additional component)
Installation path /hana/shared (default)
Local host name hanahost01 (default: the host name)
Add hosts to the system n
SAP HANA System ID HDB
Instance number 00
Local host worker group default
System usage 4 (custom)
Data and log volume encryption n
Data volumes location /hana/data/HDB
Log volumes location /hana/log/HDB
Restrict maximum memory allocation n
Apply system size dependent resource limits (SAP Note 3014176) y
Administrator home directory /usr/sap/HDB/home
Administrator login shell /bin/sh
Administrator user ID 1004
User group ID (sapsys) 79

The system usage can be production, test, development or custom.

The installer also asks for three passwords: the SAP Host Agent user (sapadm), the system administrator (hdbadm) and the SYSTEM database user. The SYSTEM password is checked against the password policy; the installer rejected passwords lacking a digit or an upper-case character:

System Database User (SYSTEM) Password is invalid
  System Database User (SYSTEM) Password must contain at least one digit
  System Database User (SYSTEM) Password must contain at least one upper-case character

The last question is whether to restart the system after a machine reboot (n here).

Summary and execution

Before installing, hdblcm prints a summary of the parameters (system ID, instance number, volumes, users, installation path, components, log and trace locations) and asks for confirmation. Answer y to continue. The installer then prepares and installs the packages, creates and configures the instance, installs the SAP Host Agent, starts the database processes, imports the delivery units and installs the resident hdblcm:

Installing components...
Installing SAP HANA Database...
  Creating System...
  Extracting software...
  ...
  Starting SAP HANA Database system...
    All server processes started on host 'hanahost01' (worker).
  Importing delivery units...
Installing Resident hdblcm...
SAP HANA Database System installed

The log file location is printed at the end of the run.

Check the installation

Check that the HANA processes are running (hdbnameserver, hdbindexserver, hdbcompileserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine):

ps -ef | grep -i hdb

The installer creates the <sid>adm operating system user (here hdbadm) and sapadm:

cat /etc/passwd | grep -E 'hdbadm|sapadm'

Then connect as hdbadm with hdbsql:

sudo su - hdbadm
hdbsql

In the hdbsql terminal, \mu switches multiline mode on, \al switches aligned output on and \s connects and shows the session status (user, port, kernel version, autocommit...). Connection to the system database:

hdbsql=> \s
Username: system
Password:
host          : localhost:30013
sid           : HDB
dbname        : HDB
user          : SYSTEM
kernel version: 2.00.066.00.1671096120
autocommit    : ON
sql port      : hanahost01:30015

Notes

References

Mastodon LLIMastodon SocialFosstodon