[dba-SQLServer]cross database ownership?

Francisco H Tapia my.lists at verizon.net
Fri Feb 6 20:37:48 CST 2004


Granted...

However it is generally BAD practice to give an enduser rights to 
tables... thus... if said user is in db1 and belongs to role1 and that 
role1 is given excute rights to sproc1 wich basically says


Select field1, field2 from db1.dbo.table1 t1 inner join db2.dbo.table2 
t2 ON t1.field1 = t2.field2

How can I make this work?

both db1 and db2 have db chaining turned on, however it is still 
generating errors that my users dont have select rights in db2.

should I make a view in db2 and give them select rights there, and join 
back via a view instead?


thanks for any suggestions


Djabarov, Robert wrote:

> This behavior is by design, otherwise users that are not present in 1
> database could have access to it from another database.  That would not
> be pretty :)
> 
> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of
> Francisco H Tapia
> Sent: Thursday, February 05, 2004 5:27 PM
> To: dba-sqlserver at databaseadvisors.com
> Subject: Re: [dba-SQLServer]cross database ownership?
> 
> 
> I have that but it still doesn't resolve when the user is only a member 
> of one database
> it's not until I make them members of the 2nd database that it does it 
> right.
> 


-- 
-Francisco



More information about the dba-SQLServer mailing list