Sample Header Ad - 728x90

Return Current Connection CName

0 votes
1 answer
487 views
I'm wondering if anyone knows if there is a way to return the name that was used to connect to the SQL server rather than the actual server's name. For instance I typically connect to the server via a DNS CName. But if I run this .. select @@SERVERNAME ... I get the actual server name. I'm looking to find a way to get the CName with which I connected if it is even possible. Thoughts?
Asked by Davin Studer (223 rep)
May 27, 2021, 04:07 PM
Last activity: May 27, 2021, 04:47 PM