Connect to database failed, rc=1, rcSQL=10, SQLERRTEXT : authentication failed (HANA)

You have SAP running (Windows operating system) on SAP HANA database. During the startup, SAP application failed to bring up due to below error. The error was found in the dev_w* log file.

Try to connect via secure store (DEFAULT) on connection 0 ...
ERROR => Connect to database failed, rc=1, rcSQL=10
SQLCODE    : 10
SQLERRTEXT : authentication failed
LOG BY2=> sql error 10     performing CON [dbsh         1262]
LOG BY0=> authentication failed [dbsh         1262]
LOG BY2=> sql error 10     performing CON [dblink       644]
LOG BY0=> authentication failed [dblink       644]
LOG R19=> ThDbConnect, db_connect ( DB-Connect 000256) [thDatabase.c 86] in_ThErrHandle: 1
ERROR => ThInit: db_connect (step TH_INIT, thRc ERROR-DB-CONNECT_ERROR, action STOP_WP, level 1) 

Note: The port may vary in HANA Multi-DB environments. For Netweaver 7.50 the technical SAP-user might be SAPABAP1 whereas in earlier releases the common naming convention for the technical SAP user is SAP.

The information stored in the hdbuserstore for a certain key can be verified for its correctness by executing the following command as adm user:

hdbsql -U DEFAULT

This will establish an SQL connection to the HANA database with the connection information stored under the DEFAULT key.

Note 1: Special characters like ‘$’ in a password can cause the hdbuserstore command to fail. To ensure the password is set correctly, always wrap it in single quotes:

hdbuserstore SET DEFAULT HOSTNAME:PORT SAPHANADB 'PASSWORD'

Note 2: Alternatively, run hdbuserstore in interactive mode to avoid shell character issues:


hdbuserstore -i SET DEFAULT HOSTNAME:PORT SAPHANADB

You May Also Like

Leave a Reply?