deny execute permissions on sp_linkedservers for particular login

  • Hi friends,

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

    Thanks in advance.

  • ;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

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

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