-
SQL 2005 - user rights
I need to grant a user to view all stored procedures in a database. Is there a server role other than sysadmin that grants said permissions? If not, does anyone have a script that will give a resultset of all SP's in a database so i can alter the scripts output to grant view to a specific user?
-
What do you mean view? User can list sp names? Can execute them or just look at code?
-
You can grant EXECUTE permission on the schema that owns stored procedure to the user.
-
-
Need view definition permission on sps.
-
i know i can grant said permissions on individual sps however, i want to grant a user view permissions for all sps and there are a lot of them. is there a script to grab all sps' in a database so i can script something out and give a user view to all sps?
-
select name from sys.procedures
-
Try following, it'll generate grant statements you need. Replace user with user name or db role:
SELECT 'grant view definition on ' + name + ' to user' FROM sys.procedures
-
that's exactly what i was looking for. as always---thanks for the help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|