Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005

    Unanswered: Granting permission on multiple stored procs

    Is there a better way of granting permission to a stored proc for a selected user other than (enterprise manager) select sp then accessing propertys then permissions, then user?

  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    GRANT EXEC ON <proc> TO <MyUser>

    just about anything you can do in the EM can be scripted saved as script and used again. which makes you more efficient.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Mar 2005

    i agree with a script...

    but the rest of the story is this...
    the project is a work in progress thing. we are added new stored procs as needed (up to 83 as of this morning) and now we wanted a selected user to test the new project. I was looking for a way to not have to type out all 83 stored proc names in order to grant access to them for this user. I was hoping for a solution/feature that i was not aware of in EM. so it looks like i will have to do this process manually either way (EM or Script)...

  4. #4
    Join Date
    Jan 2003
    Provided Answers: 11
    select 'grant execute on ' + name + ' to user'
    from sysobjects
    where type = 'P'
      and crdate > getdate() -1

  5. #5
    Join Date
    Jun 2003
    Provided Answers: 1
    You are using Database Roles, I hope.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts