Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3530

Getting ServerName in a View

$
0
0

I was looking to get a stored procedure to return the name of the server that the database is sitting on.

In Sql Server, this would be Select SERVERPROPERTY('servername') as [theServer]

 

After googling, I saw suggested for HANA : select top 1 HOST from M_HOST_INFORMATION
However, my M_HOSTS_INFORMATION table contains multiple hosts, and just selecting 'top 1' only provides me a random result !

 

 

What I do know is this, is that I connect to HANA form an external app, using a connection string specifying ONE and only 1 server.

That's the baby I'd like my query to return back to me as a field in a larger recordset.

 

 

Wondering if anyone else had a better suggestion for me ?

 

 

Many Thanks


Viewing all articles
Browse latest Browse all 3530

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>