cancel
Showing results for 
Search instead for 
Did you mean: 

How to get hostname in SAP HANA

Former Member
0 Kudos
11,408

Hi,

I want to get the hostname of current SAP HANA via SQL statement, just like

     SELECT host_name()

in SQL server. I try this in SAP Hana, but it doesn't work. So is there any way to get hostname, instance number

of an SAP HANA using SQL statement? thanks

View Entire Topic
former_member781059
Discoverer
0 Kudos

Hi,

I have the same issue where XSA Migration Assistant tells me

"Error: HANA_HOST not set in environment"

I have gotten the parameters as such from HANA queries:

Set HANA_HOST = <SELECT CLIENT_HOST FROM M_CONNECTIONS WHERE CONNECTION_ID = CURRENT_CONNECTION;>

Set HANA_SQL_PORT = <SELECT DISTINCT sql_port FROM SYS.M_SERVICES WHERE SQL_PORT > 0;>

Set HANA_USER = my User

Set HANA_PASSWD = my pwd

Please help me understand why it does not recognize when I provide the HANA Host Parameter

Thanks