Is it possible to tell if an incoming connection is using an SQL Server Alias?

Posted on

Question :

Using SQL Server Configuration Manager to Create a Server Alias for Use by a Client is cool tool used in many cases when it works

In my DBA position I do not have access to the application server, to see if the SQL Server Configuration Manager or the SQL Server Client Network Utility (not sure this is the correct link) was used to create an alias.

Is there any way I can use SSMS, or any logs, events, etc to identify that an incoming connection is connecting with an Alias?

Answer :

No, that translation is done on the client side and so, with or without an alias, those connections are going to look the same to SQL Server. There is no evidence in DMVs like sys.dm_exec_connections or sys.dm_exec_sessions what name/IP/port combination was entered by the user to resolve to the server where SQL Server is running. SQL Server itself only cares that the connection was established.

Unless you can infer that anyone not using an alias is using shared memory or named pipes, therefore anyone using TCP must be using an alias. I can assure you that this is not a safe assumption.

Leave a Reply

Your email address will not be published. Required fields are marked *