You can use the hdbuserstore program to securely store connection details on a client machine. Connection details are stored against a key where the key is then used to substitute the connection details. You can then use this key to connect to HANA DB using the hdbsql program.
Login as hxeadm at an OS level or simply change users in a terminal using the su command.
[email protected]# su hxeadm
The SET command for the hdbuserstore program is used to add/update a key. The parameters for this command is listed below.
KEY - Entry key name
ENV - Database location
USERNAME - Database username
PASSWORD - Database password
DATABASE - Database name
Below is an example of storing the the connection details for user JOHN.
[email protected]:/usr/sap/HXE/HDB90> hdbuserstore SET usr1 "127.0.0.1:39013" JOHN Pass123
The example above stores the connection details using the key usr1. You can change the name of this key to anything you want. To update the connection details, simply use the SET command with the same KEY name. To verify the command was successful, execute the LIST command as shown below.
[email protected]:/usr/sap/HXE/HDB90> hdbuserstore list
You can now connect to HANA DB from the hdbsql program using this key.
hdbsql=> \c -U usr1
If Table Exists Function
In this article, I explain how to create a function to determine if a table exists in SAP HANA.31 October 2019 - 1096 views
Connect To HANA DB Using NodeJs
This article explains how to connect to a SAP HANA system using the Node HANA client library.28 October 2019 - 1469 views
Connect To HANA DB Using Python
This article explains how to connect to a SAP HANA system using the Python hdbcli package.11 October 2018 - 2998 views
Adding Auto Numbers To Table Columns
This article explains how to create an auto generated column using IDENTITY.14 March 2018 - 1388 views
Connecting To SAP HANA Using PHP ODBC
This article describes how to install and configure PHP odbc to connect to a SAP HANA system on Ubuntu 16.01 December 2017 - 3131 views
Connect To HANA DB Using Java
This article describes how to connect to a HANA DB system using the ngdbc.jar Java driver.03 November 2017 - 1971 views
Loading And Unloading Column Table Into And From Memory
This article explains how to load and unload a column table into and from memory.18 October 2017 - 1403 views