How to point Java stack to correct HANA node after takeover or failover in HANA multitenant database environment?
We are having SAP Java stack application server and after HANA takeover or HANA failover you want the JAVA stack to automatically points towards the correct SAP HANA node.
We are using the JAVA Stack connected to SAP HANA multitenant database containers.
The HDBUSERSTORE is only used to store connection information for SAP HANA application clients that supports ABAP, ODBC, HDBSQL connection types. Whereas JAVA stack uses JDBC based connection types for connecting to a SAP HANA Database which is not supported by HDBUSERSTORE.
Please do as following to resolve this issue:
Edit the URL property string in the Connection Pools window of the AS Java Config Tool so that it has information about the failover nodes or the node on the secondary sites you want to takeover
In the above example Url saphananode1 is the current working SAP HANA node and saphananode2 is the standby node that you want to failover too. The multitenant port is 3XX13 where XX is the instance number. SID is the name of the SAP HANA Database.
Although for windows environments SAP JAVA does not use HDBUSERSTORE functionality to connect to SAP HANA Database, but it is still Mandatory to add user SAPService<SID> to HDBUSERSTORE as described in the following SAP 1852017