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' ...
Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.