Home Forums SQL Server 2008 T-SQL (SS2K8) deny execute permissions on sp_linkedservers for particular login RE: deny execute permissions on sp_linkedservers for particular login

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