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 |
|
MaverickUK
Yak Posting Veteran
89 Posts |
Posted - 2004-08-06 : 05:23:52
|
| I imagine this *must* be possible, but I'm having problems finding documentation on the subject.I wish to connect to our MS SQL Server and create a new user in a database, then assign that user execute permissions on selected stored procedures.Please could somebody point me in the correct direction, example code would be fantastic.Thanks |
|
|
raymondpeacock
Constraint Violating Yak Guru
367 Posts |
Posted - 2004-08-06 : 05:41:55
|
| Use BOL to lookup sp_GrantDBAccess to add the user, followed by GRANT EXECUTE to allocate permissions on the stored procs. Sorry, I don't have any example code.Raymond |
 |
|
|
MaverickUK
Yak Posting Veteran
89 Posts |
Posted - 2004-08-06 : 07:53:20
|
| Thanks for pointing me in the right direction Ray |
 |
|
|
raymondpeacock
Constraint Violating Yak Guru
367 Posts |
Posted - 2004-08-06 : 08:09:20
|
| No problem Maverick. I did forget the sp_GrantLogin though - you'll need that first if the user isn't already a registered user on the server, sp_GrantDBAccess will then allow them access to your database.Raymond |
 |
|
|
|
|
|