can you search linked servers for rmtuser?

  • Hi SQL server central colleagues, I need to search through all our linked servers looking for specific rmtusers.

    Is there a method to do this?

    I'd hate right click on each one looking for my list of SQL users....

    Thanks in advance...

  • Depending on your specific requirements...I would start with sp_helplinkedsrvlogin, maybe if you need to filter for something, push it into a temp table and then select out only the stuff you are looking for. And if you want to do it across many instances, then I'm a big fan of CMS...

  • Out of curiosity I peered at the guts of that system sp, you might be able to do something like this to make it simpler:

    select as LinkedServer, as LocalLogin, s.remote_name as RemoteLogin

    from sys.linked_logins s

    INNER JOIN sys.server_principals t on s.local_principal_id=t.principal_id

    INNER JOIN sys.servers u ON u.server_id=s.server_id


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

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