MENU

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Saturday, April 30, 2016

hdbuserstore in hana

The hdbuserstore (secure user store) is a tool installed with the SAP HANA client.hdbuserstore allows you to store SAP HANA connection information, including user passwords, securely on clients. In this way, client applications can connect to SAP HANA without the user having to enter host name or logon credentials.

Note - The hdbuserstore (secure user store) can be used only for SQLDBC-based connections. It cannot be used for JDBC-based connections. The SAP HANA studio does not use the hdbuserstore.

The hdbuserstore (secure user store) is installed with the SAP HANA client package and After installation of the SAP HANA client, the hdbuserstore program is located in the following directories.

/usr/sap/hdbclient (Linux/Unix)

How to check connection or key information using hdbuserstore.

1> hdbuserstore list

vsa21000:HDB:ABCadm /usr/sap/ABC/HDB00 51> hdbuserstore list

DATA FILE       : xyz/usr/sap/SID/home/.hdb/vuv21000/XYFS_HDB.DAT
KEY FILE        : xyz/usr/sap/SID/home/.hdb/vuv21000/XYFS_HDB.KEY

KEY DEFSID
  ENV : vadbsid:3X2XX
  USER: HANADB
KEY KEY01
  ENV : vadbSID:3X2XX
  USER: system
KEY SID
  ENV : localhost:3X2XX
  USER: system

XYFS_HDB.DAT - Connection information stored in the secure store is saved in the secure store file XYFS_HDB.DAT.

2> hdbuserstore list (key_name)
Example-  hdbuserstore list KEY01

How to Connect Using Stored User Key -

Using hdbsql, you specify the key to be used with the -U connection option-

hdbsql -U

Example -

> hdbsql -U KEY01

Welcome to the SAP HANA Database interactive terminal.

Type:  \h for help with commands
       \q to quit

hdbsql=>

how to set user key in hana

you can store user password in the form of key in HANA database by using hdbuserstore tool as below.

How to check Key Information -

vsa21000:HDB:ABCadm /usr/sap/ABC/HDB00 51> hdbuserstore list

DATA FILE       : /usr/sap/ABC/home/.hdb/vsa21000/SSFS_HDB.DAT
KEY FILE        : /usr/sap/ABC/home/.hdb/vsa21000/SSFS_HDB.KEY

KEY DEFSID
  ENV : vadbSID:30255
  USER: HANADBXYZ
KEY KEY01
  ENV : vadbSID:30255
  USER: system
KEY SID
  ENV : localhost:30255
  USER: system

Store password in KEY BKP with following command:

hdbuserstore -v SET (key_name) vadb(sid):30255 (user_name) (password)

Example -

hdbuserstore -v SET bkp vadbabc:30255 bkpkey abc123

vuv1000:HDB:sidadm xyz/usr/sap/SID/HDB00 51> hdbuserstore list

DATA FILE       : xyz/usr/sap/SID/home/.hdb/vuv1000/XYFS_HDB.DAT
KEY FILE        : xyz/usr/sap/SID/home/.hdb/vuv1000/XYFS_HDB.KEY

KEY BKP
  ENV : vadbsid:30255
  USER: bkp
KEY DEFSID
  ENV : vadbsid:30255
  USER: HANADBXY
KEY KEY01
  ENV : vadbABC:30255
  USER: system
KEY ABC
  ENV : localhost:30255
  USER: system