Reputation: 81
First, my SQL Server user didn't have sysadmin permissions, and I want to get client port like
SELECT client_tcp_port
FROM sys.dm_exec_connections
WHERE session_id = @@SPID;
How can I get this information with T-SQL?
Upvotes: 0
Views: 189
Reputation: 88852
Either get a sysadmin to grant you the required VIEW SERVER STATE permission, or provide you with a signed stored procedure.
Upvotes: 1