Set default permissions for new stored procedures?

  • Is there a way to configure it so that any new stored procedures that get created are automatically granted (or inherit) specific permissions?

  • You could, with a trigger, however, I don't recommend it. Sounds like you need to create a role or set the permissions of the users/roles at a schema level.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • You can grant execute on a database or a schema to a user or role. The user or role will inherit execute on all procedures created in that database or schema.

  • vnatt - Thursday, May 17, 2018 5:20 AM

    Is there a way to configure it so that any new stored procedures that get created are automatically granted (or inherit) specific permissions?

    Stored procedures are not granted permissions. Users and roles are granted permissions to objects. This might not seem to be helpful, but it's the way to understand how things work and why Thom and Joe's advice work.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • This was removed by the editor as SPAM

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

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