Tuesday, 8 March 2016

Reset the SYSTEM User's Password in HANA DB

Overview
If the SYSTEM user's password is lost, you can reset it as the operating system administrator by starting the index server in emergency mode. If your HANA DB is Multitenant, this process will not work.  My HANA DB revision was 102.04

Prerequisites
You have the credentials of the operating system administrator (<sid>adm).

Procedure
Step 1: Log on to the server on which the master index server is running as the operating system user (that is, <sid>adm user).

Step 2: Open a command line interface.

Step 3: Shut down the instance by executing the following command:
/usr/sap/<SID>/HDB<instance>/exe/sapcontrol -nr <instance> -function StopSystem HDB

SAP HANA Certifications and Material

Step 4: In a new session, start the name server by executing the following commands:

/usr/sap/<SID>/HDB<instance>/hdbenv.sh
/usr/sap/<SID>/HDB<instance>/exe/hdbnameserver

SAP HANA Material and Certifiacations

This will stay hanged state…

Step 5: In a new session, start the compile server by executing the following commands:

/usr/sap/<SID>/HDB<instance>/hdbenv.sh
/usr/sap/<SID>/HDB<instance>/exe/hdbcompileserver

SAP HANA Certifications and Material

This will stay hanged state…

Step 6: In a new session, start the index server by executing the following commands:

/usr/sap/<SID>/HDB<instance>/hdbenv.sh
/usr/sap/<SID>/HDB<instance>/exe/hdbindexserver -resetUserSystem

SAP HANA DB, Certifications and Material

The following prompt appears: resetting of user SYSTEM - <<<new password>>>

Step 7: Enter a new password for the SYSTEM user.
You must enter a password that complies with the password policy configured for the system.
The password for the SYSTEM user is reset and the index server stops.

Step 8: In the terminals in which they are running, end the name server and compile server processes by pressing CTRL+C.

Step 9: In a new session, start the instance by executing the following command:
/usr/sap/<SID>/HDB<instance>/exe/sapcontrol -nr <instance> -function StartSystem HDB

Note:
In a scale-out system, you only need to execute the commands on the master index server.

Results
The SYSTEM user's password is reset. You do not have to change this new password the next time you log on with this user regardless of your password policy configuration.

Source: scn.sap.com