I have a Execute As problem I have a windows\sql account that has sysamdin rights.
I have a procedure in database A that the executing user has rights to. This procedure selects records from a table in database B.
The stored proc looks like this
alter procedure test
WITH EXECUTE AS 'stlntdom\jsmith'
select * from plandata_uat.dbo.test1
Jsmith has sysadmin rights and is a user in the from plandata_uat.dbo.test1
When I execute this stored proc as a user who has right to execute this stored proc I get
The server principal "'stlntdom\jsmith" is not able to access the database "plandata_UAT" under the current security context.