|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 8:40 AM
Points: 2,412,
Visits: 578
|
|
| Comments posted to this topic are about the item Execute As
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, October 21, 2011 12:17 PM
Points: 103,
Visits: 158
|
|
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
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 6:00 PM
Points: 32,930,
Visits: 26,818
|
|
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.
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 8:40 AM
Points: 2,412,
Visits: 578
|
|
| 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.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Monday, April 15, 2013 8:36 AM
Points: 27,
Visits: 282
|
|
I think that the following line of code only works on SQL 2008
DECLARE @i INT = 10
In SQL 2005, it should be
DECLARE @i INT SET @i = 10
-------------------------------------------------------------- DBA or SQL Programmer? Who Knows.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, October 21, 2011 12:17 PM
Points: 103,
Visits: 158
|
|
| 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.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 5:30 AM
Points: 861,
Visits: 1,436
|
|
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.
Best regards,
Andre Guerreiro Neto
Database Analyst http://www.softplan.com.br MCITPx1/MCTSx2
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 6:00 PM
Points: 32,930,
Visits: 26,818
|
|
Patrick Cahill (2/2/2011) This is my first article... 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!
...and I found out that coming up with a good title is more difficult than it seems.
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
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 6:00 PM
Points: 32,930,
Visits: 26,818
|
|
charles evans (2/2/2011) 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.
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!
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, February 06, 2012 1:51 PM
Points: 1,
Visits: 33
|
|
| 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.
|
|
|
|