Microsoft® SQL Server 2008 R2 Unleashed
by Ray Rankins, Paul Bertucci, Chris Gallelli, Alex T. Silverstein
sp_droplinkedsrvlogin
You can delete mappings for linked servers by using sp_droplinkedsrvlogin. Members of the sysadmin and securityadmin fixed server roles can execute this stored procedure:
sp_droplinkedsrvlogin [@rmtsrvname =] 'rmtsrvname', [@locallogin =] 'locallogin'
The elements of this syntax are as follows:
• rmtsrvname—The linked server that will lose this login mapping (@rmtsrvname parameter).
• locallogin—The local login that will lose the mapping to the linked server (@locallogin parameter). You can designate either an individual login or all local logins. To specify that all logins should be affected, you pass a NULL to this argument.
The following example removes the login mapping for the 'RobinOrdes' user to the 'ORACLE_DATABASE' ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access