﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Patrick Cahill  / Execute As / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 14:12:57 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>[quote][b]califny (11/27/2011)[/b][hr]Hi, I follow the steps on 2008R2. When I execute EXECUTE AS LOGIN = 'ApplicationUser'I got error:Cannot execute as the server principal because the principal "ApplicationUser" does not exist, this type of principal cannot be impersonated, or you do not have permission.Any ideas? Thanks![/quote]Do you have a login called "ApplicationUser"?</description><pubDate>Sun, 04 Dec 2011 11:51:58 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>Hi, I follow the steps on 2008R2. When I execute EXECUTE AS LOGIN = 'ApplicationUser'I got error:Cannot execute as the server principal because the principal "ApplicationUser" does not exist, this type of principal cannot be impersonated, or you do not have permission.Any ideas? Thanks!</description><pubDate>Sun, 27 Nov 2011 13:59:42 GMT</pubDate><dc:creator>califny</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>Thanks for the article, very helpful on many levels.  This is the most straightforward and concise discussion of execute as and encryption that I've encountered. Great article.</description><pubDate>Fri, 04 Feb 2011 08:52:49 GMT</pubDate><dc:creator>gholden</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>[quote][b]charles evans (2/2/2011)[/b][hr]You're right the one can't declare and assign in the same line with local variables in SQL 2005.  Adding that feature in SQL 2008 made turning ad-hoc versions of stored procedures sooo much easier.[/quote]All MS needs to do now is figure out that column and variable selection along with variable assignment in the same SELECT (kind of like they do in update) would be incredibly useful and my day would be made! :-)</description><pubDate>Wed, 02 Feb 2011 23:17:54 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>[quote][b]Patrick Cahill (2/2/2011)[/b][hr]This is my first article...[/quote]Then my hat is really off to you, Patrick.  Comprehesive code with a decent format embedded in a well written article that explains everything along the way... you just can't ask for much better on your maiden voyage as an author.  Well done, again![quote]...and I found out that coming up with a good title is more difficult than it seems.[/quote]Heh... you noticed that?  Even a well written fellow like Steve Jones runs into that problem.  However, if that's the worst problem with one of your articles, it's not really a problem</description><pubDate>Wed, 02 Feb 2011 23:15:13 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>Thank you for your article, Patrick.Not only does it cover the implementation of EXECUTE AS but it also demonstrates a very interesting example of certificates and builtin criptography. Much appreciated contribution. :-)</description><pubDate>Wed, 02 Feb 2011 18:09:15 GMT</pubDate><dc:creator>codebyo</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>You're right the one can't declare and assign in the same line with local variables in SQL 2005.  Adding that feature in SQL 2008 made turning ad-hoc versions of stored procedures sooo much easier.</description><pubDate>Wed, 02 Feb 2011 16:07:52 GMT</pubDate><dc:creator>charles evans</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>I think that the following line of code only works on SQL 2008DECLARE @i INT = 10In SQL 2005, it should beDECLARE @i INTSET @i = 10</description><pubDate>Wed, 02 Feb 2011 13:37:34 GMT</pubDate><dc:creator>BCC-493036</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>Jeff, thank you for the kind words. This is my first article, and I found out that coming up with a good title is more difficult than it seems.</description><pubDate>Wed, 02 Feb 2011 08:28:22 GMT</pubDate><dc:creator>Patrick Cahill</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>I haven't taken the time to run the code yet either... but I did read the article.  The title of the article doesn't even come close to describing the great features used in this article.  I realize that EXECUTE AS is the main purpose of the article but this article also does a very, very nice job of providing an introduction to one important type of security.  I'd call the article something like "Restricting Access Using EXECUTE AS".If the code in this article turns out to be as good as the article itself, I'll be making a permanent link to this one.  It's short, sweet, and very much to the point.Well done, Patrick.</description><pubDate>Wed, 02 Feb 2011 08:20:50 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>Hello I noticed in the article that you say the test database will be called MyTesting, however the script creates it as TestDB.  Just thought I'd point this out.  Otherwise, good article from what I can tell without actually running the code.Cheers,Charley</description><pubDate>Tue, 01 Feb 2011 22:24:39 GMT</pubDate><dc:creator>charles evans</dc:creator></item><item><title>Execute As</title><link>http://www.sqlservercentral.com/Forums/Topic1057179-2900-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/Execute+AS/71673/"&gt;Execute As&lt;/A&gt;[/B]</description><pubDate>Tue, 01 Feb 2011 20:54:24 GMT</pubDate><dc:creator>Patrick Cahill</dc:creator></item></channel></rss>