Honey Is Made From Dead Bees

… and other insights into the world from Daftspaniel

Bringing Impersonation to SQL Server 2005 (via Nick Grattan’s SharePoint Blog)

leave a comment »

Found this handy blog post from a few years ago!

Frequently I find that I would like to execute TSQL commands under the context of another login, for example, when testing a database user’s permissions on objects. The SQL Server 2005 EXECUTE AS statement allows us to do this. To show how this works, first create a login and a user for the AdventureWorks database and test the current login and user name:   CREATE LOGIN OrdinaryLogin WITH PASSWORD = 'Password' GO CREATE USER OrdinaryUs … Read More

via Nick Grattan's SharePoint Blog


Written by daftspaniel

March 14, 2011 at 4:22 pm

Posted in Uncategorized

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: