Question

I have a SQL Server 2005 instance which has a linked server connection to a central data store. Our security team would prefer that the account used by our web pages not have direct access to that linked server, but we need to pull two columns of data out of that linked server connection. Security is OK with those two pieces of data, but doesn't want the rest to be available to the web.

My question is this: Can a view be created which is able to get and return those two pieces of data which can be executed by an account lacking permissions to the source linked server?

Thanks in advance!

EDIT: RBarryYoung's answer below lead me down another path, where I discovered Execute As ( http://technet.microsoft.com/en-us/library/ms188354.aspx ). This will allow me to create an "interface" stored procedure executable by the web page account which can in turn run the stored proc I want to run as an account with permission to the linked server. Thanks again everyone!

Was it helpful?

Solution

No, AFAIK, the only security enabling that can happen through a View is Owner-Chaining and that will not work through a Linked-Server.

I believe that you can do this with a Stored Procedure though because it has more security options than Views do.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top