SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


deny execute permissions on sp_linkedservers for particular login


deny execute permissions on sp_linkedservers for particular login

Author
Message
sundar329
sundar329
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 212
Hi friends,

Is there any way to deny execute permission on sp_linkedservers for particular sql login.

Thanks in advance.
Erland Sommarskog
Erland Sommarskog
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2201 Visits: 872
;May I ask why you want to do this?

In any case, the answer is yes. You need to create an explicit user for the login in the master and then DENY EXECUTE on sp_linkedservers to this user. This script illustrates:

USE master
go
CREATE LOGIN linkan WITH PASSWORD = 'ddgfd()'
CREATE USER linkan
go
DENY EXECUTE ON sp_linkedservers TO linkan
go
USE tempdb
go
EXECUTE AS LOGIN = 'linkan'
go
EXEC sp_linkedservers
go
REVERT
go
USE master
go
DROP USER linkan
DROP LOGIN linkan



Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search