July 30, 2009 at 2:26 am
Hello,
I'm trying to efficiently my stored procedures and jobs in my mssql server.
What I want is a single account that can execute the jobs (stored procedures) and does nothing more.
So what I did is created a user and assigned securables directly to that user via the securables page in the user properties window. I added the stroed procedure and gave the user execute rights on those storedprocs. The problem is that from time to time I create a new stored procedure and I don't want to go in SSMS every time and update the securables for that user.
Is there a way to alter the user's securables via T-SQL?
Is there a better way of managing this?
TIA,
Kind regards,
July 30, 2009 at 4:52 am
Looks like I just needed to do this
GRANT EXECUTE ON OBJECT::dbo.storedProc TO user;
July 30, 2009 at 7:42 am
IN 2005/2008 you could potentially solve this by assigning Execute Permissions to the user for the schema.
Grant Exec on Schema::dbo to user
Then the user will have execute rights any stored procedure created in the dbo schema. If you don't want that user to have rights then you create the procedure in another schema.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply