Hi all,
I have two sp's, spA and spB and two Databases DB1 and DB2.
DB1 has spA and DB2 has spB
In spA I have a sentence exec DB2.dbo.spB
In spB, in one point, I have the sentece delete from DB1.dbo.table1
I have a user who has access to execute in both databases, DB1 and DB2 in
both sp's spA and spB, respectivly
When I run spA in DB1 I got the error message DELETE PERMISSION DENIED IN
OBJECT TABLE1
I think it is not necesary to give direct permissions to the tabla in order
to delete from the sp, because of the access to execute the sp's
So, I had to grant permissions to DELETE to the login so I can solve the
problem,
Anybody knows about that? Is it wrong my idea?
Thanks in advance!!
Permissions will be checked if an SP tries to access an object outside it's
database. So when you access a table in the other database the user will need
permissions on that object (unless you allow database object permission
chaining).
It doesn't matter that the sp is called from an sp in the other database -
it can't give permission on objects in the other db.
"Javier Rosas" wrote:
> Hi all,
> I have two sp's, spA and spB and two Databases DB1 and DB2.
> DB1 has spA and DB2 has spB
> In spA I have a sentence exec DB2.dbo.spB
> In spB, in one point, I have the sentece delete from DB1.dbo.table1
> I have a user who has access to execute in both databases, DB1 and DB2 in
> both sp's spA and spB, respectivly
> When I run spA in DB1 I got the error message DELETE PERMISSION DENIED IN
> OBJECT TABLE1
> I think it is not necesary to give direct permissions to the tabla in order
> to delete from the sp, because of the access to execute the sp's
> So, I had to grant permissions to DELETE to the login so I can solve the
> problem,
> Anybody knows about that? Is it wrong my idea?
> Thanks in advance!!
No comments:
Post a Comment