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 |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2007-04-26 : 07:35:00
|
| I have db 1 that has a process user called db1process that calls an exec spuserprocessnow spuserprocess has in it a call to dbo.db2.spnewuserand i gave spnewuser also permissions to userprocess but spnewuser also does selects from other tables and it is returning a permission error -- do i have to give spuserprocess access to all the other tables? is it not enough to give access to that procedure? |
|
|
nduggan23
Starting Member
42 Posts |
Posted - 2007-04-26 : 07:37:12
|
| The user will need read premissions to all tables that the procedure executes on. If it modifys the tables, the user will need write as well. |
 |
|
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2007-04-26 : 07:48:48
|
| is this only because I am accessing from a different db?as when i run the sp stright from db2 then it does not need permissions on all the tables. |
 |
|
|
nduggan23
Starting Member
42 Posts |
Posted - 2007-04-26 : 08:00:10
|
| If your running it as dbo then it would already have the permissions so thats why it would work. From another db it wouldnt have the same permissions. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-04-26 : 13:21:24
|
| Ownership chain doesn't cross dbs by default, you can enable it if necessary. |
 |
|
|
|
|
|