In this blog we will see how can we reset the
SYSTEM User Password of the
System Database
Note: The system database and all tenant databases each have their own SYSTEM user. The system administrator can reset the password of any SYSTEM user if it has been irretrievably lost.
Prerequisites
1: You have the credentials of the operating system administrator (<sid>adm).
2: as we lost password we can't reset from HANA Studio with command. if you are able to login in HANA Studio then change password in graphical interface from security tab or execute the ALTER USER SQL statement directly in SYSTEM Database SQL
ALTER USER SYSTEM PASSWORD <new_password>.
Procedure:
A: Log on to the server on which the name server of the system database is running as the operating system user (that is, <sid>adm user).
localhost:~ # su - hdbadm
hdbadm@localhost:/usr/sap/HDB/HDB00>
B: Shut down the instance by executing the following command:
/usr/sap/HDB/HDB<instance>/exe/sapcontrol -nr <instance> -function StopSystem HDB
or
HDB stop
Example:
hdbadm@localhost:/usr/sap/HDB/HDB00/exe
> /usr/sap/HDB/HDB00/exe/sapcontrol -nr 00 -function StopSystem HDB
20.05.2020 07:21:15
StopSystem
OK
hdbadm@localhost:/usr/sap/HDB/HDB00/exe>
C: In a new session, start the name server of the system database by executing the following commands:
a: /usr/sap/<SID>/HDB<instance>/hdbenv.sh
hdbadm@localhost:/usr/sap/HDB/HDB00>
./hdbenv.sh --> you will not get any output for this command
b: /usr/sap/<SID>/HDB<instance>/exe/hdbnameserver -resetUserSystem
hdbadm@localhost:/usr/sap/HDB/HDB00>
/usr/sap/HDB/HDB00/exe/hdbnameserver -resetUserSystem
Starting interactive
mode for resetting user SYSTEM...
service startup...
accepting requests
at 127.0.0.1:30001
searching for master
nameserver s4hana:30001 ...
assign as master
nameserver. assign to volume 1 started
service startup...
Checking for
recovery request ...
Loading topology ...
Opening persistence
...
run as transaction
master
Loading licensing
...
Loading topology ...
setStarting(nameserver@s4hana:30001:1)
setActive(nameserver@s4hana:30001)
service assigned as
master
service start as
systemserver
setInactive(preprocessor@s4hana:30002)
setInactive(webdispatcher@s4hana:30006)
setInactive(compileserver@s4hana:30010)
setInactive(xsengine@s4hana:30007)
setInactive(indexserver@s4hana:30003)
resetting of user SYSTEM - new
password:
Welcome777 You must enter a password that complies with the password policy configured for the system.
new pw accepted.
(Re)Activating user SYSTEM...
done
prepare for shutting
service down...
Stopping Linked
Database Cleaner Job ...
setStopping(nameserver@s4hana:30001)
stop
LicenseMeasurementTimerThread...
stop MinuteCron
thread...
stop LoadDataWriter
thread...
stop
HighResolutionServiceLoadMonitor thread...
stop ClockMonitor
thread...
stop LocalWatchDog
thread...
stop
MasterTokenLockWriter /usr/sap/HDB/SYS/global//hdb/nameserver.lck thread...
stop
MasterTokenLockWriter /hana/shared/HDB/global/hdb/data//mnt00001/nameserver.lck
thread...
stop FailoverManager
thread...
stop Topology Merge
thread...
setInactive(nameserver@s4hana:30001)
stop
TopologyReplicatorManager thread...
stop HALogWriter
thread...
saving topology...
Waiting for
TopologyReplicatorManager thread...
Waiting for
MinuteCron thread...
Waiting for
HighResolutionServiceLoadMonitor thread...
Waiting for
LoadDataWriter thread...
Waiting for
LocalWatchdog thread...
Waiting for
MasterTokenLockWriter /usr/sap/HDB/SYS/global//hdb/nameserver.lck thread...
Waiting for
MasterTokenLockWriter /hana/shared/HDB/global/hdb/data//mnt00001/nameserver.lck
thread...
Waiting for
FailoverManager thread...
Waiting for
ClockMonitor thread...
cleanup
LicenseManager ...Waiting for Topology Merge thread...
Waiting for
persistence ...
Disabling signal
handler...
Stopping self
watchdog...
Stopping request
dispatcher...
Shutting service
down...
setInactive(nameserver@s4hana:30001)
Stopping threads...
Stopping
responder...
Stopping
communication...
Deleting self
watchdog...
Deleting request
dispatcher...
Deleting
responder...
Deleting service...
Deleting threads...
Deleting pools...
Deleting
configuration...
Removing pidfile...
shutdown is
completed.
hdbadm@localhost:/usr/sap/HDB/HDB00>
D: In a new session, start the instance by executing the following command
hdbadm@localhost:/usr/sap/HDB/HDB00/exe>
/usr/sap/HDB/HDB00/exe/sapcontrol -nr 00 -function StartSystem HDB
20.05.XXXX 07:36:38
StartSystem
OK
hdbadm@localhost:/usr/sap/HDB/HDB00/exe>
Note:
The password of the SYSTEM user of the system database is reset. You have to change the new password the next time you log on with this user.
If you previously deactivated the SYSTEM user, it is now also reactivated. This means you will need to deactivate it again.
Note: Friends i am trying to share my knowledge and learning from experience. please help to correct if i am wrong.
Please refer SAP HANA Administration Guide