Query to another database

Dear all,

I have views in database that select records from a table in another database in the same server.
Can I set security in such a way for not to give direct access to the table. I know than it is possible if a table and views are in the same database and have the same owner, but I failed to get the same for different databases.

Thanks.

[353 byte] By [Dim] at [2008-2-23]
# 1

The following thread includes an example of how to achieve this via signed code:

controlling security through stored procedures -- 2005 behaviour

Also, for another option, search for "cross database ownership chaining" in Books Online. There is a server option that enables this. BOL contains information on it.

Thanks
Laurentiu

LaurentiuCristofor at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Security...
# 2
Thank you
Dim at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Security...

SQL Server

Site Classified