Track SQL Server Linked Server connections

What is a one sentence summary of your feature request?

Need to audit SQL Linked server connections

Please describe your idea in detail. What is your problem, why do you feel this idea is the best solution, etc.

Need to see a list of all linked servers per SQL instance. Also need to see what the remote account that is being used and whom all has access to the listed Linked Server. If and when someone updates those connections. Be it remote account or local access.

How do you currently solve the challenges you have by not having this feature?

Using Claude I was able to get some scripts that list out any linked servers and who has access to them. Also was able to find which linked servers are setup to allow “everyone” style access to the connection.

Hi Marcelo,

Thanks for the request.

A few questions to make sure we get it right:

  1. Would a state report listing all linked servers per instance, with their login mappings and remote accounts, cover what you need?
  2. For access, we’re thinking of showing effective access per linked server, with Windows groups expanded to individual users, and connections open to all logins clearly flagged. Does that match what you need?
  3. For changes, do you need who changed what and when (added/removed servers, remote account or password changes)?
  4. Do you also need to see who is actually using the linked servers, or is configuration enough?

Can’t promise a timeline yet, but your answers will help shape this.

Thanks,
Evgenii

  1. Yes please on showing that information as that covers a lot basic information of what makes up the linked server. Also it’d be nice to set an alert if any of the linked servers have been set to “** ALL LOGINS (default) **” for the local login.
  2. Also very helpful as then I can report on who or what groups have access
  3. Correct, if a new linked server was created or removed. Also if an existing one had additional local logins added and removed. The same applies to the remote login.
  4. This one even script wise is difficult to capture as different calls could use the same linked server. If this is possible it’d be a nice to have but in some cases would be a notes field for someone to track what references this connection.

I have several of the scripts to get most of this information. Please let me know if they’d be helpful.