IBM Support

SAP Hana agent not connecting with user other than SYSTEM

Technical Blog Post


Abstract

SAP Hana agent not connecting with user other than SYSTEM

Body

After having installed the SAP HANA agent, you must configure it by providing mandatory information:

- Server Name / IP address of the SAP HANA server
- Port Number
- Database Name
- HANA DB User
- HANA DB User password

The Hana DB User is the account used by the agent to connect the SAP HANA DB.
Depending on how this user has been created, you may experience some unexpected behaviors and the agent may fail to
connect to SAP HANA DB.

For example, in a case I recently investigated, the agent was able to connect only using the SYSTEM account.
When it was configured to use another account (e.g: sap_agent_acct, ) it was failing to connect.
This clearly pointed me to investigate on the account definition, as I initially suspected about possible authorization problems.
The agent log showed messages like:

(5AC713D4.002D-460:ks7dbversion.cpp,42,"ks7DBVersion") Constructor
(5AC713D4.002E-460:ks7dbversion.cpp,87,"ks7DBVersion::DBVersionInfo") Query Execution Failed
(5AC713D4.002F-460:ks7dbversion.cpp,50,"~ks7DBVersion") Destructor
(5AC713D4.0030-460:ks7tenantdbsystemdetails.cpp,75,"DBTypeInfo") Query Execution Failed

 

 After a while the ks7client process also closed and was restarted by ks7agent.

This happened repeatedly with the agent never able to complete connection to the SAP HANA DB.


After having confirmed that the password was correctly set, in order to understand why the account was not
working when used when used with the agent, I did the following:

 

1.    Go to the directory where HanaDB Client is installed (eg: C:\Program Files\sap\hdbclient)
2.    Open command from this location
3.    Run the command : hdbsql
4.    From the client prompt, run: \c -n <saphana_server>:<port> -u <user_account> -p <password>

 

The execution of the hdbsql client with command \c basically performs a connection to the target SAP HANA DB.

It showed us where the problem was because  the server asked to change the password again.

In an interactive shell you can do it, but of course agent cannot cope with that request and so fails to connect.

This behavior occurs when the used is defined with "Force Password Change on next logon"  after a password reset.

I talked with db admin asking to reset again the password and remove this flag.

After this, agent has been reconfigured to match the new password and then it was able to connect and collect data from
SAP HANA DB.
So in case you experience any connection problem, first of all verify whether the user account works fine by using tool
hdbsql from command line, as suggested above.
If the problem is related to the user account, it will provide useful information to understand the root cause.

Hope it helps.
Best Regards

 


 

 

 

Tutorials Point

 

Subscribe and follow us for all the latest information directly on your social feeds:

 

 

image

 

image

 

image

 

 

  

Check out all our other posts and updates:

Academy Blogs:https://goo.gl/U7cYYY
Academy Videos:https://goo.gl/TLfMoF
Academy Google+:https://goo.gl/HnTs0w
Academy Twitter :https://goo.gl/AhR8CL


image

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11085169