MENU

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Thursday, June 30, 2016

hdbbackupdiag in HANA

hdbbackupdiag Tool:

The output of hdbbackupdiag contains the names of all the files required to recover the SAP HANA database.
If you specify the --check option, the results of the metadata checks are also displayed.

Example : hdbbackupdiag --check --logDirs xyz/hana/backup/SID/log --dataDir xyz/hana/backup/SID/data/

Display all the backups required to recover the database until May 11, 2015, 01:05:00 p.m. The metadata of the backups is not checked.

Example: hdbbackupdiag -f -d xyz/hana/backup/SID/log -u "2016-06-21 05:05:00"

Note :  The time specified is UTC time, not local time.

hdbbackupcheck in HANA

hdbbackupcheck Tool :

You can use the hdbbackupcheck tool to manually check the integrity of individual data backups and log backups in SAP HANA .
If no errors were detected, hdbbackupcheck returns 0.
If an error was detected, hdbbackupcheck returns 1.

Example :
hdbbackupcheck   backup/data/BackupTestMaster_databackup_1_1
hdbbackupcheck  -v  backup/data/BackupTestMaster_databackup_1_1

Note : hdbbackupcheck notifies you if any errors were detected in the checked part of the backup.

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

Sunday, February 14, 2016

Deadlock detector graph in HANA

Please collect a deadlock detector graph .

This can be done via hdbcons -

hdbcons "deadlockdetector waitgraph -o {filename}"
hdbcons "deadlockdetector waitgraph -w -o {filename}"


You need to specify the full path for like /tmp/waitgraph.dot or /tmp/waitgraph_with_w.dot.

Tuesday, February 2, 2016

Binary export of a table in HANA



Here , I Explained about how to get the Binary export of a table in HANA Database using export utility.

Case Study : Binary export of the table from System SID !!!!

      Binary export for the Single table .

      export "Schema_Name"."Table_Name" as binary into 'PATH_DETAIL' ;

      Example:

      export "HANADBXY"."/1XT/D140/SID" as binary into xyz/HDB/BACKUP/;

      Binary export for  More then One tables at a time 

      export hanadbxy."SRIT_SEQ" "MSG", hanadbxy."SRIT_SEQ" "SEQ", hanadbxy."SRIT_MAP" as binary into xyz/HDB/BACKUP/ ;

      Compress Binary Export 

      Compress directory into a single file, e.g.

      tar czvf export.tgz export_dir_on_server

How to get the metadata of a table in HANA



Here , I Explained about how to get the metadata of a table in HANA Database using export utility.

we can export the table as CSV and the metadata is created in one of the files.

export HANADBXY."AA05B" AS CSV INTO '/hana/shared' WITH CATALOG ONLY

export HANADBXY."AA05B" AS CSV INTO 'xyz/hana/shared'