contexts
The company's project adapted a variety of databases including SAP Hana, due to a colleague's database connection tool to save the old password of a database in use, resulting in the user will be locked from time to time. The problem has been solved by checking the official documents, and here is a unified record.
Disable the password lockout method
The solutions are listed below separately for system administrators and regular users.
Disable SYSTEM administrator password lockout
Find the directory where Hana is installed in the[password policy]
Add under the blockpassword_lock_for_system_user = false
, restart the Hana database.
Disable general user password lockout
Disable all common user password lockout methods
Find the directory where Hana is installed in the[password policy]
Add under the blockpassword_locktime = 0
, restart the Hana database.
Disable some common user password lockout methods (recommended, no need to restart Hana)
Use sql to create a user group, set the lockout time for users in that group to 0, and then add the users you want to disable lockout to that group.
-- Create a user group and set a password-free locktime for the group's users
CREATE USERGROUP UNLOCKED_PASSWORD_USER_GROUP SET PARAMETER 'password_locktime' = '0' ENABLE PARAMETER SET 'password policy';
-- Add users who need to disable locking to the group
ALTER USER <your user> SET USERGROUP UNLOCKED_PASSWORD_USER_GROUP;
PS: Users who have been locked out need to execute SQL to unlock them:ALTER USER <user_name> RESET CONNECT ATTEMPTS;