SQL server Alias

  • Is there a way to generate report of how many server alias exist on a server. I try to extract using xp_cmdshell but unsuccessful

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo

  • Assuming you have sql server 2012, you could use sys.dm_server_registry

    See how to use it here:

    https://msdn.microsoft.com/en-us/library/hh204561.aspx

    So something like (I have no alias's to test!, but you get the idea):

    SELECT registry_key, value_name, value_data

    FROM sys.dm_server_registry

    WHERE registry_key LIKE N'%ConnectTO%';

  • I am going to give a try

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply