Add a proc to a role, then grant execute premissions to it

  • I have added a new stored proc to my DB at my hosting site.

    Role: MyRole

    Proc: MyProc

    I need to add 'MyProc' to the role called 'MyRole', and then GRANT EXECUTE permissions to the proc within the role.

    Hows that done with TSQL ?

    Thanks:w00t:

  • How about having a look at BOL, section "GRANT Object Permissions (Transact-SQL)"??



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Does this add MyProc to the MyRole as well ???

    MyRole is an existing role and not a new role !

  • Is this all thats need?

    GRANT EXECUTE ON [dbo].[MyProc] TO [MyRole]

  • Yes, that's all. (You'll see if you try...;-))



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

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

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