Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sleake
Starting Member
2 Posts |
Posted - 2007-11-30 : 08:08:38
|
| I am trying to write a SQL script that grants execute permissions on all stored procedures for a single user (test_user).I am running SQL server 2005Does anyone have a script to do this.Many thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-11-30 : 08:17:06
|
The below command will generate GRANT statements for all the procedures in the current database:Select 'GRANT EXECUTE ON [' + Specific_Schema + '].[' + Routine_Name + '] to test_user'from information_schema.routinesWhere Routine_Type = 'Procedure' Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|