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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 permissions between database

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 spuserprocess

now spuserprocess has in it a call to
dbo.db2.spnewuser

and 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.
Go to Top of Page

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.
Go to Top of Page

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.
Go to Top of Page

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.
Go to Top of Page
   

- Advertisement -