Impersonate with EXECUTE AS… Statement

In SQL 2005 and above, a statement can be executed in context of another user:

EXECUTE AS User = ‘username
[statements]
REVERT

Requires IMPERSONATE permissions on the login or username impersonated. This permission is implied for sysadmin for all databases, and db_owner role members in databases that they own.

Advertisements
Impersonate with EXECUTE AS… Statement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s