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.
user@workstation# 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.
user@workstation:/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.
user@workstation:/usr/sap/HXE/HDB90> hdbuserstore list
You can now connect to HANA DB from the hdbsql program using this key.
hdbsql=> \c -U usr1
-
JSON_TABLE Function
In this article, we'll take a look at how to use the ++JSON_TABLE++ function to represent JSON data stored in a regular column as a relational table.
31 March 2023 - 2405 views -
Connect To HANA DB Using Rust
Learn how to connect and query a HANA database using Rust with the hdbconnect package.
21 February 2023 - 2587 views -
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 - 8594 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 - 6963 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 - 7730 views -
Adding Auto Numbers To Table Columns
This article explains how to create an auto generated column using IDENTITY.
14 March 2018 - 5958 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 - 7486 views