Install SAP HANA and create a database - database configuration/design tasks

If you are tasked with installing and configuring the database, here is a list of steps to be taken:

  1. Install the SAP HANA ® database server on your computer.

    The installation program requires you to provide a strong password for system users. Keep this password in mind for future usage.

  2. Understand basic SAP HANA server administration tasks (command line).
    • The configuration files nameserver.ini and the indexserver.ini can be editied by the OS administrator user (root).
    • The default SAP HANA admin OS user is <sid>adm. For example, with SAP HANA express edition it is hxeadm.
    • To check if the SAP HANA server is up, use: the HDB info command.
    • To start/stop the SAP HANA server, use HDB start / HDB stop commands.
    • If needed, configure the host firewall for remote connections. For example, on UNIX/Linux, check TCP ports to be opened with the netstat -tnlp command.
  3. Create a SAP HANA database entity: dbname
    Connect as the SYSTEM user to the SystemDB database and create the application database:
    Note: In next examples the SAP HANA instance number is 90.
    $ hdbsql -i 90 -d SystemDB -u SYSTEM -p system-password
    ...> CREATE DATABASE dbname SYSTEM USER PASSWORD password;
    ...> \q
  4. Create the DB user to be the owner of application database tables.
    Connect to the new created database with the SYSTEM user, and create the application user, and grant the required privileges to create tables:
    $ hdbsql -i 90 -d dbname -u SYSTEM -p system-password
    ...> CREATE USER appadmin PASSWORD password;
    ...> GRANT USER ADMIN TO appadmin WITH ADMIN OPTION;
    ...> \q
  5. Create the application tables with CREATE TABLE statements.
    Connect to the application database as the application administrator and create the tables:
    $ hdbsql -i 90 -d dbname -u appadmin -p password
    ...> CREATE TABLE customer ( ... ) ;
    ...

    Convert Informix® data types to SAP HANA data types. See issue Data Type Conversion Table for more details.

  6. If you plan to use SERIAL column emulation, you must prepare the database.