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 |
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2006-12-04 : 00:45:53
|
| I would like to put a select statement inside this execute statementuse [AnalysisReport]GOGRANT EXECUTE ON (select statement) TO [test]GOanyone? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-04 : 00:50:52
|
You can grant permissions on database objects, not on the statements.Alternatively, you can use:GRANT SELECT ON <table-name> TO [TEST]GO Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2006-12-04 : 00:58:23
|
| but i want to grant on several stored procedures not just one... or in ur example several tables |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-12-04 : 01:40:37
|
| then..grant execute on sp1 to testgrant execute on sp2 to test...--------------------keeping it simple... |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2006-12-04 : 01:48:17
|
| wow theres thousands of them its okay im going to use sql server 2005 interface to do it |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-12-04 : 03:17:36
|
| yep, if you have schema defined then it'll be a breeze for you... or you can generate the tsql statements...select 'grant execute on ' + specific_name + ' to user1' from information_schema.routineswhere routine_type='procedure'--------------------keeping it simple... |
 |
|
|
|
|
|