How to find who locked SAP HANA user & unlock

Our ERP schema user was getting locked in HANA and causing a downtime for the application , we had to enable an audit policy on HANA to find out who’s locking the user :
A database user may be locked because of the (default) password policy defined:

indexserver.ini > password policy > maximum_invalid_connect_attempts = 6

In the Navigator view of HANA Studio, open the Security editor of the system to be audited

Policy  Custom Name
Policy Status ENABLED
Audited Actions CONNECT
Audited Action Status UNSUCCESSFUL
Audit Level INFO

Capture

and when the user gets locked , check the syslog :

Sep 30 11:10:45 adb-b-01 HDB_SYSTEMDB[108366]: 2015-09-30 11:10:45;nameserver;adb-b-01;ADB;60;36001;SYSTEMDB;172.20.135.177;MG016751.ABCDZ.COM.AU;3584;59783;Jtest;INFO;CONN ECT;SYSTEM;;;;;;JJOY;UNSUCCESSFUL;;;;;;authentication failed at ptime/query/catalog/catalog_authmgr.cc:440;;116308;jjoy;

and the HANA user can be activated and also reset the connection attempts  via

alter user SAPSACM activate user now
alter user SAPSACM RESET CONNECT ATTEMPTS

also the number of invalid connection attempts can be viewed via :   Select * from “SYS”.”USERS”

Ref SAP note : 1855211 – Technical database user is repeatedly locked

Leave a comment