Skip to content

Instantly share code, notes, and snippets.



Created Nov 18, 2019
What would you like to do? - This script will get the list of Linked server with its properties and its associated local/Remote login list. The properites listed are Server,Product , Provider , Catalog , RPC out Enabled and Data Access Enabled. Also this lists the local login and remote…
SELECT ss.server_id
,'Server ' = Case ss.Server_id
when 0 then 'Current Server'
else 'Remote Server'
,'Local Login ' = case sl.uses_self_credential
when 1 then 'Uses Self Credentials'
,'Remote Login Name' = sl.remote_name
,'RPC Out Enabled' = case ss.is_rpc_out_enabled
when 1 then 'True'
else 'False'
,'Data Access Enabled' = case ss.is_data_access_enabled
when 1 then 'True'
else 'False'
FROM sys.Servers ss
LEFT JOIN sys.linked_logins sl
ON ss.server_id = sl.server_id
LEFT JOIN sys.server_principals ssp
ON ssp.principal_id = sl.local_principal_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.