March 19, 2014 at 5:52 pm
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...
March 20, 2014 at 7:18 am
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...
http://technet.microsoft.com/en-us/library/ms187721(v=sql.105).aspx
March 20, 2014 at 7:34 am
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 u.name as LinkedServer, t.name 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
March 20, 2014 at 2:38 pm
THANK YOU!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply