What capabilities or configuration are required to run the following code to get the IP from the database server?
select distinct local_net_address as [IP_SQLServer] from sys.dm_exec_connections where session_id = @@SPID
Thanks
Microsoft SQL Server
Last Comment
MARIO LOPEZ
8/22/2022 - Mon
Nitin Sontakke
I am not sure if i understand the question. Do you mean permissions?
MARIO LOPEZ
ASKER
Sorry if I was not clear, I'm running a program in a client-server environment (Delphi-SQL Server-Windows) and I need to get the IP of the database server. I have obtained it through the instruction that I mentioned in my question and it works correctly, but I need to install the solution to different clients in different environments. The question is if I require special permissions on the connection to the server or inside SQL SERVER in order to execute the statement, I am connecting via ODBC. I wish I had no surprises when I installed the clients.