execute as

Last Post 30 Jul 2009 08:35 AM by timcronin. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
timcronin
New Member
New Member

--
30 Jul 2009 08:35 AM
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'
AS
BEGIN

select * from plandata_uat.dbo.test1

END

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.

You are not authorized to post a reply.

Acceptable Use Policy