How to revoke execute permissions to ALL stored procedures to a windows user

  • Hi,

    I just granted to Grant execute to [windowsuser]

    But I want to revoke the execute permission to all stored procedures to that user, What is the syntax for that statement?

    Thanks

    APA

  • Google?

    REVOKE Object Permissions (Transact-SQL)

    http://msdn.microsoft.com/en-us/library/ms187719.aspx

  • Let's take a step back for a moment.

    The grant statement that you ran grants execute rights to all functions and stored procedures in the database, that's all it does. Now you want to revoke execute rights on procedures. So is it correct to say that once finished you want only execute rights granted on user defined functions?

    If not, what is the end state that you want to achieve?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (4/29/2012)


    Let's take a step back for a moment.

    The grant statement that you ran grants execute rights to all functions and stored procedures in the database, that's all it does. Now you want to revoke execute rights on procedures. So is it correct to say that once finished you want only execute rights granted on user defined functions?

    If not, what is the end state that you want to achieve?

    Hi Thanks,

    I want to revoke execute rights to all functions and stored procedures in the Database

    APA

  • So you want to completely undo what the grant statement you ran did?

    revoke execute to [windowsuser]

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 5 posts - 1 through 4 (of 4 total)

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