Security across db's in a Stored proc

Last Post 15 Mar 2010 08:35 AM by tireland. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
timcronin
New Member
New Member

--
15 Feb 2010 01:02 PM
If a login (sql login) on sql server 1 is mapped to a user in database A. And inside of database A that user has rights to execute a stored procedure. And that stored procedure has a join to a table in database B on server 1, does the login also need to be mapped to a user on database B?

tireland
New Member
New Member

--
15 Mar 2010 08:35 AM
Yes, unless you use context switch with 'execute as' and proc runs under user context that has rights to database B. http://msdn.microsoft.com/en-us/lib...88354.aspx


Acceptable Use Policy
---