<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D0AEQ3s6fyp7ImA9WxNUGE8.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141</id><updated>2009-11-09T23:01:42.517-05:00</updated><title>Wise man or Wise guy?  You decide</title><subtitle type="html">You decide, do I make sense or not?</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://wiseman-wiseguy.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>151</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-sa/3.0/" /><logo>http://creativecommons.org/images/public/somerights20.gif</logo><link rel="self" href="http://feeds.feedburner.com/WiseManOrWiseGuyYouDecide" type="application/atom+xml" /><feedburner:emailServiceId>WiseManOrWiseGuyYouDecide</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;DEcAQXw5eyp7ImA9WxNUF0o.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-8100894978717643111</id><published>2009-11-09T09:14:00.000-05:00</published><updated>2009-11-09T09:14:00.223-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-09T09:14:00.223-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><title>PASS Summit 2009 – Wrap-up – What’s the Value?</title><content type="html">&lt;p&gt;I’ve already written four posts (&lt;a href="http://wiseman-wiseguy.blogspot.com/2009/11/my-first-pass-experiences.html" target="_blank"&gt;1&lt;/a&gt;, &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/11/let-learning-begin.html" target="_blank"&gt;2&lt;/a&gt;, &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-day-2-what-more-can-i-learn.html" target="_blank"&gt;3&lt;/a&gt;, &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-day-3-brain-on-overload.html" target="_blank"&gt;4&lt;/a&gt;) that discussed what I did at the Summit, including what I learned, now I want to discuss my thoughts on the event.&lt;/p&gt;  &lt;p&gt;This being my first &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; Summit, I really wasn’t sure what to expect.&amp;#160; I had spoken with several people who have attended in the past, but I don’t think they could really explain the experience.&amp;#160; &lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;It’s All in the Family&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;As I mentioned in another post, the Summit has been described as “A family reunion where you like everyone.”&amp;#160; This really sums it up well.&amp;#160; I did not expect the community to be so much like a family.&amp;#160; Regular attendees would run up and hug each other (men would usually shake hands).&amp;#160; The excitement everyone had to see people again was unbelievable!&amp;#160; Then the way everyone was welcomed into the &lt;strike&gt;community&lt;/strike&gt; family was great!.&amp;#160; By the end of the week it felt like I knew more people than I didn’t know.&amp;#160; &lt;/p&gt;  &lt;p&gt;I went with a &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/10/people-i-cant-pass-on-meeting.html" target="_blank"&gt;list&lt;/a&gt; of about 50 people I wanted to meet, and in every case they were happy to meet me and have a discussion with me.&amp;#160; The only people on my list that I did not meet were either sick (Lynda Rab, hope you feel better) or did not attend, and I met more than enough other people to make up for the ones who weren’t there.&amp;#160; It also didn’t matter if they were the SQL elite, like Paul Randal, or the relatively unknown like me, everyone was excited to meet you and help you if they could.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;The Learning Never Stops&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Tuesday through Thursday the day started at about 7am and ran until midnight (later for the karaoke folks), and there was always something to learn at any hour.&amp;#160; From the breakfast discussions to sessions to late night talks, I felt like I was bettering myself and hopefully having the same affect on the people I was with.&amp;#160; I felt like I was always with someone smarter than me and that made me feel smarter.&amp;#160; &lt;/p&gt;  &lt;p&gt;The sessions helped me realize how much I actually know about SQL Server.&amp;#160; There were definitely things I learned, but much was familiar to me, which I did not expect.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Meeting Other SQL Server Professionals of Like Faith&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you visit the &lt;a href="http://www.ntm.org" target="_blank"&gt;New Tribes Mission&lt;/a&gt; website, you can see what I believe and that I try to live what I believe.&amp;#160; I’m not pushy about my faith, but I don’t hide it either.&amp;#160; It was great to meet several other people who share my faith.&amp;#160; This was something that made the Summit even more special for me.&amp;#160; In the past I have thought that I was in very small minority, but this event helped me see I’m not alone, but I have friends in the community that I can lean on when it comes to faith.&amp;#160; See &lt;a href="http://www.straightpathsql.com/blog/" target="_blank"&gt;Mike Walsh’s&lt;/a&gt; and &lt;a href="http://www.sqlservercentral.com/blogs/brian_kelley/" target="_blank"&gt;K. Brian Kelley’s&lt;/a&gt; blogs as well.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;The One Bad Thing about PASS&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;It ends before you can meet everyone!&amp;#160; I’m already looking forward to next year.&amp;#160; If I can attend I plan on doing things differently.&amp;#160; My changes are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Attend sessions about areas I normally do not work in.&amp;#160; This probably means more BI.&lt;/li&gt;    &lt;li&gt;Do more to make other attendees feel welcome.&amp;#160; I will seek out people sitting or standing alone and speak with them.&amp;#160; This year was about me meeting the big wigs of SQL Server, SQL Server Twitterati, and &lt;a href="http://www.sqlservercentral.com"&gt;SQLServerCentral&lt;/a&gt; friends, next year will be about others&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I can’t recommend the Summit enough.&amp;#160; It is refreshing (even though you are worn out) and inspiring.&lt;/p&gt;  &lt;p&gt;Thanks to all those who made it such a great event, the PASS Board, the PASS HQ Staff, volunteers, speakers, and attendees.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-8100894978717643111?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=bUAhqRlZDQ0:b1KiKrqkYjc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=bUAhqRlZDQ0:b1KiKrqkYjc:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=bUAhqRlZDQ0:b1KiKrqkYjc:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=bUAhqRlZDQ0:b1KiKrqkYjc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=bUAhqRlZDQ0:b1KiKrqkYjc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=bUAhqRlZDQ0:b1KiKrqkYjc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=bUAhqRlZDQ0:b1KiKrqkYjc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=bUAhqRlZDQ0:b1KiKrqkYjc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=bUAhqRlZDQ0:b1KiKrqkYjc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=bUAhqRlZDQ0:b1KiKrqkYjc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=bUAhqRlZDQ0:b1KiKrqkYjc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/bUAhqRlZDQ0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/8100894978717643111/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-2009-wrap-up-whats-value.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8100894978717643111?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8100894978717643111?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/bUAhqRlZDQ0/pass-summit-2009-wrap-up-whats-value.html" title="PASS Summit 2009 – Wrap-up – What’s the Value?" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-2009-wrap-up-whats-value.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEFSX0zeip7ImA9WxNUFkw.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-4748812281283713276</id><published>2009-11-07T12:23:00.001-05:00</published><updated>2009-11-07T12:23:38.382-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T12:23:38.382-05:00</app:edited><title>PASS Summit Day 3 – Brain on Overload</title><content type="html">&lt;p&gt;After the first 2 official days of the Summit the brain is already on overload and then the second part of the keynote by Dr. Dewitt and 45 minutes of Itzik Ben-Gan’s tips and tricks totally fried my brain.&lt;/p&gt;  &lt;p&gt;I arrived and sat with Bob Hovious with the plan to connect to the wireless and publish a couple of blog posts I had written the Wednesday night but couldn’t publish because I wasn’t about to pay for internet in the $200/night hotel room.&amp;#160; Unfortunately I wasn’t able to publish the posts because when I turned on the laptop I got an error, No boot device found.&amp;#160; I was totally ticked off, more because of the time I had put in on the blog posts than because of the hardware issue.&amp;#160; Fortunately, after lunch when I went to the hotel to print my boarding pass and check to see if I was still under warranty, it booted up, and has worked since.&amp;#160; I am planning on getting an image done at the office on Monday.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Keynote&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The day started off with recognition of departing board members: Pat Wright (&lt;a href="http://twitter.com/sqlasylum" target="_blank"&gt;@SQLAsylum&lt;/a&gt;), &lt;a href="http://sqlblog.com/blogs/greg_low" target="_blank"&gt;Greg Low&lt;/a&gt;, and Kevin Kline (&lt;a href="http://twitter.com/kekline" target="_blank"&gt;@kekline&lt;/a&gt;).&amp;#160; It was a tearful goodbye by &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; president Wayne Snider to Kevin as Kevin has served on the board since PASS’s inception.&amp;#160; Kevin has been a tireless worker for PASS and deserved all the recognition and the standing ovation given to him.&lt;/p&gt;  &lt;p&gt;Following the recognition of departing members was a presentation by DELL.&amp;#160; Unfortunately it was not the best presentation of the week, to put it mildly.&lt;/p&gt;  &lt;p&gt;Then, we were taught by Dr. DeWitt.&amp;#160; He talked about the changes in CPU, memory, and storage since 1980 and how while there have been improvements in each the real improvement especially relative to speed vs. size has been in CPU so I/O is the real bottleneck.&amp;#160; One way to offset this, especially in data warehouse applications, is through the development of columnar data stores vs. the traditional row-based database.&amp;#160; Columnar data stores narrow the data so that there are fewer I/O operations required.&amp;#160; To be honest much of this was over my head, but definitely worth learning more about.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;T-SQL Tips and Tricks – Itzik Ben-Gan&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I was only able to attend about half of this session because I had to be at the Chapter Leader lunch, but what I heard while in there was mind-blowing.&amp;#160; I was sitting in the back with Kathi Kellenberger (@auntkathi) and &lt;a href="http://thomaslarock.com" target="_blank"&gt;Tom LaRock&lt;/a&gt; (&lt;a href="http://twitter.com/SQLRockstar" target="_blank"&gt;@SQLRockstar&lt;/a&gt;) and at one point Tom said, “Where does he come up with this?&amp;#160; He’s like a mad scientist”, that may be somewhat paraphrased, but the meaning is there.&amp;#160; The 2 new tips for me in that time were:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Using (select null) in the Order By for windowing functions as a constant which eliminates a sort.&amp;#160; Select RowNumber() Over(Order By (select null)). &lt;/li&gt;    &lt;li&gt;ON clause ordering eliminating the need for multiple LEFT JOIN’s.      &lt;br /&gt;      &lt;br /&gt;customers C LEFT JOIN (sales S JOIN products P ON S.product_id = P.product_id) ON C.customer_id = S.customer_id&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Just those 2 tips will help me write better performing and more readable code.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Lunch with Chapter Leaders&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;As co-president of &lt;a href="http://orlando.sqlpass.org" target="_blank"&gt;OPASS&lt;/a&gt;, I was tasked to sit at our table at lunch.&amp;#160; The idea, I think, was to let people who are not attending chapter meetings where the chapters are located and to meet people involved in the chapters.&amp;#160; There are a lot of chapters in Florida, but it didn’t seem like there were a lot of chapter members at the Summit other than the chapter leaders.&amp;#160; I only had &lt;a href="http://kendalvandyke.blogspot.com" target="_blank"&gt;Kendal Van Dyke&lt;/a&gt; (&lt;a href="http://twitter.com/SQLDBA" target="_blank"&gt;@SQLDba&lt;/a&gt;) from the Orlando area sit with me, while Scott Gleason from Jacksonville also joined us because the Jacksonville chapter hadn’t gotten the right paperwork in.&amp;#160; &lt;/p&gt;  &lt;p&gt;This is definitely a good idea as was the MVP Birds of a Feather lunch. &lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Proactive DBA: Manage SQL Server Better – Ross Laforte&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This session had to do with finding all your SQL Server instances using the MAP tool and using PBM to manage your servers.&amp;#160; Another session that had content that was familiar to me.&amp;#160; Lots of good information shared, but not necessarily new to me.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Advanced SQL Server 2008 Extended Events: Performance Profiling and Troubleshooting Techniques – Adam Machanic&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This was a FANTASTIC session.&amp;#160; There was a ton of information, great demos, and humor.&amp;#160; Adam is one the best presenters I have seen.&amp;#160; I have not done anything with Extended Events as I am running SQL Server 2005, but this session inspired me to try to learn more.&amp;#160; Extended Events are powerful, especially when you use Causality.&amp;#160; Causality can help you track down what caused the condition that CAUSED the event to happen.&amp;#160; I think Extended Events are designed to eventually replace SQL Trace and certainly give you much more flexibility.&amp;#160; While I’m not Brad McGehee, I do consider myself to be an expert in Profiler, but I’m looking forward to being able to use Extended Events.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Post-Event&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Since I’m not currently a Friend of Redgate, I didn’t have a party to go to, but did have a great dinner with Bob Hovious, a friend from &lt;a href="http://www.sqlservercentral.com"&gt;SQLServerCentral&lt;/a&gt;.&amp;#160; After dinner we went back to the Sheraton Lobby lounge to continue our discussion.&amp;#160; We saw a bunch of people and Robert Cain (&lt;a href="http://twitter.com/arcanecode" target="_blank"&gt;@arcanecode&lt;/a&gt;) and Paul Waters sat down with us for awhile.&amp;#160; These conversations are the highlight of each day.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Friday – Heading Home&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Had breakfast with my roommate, &lt;a href="http://www.tim_mitchell.com" target="_blank"&gt;Tim Mitchell&lt;/a&gt; (&lt;a href="http://twitter.com/tim_mitchell" target="_blank"&gt;@tim_mitchell&lt;/a&gt;) and saw some of the board a the restaurant with Bill Graziano (&lt;a href="http://twitter.com/billgraziano" target="_blank"&gt;@billgraziano&lt;/a&gt;) stopping at our table for a short chat.&amp;#160; Then it was off to the airport where I met up with Pam Shaw, so for the first hour the Summit continued.&amp;#160; I had good flights all the way to Orlando and, while it is great to be home with family, it’s a downer to be away from the SQL family.&amp;#160; I’m already excited for next year’s Summit.&amp;#160; Fortunately I can make a couple of &lt;a href="http://www.sqlsaturday.com"&gt;SQLSaturday&lt;/a&gt;’s between now and then to get a small fix of Summit and SQL goodness.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-4748812281283713276?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=GUbukoYhJ88:YjRuxwgo36s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=GUbukoYhJ88:YjRuxwgo36s:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=GUbukoYhJ88:YjRuxwgo36s:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=GUbukoYhJ88:YjRuxwgo36s:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=GUbukoYhJ88:YjRuxwgo36s:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=GUbukoYhJ88:YjRuxwgo36s:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=GUbukoYhJ88:YjRuxwgo36s:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=GUbukoYhJ88:YjRuxwgo36s:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=GUbukoYhJ88:YjRuxwgo36s:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=GUbukoYhJ88:YjRuxwgo36s:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=GUbukoYhJ88:YjRuxwgo36s:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/GUbukoYhJ88" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/4748812281283713276/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-day-3-brain-on-overload.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4748812281283713276?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4748812281283713276?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/GUbukoYhJ88/pass-summit-day-3-brain-on-overload.html" title="PASS Summit Day 3 – Brain on Overload" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-day-3-brain-on-overload.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYEQX09eip7ImA9WxNUFEo.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-6012025295575534195</id><published>2009-11-05T20:15:00.000-05:00</published><updated>2009-11-05T20:15:00.362-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-05T20:15:00.362-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><title>PASS Summit Day 2 – What More Can I Learn</title><content type="html">&lt;p&gt;I actually slept in on Wednesday until 6am.&amp;#160; This was a change from being wide awake at 4am.&amp;#160; I made my way over to the convention center and was &lt;strike&gt;roped into&lt;/strike&gt; invited to an informal meeting of bloggers with Andy Warren (@sqlandy) and a member of the &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; marketing team.&amp;#160; It was a discussion of how PASS and SQL Server bloggers can work together to get the message of PASS out to the community.&amp;#160; It was more of a brain storming session than a meeting.&amp;#160; &lt;/p&gt;  &lt;p&gt;When the meeting closed I spent some time with Gail Shaw and Bob Hovious before the opening remarks and keynote.&amp;#160; PASS recognized some of the key volunteers, Tim Ford (&lt;a href="http://twitter.com/SQLAgentMan" target="_blank"&gt;@sqlagentman&lt;/a&gt;), Grant Fritchey (&lt;a href="http://twitter.com/GFritchey" target="_blank"&gt;@gfritchey&lt;/a&gt;), and a few others.&amp;#160; Then it was time for the PASSion awards.&amp;#160; The international PASSion award went to Charlie Hanania while the U.S. award when to Allen Kinsel (&lt;a href="http://twitter.com/sqlinsaneo" target="_blank"&gt;@sqlinsaneo&lt;/a&gt;), both of whom did yeoman's work for PASS and certainly earned their awards.&amp;#160; After the awards were announced I took a break and worked on blogging my experiences.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Paul Randal – Logging and Recovery&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;This was my first session of the day.&amp;#160; Because I read Paul’s blog I did know a lot of the material, but he definitely expanded and explained more.&amp;#160; One of his main points is that the Transaction Log is the most important component of the database as ALL changes must be written to the transaction log BEFORE they can be written to the data files.&amp;#160; Some takeaways were:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="left"&gt;Each data page has the last LSN (Log Sequence Number) stamped on the page for recovery purposes.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;While there are minimally logged operations there are NO non-logged operations.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;You can enable trace flag 3502 to see checkpoint operations.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;A checkpoint writes ALL dirty pages from memory to the log file, even pages that are part of an uncommitted transaction.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;The log always reserves enough space to rollback open transactions.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;The log cannot be “cleared” (have virtual log files marked as available) while a Full or Differential backup is occurring, even if there is a simultaneous log backup taken.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Only log backups “clear” the transaction log, Full and Differential do not.&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="left"&gt;Very interesting material on the details of the transaction log and how it is used in recovery.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Lunch&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;I enjoyed lunch with some newly made Christian friends again, Mike Walsh, Brain Moran, Peter Schott, and Erik Veerman.&amp;#160; Always good to spend time with men of faith.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://www2.sqlblog.com/blogs/louis_davidson" target="_blank"&gt;&lt;strong&gt;Louis Davidson&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; – Database Design&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;Louis has an interesting presenting style where he uses a lot of humor to make his point.&amp;#160; His main premise is that taking the time to have a well designed database at the start, saves much time later in the process. &lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Gail Shaw – Insight into Indexes&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;Gail’s session was about how to find out information about your indexes using the Dynamic Management Views and Functions.&amp;#160; I did know a bit about this, but I did not know about sys.dm_index_operational_stats which can help you see what is happening to indexes (inserts, updates, deletes) and how they are affecting locking, i.e. the number of locks taken on the resource by type (page, row).&amp;#160; Page Latch (waiting for access to page in memory) and Page IO Latch&amp;#160; (waiting for pages to be written to disk or read from disk) wait information is also available in this DMV.&amp;#160; Gail did a great job using a book to demonstrate how indexes work, a very good visual example.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Panel Discussion with the PASS Board of Directors&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;For the first time the BoD made themselves available for a question and answer session, moderated by former board member Joe Webb.&amp;#160; This was a late addition to the schedule, which contributed to the light turnout, about 15-20 people, not counting the board members.&amp;#160; One of the key points to come out is that there needs to be better communication between the board and other parties (members, chapter leaders, and sponsors/partners).&amp;#160; Chapter leaders would like more support from PASS and PASS would like more information from the chapter leaders.&amp;#160; &lt;/p&gt;  &lt;p&gt;Steve Jones (@way0utwest) asked for more transparency and publication of the goals and accomplishments for each board member.&amp;#160; His point is that, to be honest, the community really doesn’t know what they are doing/have done, and they should be publishing their accomplishments.&lt;/p&gt;  &lt;p&gt;Another interesting issue, raised by Jessica Moss, was that we, the community, need to know who to contact and how to go about presenting ideas we have for the organization.&amp;#160; Kevin Kline (past president) answered that the board was working on a “process” for this.&amp;#160; Jessica followed up by asking “When will this process be available?” and, unfortunately, there was not a concrete answer given, probably the low point of the session.&lt;/p&gt;  &lt;p&gt;Lastly I asked about the recent BoD election controversy and if that caused them to consider changing the election process.&amp;#160; There was clear, “Yes”, and that there may need to be changes made to the by-laws to make the election process better.&amp;#160; I also commented that I’d like to see the BoD aim higher for the number of voters than the 1100 or so they are looking for next year.&amp;#160; Granted that would be double the votes cast this year, but still a small percentage of membership (30000).&amp;#160; I took some grief from Andy Warren as I would not/could not provide a realistic number to shoot for for next year’s election.&amp;#160; I’ll be thinking about this later.&lt;/p&gt;  &lt;p&gt;It was, I think, a positive experience for both the BoD and those from the community who attended and I applaud the efforts being made by the BoD to be more transparent and make themselves more easily available to the membership.&amp;#160; As a relative newcomer to PASS, I can’t speak for how available they have been in the past, but I do believe that they are doing the best they can. &lt;/p&gt;  &lt;p&gt;I certainly haven’t covered everything that was discussed, but I covered what I remembered.&lt;/p&gt;  &lt;p&gt;I also want to thank the board for making themselves available for this session, it was definitely a step in the right direction.&amp;#160; I also want to thank Bill Graziano (&lt;a href="http://twitter.com/billgraziano" target="_blank"&gt;@billgraziano&lt;/a&gt;) for being willing to hang around a while longer to continue the discussion.&lt;/p&gt;  &lt;p&gt;Please take the time to email or talk to the board members and bring them your ideas and goals for PASS.&amp;#160; I believe that they truly want to serve the needs of the community, but without feedback they can’t know if they are focusing on the areas we, as a community, are most concerned about.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;In the evening&lt;/strong&gt;&lt;/p&gt;  &lt;p align="left"&gt;I went over to the party provided by Microsoft at Gameworks, the biggest arcade/game room, I have ever been in.&amp;#160; There was good food and unlimited game play made available.&amp;#160; I grabbed some food and visited with some of my new friends while there and then went out with old friends before heading in for an early evening (10:00pm).&lt;/p&gt;  &lt;p align="left"&gt;Trying to save up energy for my last day at the Summit where I will get to “host” the &lt;a href="http://orlando.sqlpass.org" target="_blank"&gt;OPASS&lt;/a&gt; table at the Chapter Leader lunch. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-6012025295575534195?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_Mk9t86hrFw:ICXN5D5adkQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_Mk9t86hrFw:ICXN5D5adkQ:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_Mk9t86hrFw:ICXN5D5adkQ:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_Mk9t86hrFw:ICXN5D5adkQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_Mk9t86hrFw:ICXN5D5adkQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_Mk9t86hrFw:ICXN5D5adkQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_Mk9t86hrFw:ICXN5D5adkQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_Mk9t86hrFw:ICXN5D5adkQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_Mk9t86hrFw:ICXN5D5adkQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_Mk9t86hrFw:ICXN5D5adkQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_Mk9t86hrFw:ICXN5D5adkQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/_Mk9t86hrFw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/6012025295575534195/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-day-2-what-more-can-i-learn.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/6012025295575534195?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/6012025295575534195?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/_Mk9t86hrFw/pass-summit-day-2-what-more-can-i-learn.html" title="PASS Summit Day 2 – What More Can I Learn" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/11/pass-summit-day-2-what-more-can-i-learn.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cDRHc-fSp7ImA9WxNUFEg.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-4146931822559548205</id><published>2009-11-05T17:11:00.001-05:00</published><updated>2009-11-05T17:11:15.955-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-05T17:11:15.955-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><title>Let the Learning Begin</title><content type="html">&lt;p&gt;Finally time for the sessions to begin after a day and a half in Seattle being overwhelmed by the people that I’ve had the opportunity to meet.&lt;/p&gt;  &lt;p&gt;I started the day meeting with Mike Walsh (&lt;a href="http://twitter.com/mike_walsh" target="_blank"&gt;@mike_walsh&lt;/a&gt;) and Joe Webb (&lt;a href="http://tiwtter.com/joewebb" target="_blank"&gt;@joewebb&lt;/a&gt;) in the Sheraton living area (lobby) where we had a short time of prayer to start the day.&amp;#160; We then went on to meet with some other men of like faith to discuss Brian Moran’s idea about reaching others.&amp;#160; It was great to meet Brian and encouraging to know others in the SQL Server community that share my faith.&amp;#160; Then it was on to the keynote.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Keynote&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I attended the keynote by Bob Muglia and Ted Kummert from Microsoft. Mostly stuff about the new technologies available in SQL Server 2008 R2, Windows 2008 R2, and Visual Studio 2010/.NET 4.&amp;#160; The coolest thing was the LIVE migration of VM’s using Hyper-V.&amp;#160; Move a running VM from one VM server to another without interrupting the virtual server!&amp;#160; Wow!&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Session 1&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My first session was titled Data Access Layers:&amp;#160; A road map to smarter, efficient, and effective queries.&amp;#160; It was not exactly what I anticipated as it was a session mainly about using Inline Table Valued functions to replace views and direct table access.&amp;#160; I’m not a big fan of UDF’s because they are often mis-used and have to admit I tuned out a little bit and spent time following &lt;a href="http://www.twitter.com" target="_blank"&gt;Twitter&lt;/a&gt; so I’d know where the people I wanted to meet were.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Lunch&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Today’s lunch was a Birds of a Feather lunch with MVP’s hosting topic-focused tables.&amp;#160; I went to Paul Randal’s (&lt;a href="http://twitter.com/PaulRandal" target="_blank"&gt;@PaulRandal&lt;/a&gt;) table about Corruption and High Availability.&amp;#160; It was very interesting to hear him tell stories and hear the stories of other folks at the table.&amp;#160; It was also great that he was able to give me reason why a restored database with no activity would have transaction log growth. It was AutoShrink!&amp;#160; AutoShrink is evil in more ways than one.&amp;#160; It was also cool that when I introduced myself, after everyone else had left because I was late to lunch, he recognized my name immediately from the &lt;a href="http://www.sqlservercentral.com"&gt;SQLServerCentral&lt;/a&gt; forums and Twitter and asked why I hadn’t introduced myself earlier!&amp;#160; I really try not to put people on a pedestal, but he and Kimberly Tripp (his wife) are pretty much universally recognized as SQL Server royalty, so it’s definitely cool to meet them and then be recognized as well!&amp;#160; Both are very nice and desire to help people out.&amp;#160; That’s the great thing about the SQL Server community, it seems that the more well-known you are, the more helpful you are.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;After Lunch&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Because of my discussion with Paul, Kim, and Gail Shaw I didn’t make the first session after lunch so I spent some time in the vendor exhibit hall looking around and talking with some of the vendors.&lt;/p&gt;  &lt;p&gt;Next I went to Andy Leonard’s session, A Tale of Careers and User Groups, where Andy explained how he became involved in user groups and the lessons he has learned.&amp;#160; He gave some good tips about how to get people involved in a user group.&amp;#160; A key way is to &lt;strike&gt;recruit&lt;/strike&gt;&amp;#160; encourage those who come early or stay late to be a part of the user group leadership team.&lt;/p&gt;  &lt;p&gt;Finally I checked into Kalen Delaney’s session, Indexing Internals.&amp;#160; It was a good session on the structure of indexes.&amp;#160; The interesting thing was that, having read Kalen’s book and some other resources on indexes, I actually knew the majority of the information.&amp;#160; It was interesting to see what I actually know.&lt;/p&gt;  &lt;p&gt;After the session I had a great discussion with Lorie Edwards (@lorieedwards) about what to learn in SQL Server and how the size of your environment definitely affects the features you need.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Dinner&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I went out to dinner with Andy Warren, Steve Jones, Pam Shaw, Rob, &lt;a href="http://www.tim_mitchell.com" target="_blank"&gt;Tim Mitchell&lt;/a&gt; and &lt;a href="http://kendalvandyke.blogspot.com" target="_blank"&gt;Kendal Van Dyke&lt;/a&gt;.&amp;#160; We didn’t talk much SQL Server, but more general conversation.&amp;#160; Always a good time with this crew.&lt;/p&gt;  &lt;p&gt;After dinner I went to a party sponsored by SQL Sentry and met a ton of new people.&amp;#160; The guys from SQL Sentry (Greg, Peter Shire), Adam Machanic, Peter Ward, Charlie Hanania, Chuck Heinzelman, and others.&amp;#160; &lt;/p&gt;  &lt;p&gt;Finally I went back to the hotel about midnight and crashed.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-4146931822559548205?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=rBsEPkbxnks:U7XrhORLnrE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=rBsEPkbxnks:U7XrhORLnrE:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=rBsEPkbxnks:U7XrhORLnrE:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=rBsEPkbxnks:U7XrhORLnrE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=rBsEPkbxnks:U7XrhORLnrE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=rBsEPkbxnks:U7XrhORLnrE:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=rBsEPkbxnks:U7XrhORLnrE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=rBsEPkbxnks:U7XrhORLnrE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=rBsEPkbxnks:U7XrhORLnrE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=rBsEPkbxnks:U7XrhORLnrE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=rBsEPkbxnks:U7XrhORLnrE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/rBsEPkbxnks" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/4146931822559548205/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/11/let-learning-begin.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4146931822559548205?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4146931822559548205?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/rBsEPkbxnks/let-learning-begin.html" title="Let the Learning Begin" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/11/let-learning-begin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYFQ308fCp7ImA9WxNUEks.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-9009823198497130796</id><published>2009-11-03T12:06:00.001-05:00</published><updated>2009-11-03T12:08:32.374-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-03T12:08:32.374-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><title>My First PASS Experiences</title><content type="html">&lt;p align="center"&gt;&lt;strong&gt;Getting to Seattle&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I started my travels to the &lt;a href="http://summit2009.sqlpass.org" target="_blank"&gt;PASS Summit&lt;/a&gt; at about 9:30 am (EST) on Sunday and arrived at the Sheraton in Seattle at about 6:30 pm (PST) Sunday.&amp;#160; It was an uneventful trip on Southwest from Orlando to Albuquerque, then on to Seattle.&amp;#160; On the second leg I met up with &lt;a href="http://www.tim_mitchell.com" target="_blank"&gt;Tim Mitchell&lt;/a&gt; (&lt;a href="http://twitter.com/tim_mitchell" target="_blank"&gt;@tim_mitchell&lt;/a&gt;) which made that leg seem much shorter as we had great conversations about &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt;, SQL Server, professional development, and family life.&amp;#160; I’m sure we drove the 3rd person in our row crazy as we talked the entire 3 hour flight.&amp;#160; When we arrived at SeaTac we met up with Wendy Pastrick (&lt;a href="http://twitter.com/wendy_dance" target="_blank"&gt;@wendy_dance&lt;/a&gt;) and Damon Ripper (&lt;a href="http://twitter.com/DamonRipper" target="_blank"&gt;@DamonRipper&lt;/a&gt;) and shared a town car to the Sheraton.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Sunday Night&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Amazingly enough a lot of attendees made it on Sunday so there were some good networking opportunities.&amp;#160; Tim and I had originally planned to try to get together with Andy Warren (@sqlandy) who was having dinner with “Small Talk” expert, Don Gabor.&amp;#160; Well, since we had met up with Wendy and Damon and then met with a fairly large group of other attendees in the Sheraton lounge we decided to just hang with this crew.&amp;#160; Amazingly, I was able to meet several people on my list during the evening.&amp;#160; Some of the folks I was able to meet were:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Bill Graziano (&lt;a href="http://twitter.com/billgraziano" target="_blank"&gt;@billgraziano&lt;/a&gt;) – who organized dinner for about 20 of us.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://facility9.com" target="_blank"&gt;Jeremiah Peschka&lt;/a&gt; (&lt;a href="http://twitter.com/peschkaj" target="_blank"&gt;@peschkaj&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Grant Fritchey (&lt;a href="http://twitter.com/GFritchey" target="_blank"&gt;@gfritchey&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Wendy Pastrick (@wendy_dance)&lt;/li&gt;    &lt;li&gt;Allen Kinsel (&lt;a href="http://twitter.com/sqlinsaneo" target="_blank"&gt;@sqlinsaneo&lt;/a&gt;)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Then there all the people who were not on my list including:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www2.sqlblog.com/blogs/louis_davidson" target="_blank"&gt;Louis Davidson&lt;/a&gt; (&lt;a href="http://twitter.com/drsql" target="_blank"&gt;@DrSQL&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Rich Baumet&lt;/li&gt;    &lt;li&gt;Scott Stauffer (&lt;a href="http://twitter.com/sqlsocialite" target="_blank"&gt;@SQLSocialite&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Todd McDermid (&lt;a href="http://twitter.com/todd_mcdermid" target="_blank"&gt;@Todd_McDermid&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Todd Robinson (&lt;a href="http://twitter.com/devSql" target="_blank"&gt;@DevSQL&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Chris Massey (&lt;a href="http://twitter.com/camassey" target="_blank"&gt;@camassey&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Andrew Clarke&lt;/li&gt;    &lt;li&gt;Denny Cherry (&lt;a href="http://twitter.com/mrdenny" target="_blank"&gt;@mrdenny&lt;/a&gt;)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And the people I already knew like Jessica Moss, Andy Leonard (@AndyLeonard), and Pam Shaw.&amp;#160; The only downside was that I stayed up until after midnight, but my body decided that it was still on the East coast and woke up at 4 am and refused to go back to sleep.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Monday&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;Started off the morning with a nice walk with my roommate Tim Mitchell to Top Pot Donuts to meet with Andy Warren and Don Gabor.&amp;#160; While there Robert Cain (&lt;a href="http://twitter.com/arcanecode" target="_blank"&gt;@arcanecode&lt;/a&gt;), on my list, and Greg Larsen, popped in to talk with us, well, they know Andy, so they stopped to talk with him, but, of course, it was great opportunity to meet them.&lt;/p&gt;  &lt;p&gt;After that I headed over to the convention center to check into the event and on the way I ran into Andy Leonard and Jim (from the Northern Virginia User Group) and stopped to talk for bit.&amp;#160; At registration I also saw &lt;a href="http://blogs.msdn.com/buckwoody/" target="_blank"&gt;Buck Woody&lt;/a&gt; (@BuckWoody) again and was able to introduce him to Tim Mitchell.&amp;#160; By then it was time for the Chapter Leader meeting, I wasn’t officially on the list, but as co-President of &lt;a href="http://orlando.sqlpass.org" target="_blank"&gt;OPASS&lt;/a&gt; with Andy Warren I attended.&amp;#160; It was nice meeting where the chapter leaders got an opportunity to discuss what PASS can/should do to help chapters.&amp;#160; The meeting was led by director &lt;a href="http://sqlblog.com/blogs/greg_low" target="_blank"&gt;Greg Low&lt;/a&gt; (another person on my list that I met), he is currently in charge of chapters, assisted by Blythe Morrow (&lt;a href="http://twitter.com/blythemorrow" target="_blank"&gt;@blythemorrow&lt;/a&gt;) who is the community coordinator for PASS.&amp;#160; We discussed:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;how PASS can better integrate chapter meetings and events into the PASS event calendar. &lt;/li&gt;    &lt;li&gt;better list and messaging management for PASS-hosted chapter sites.&lt;/li&gt;    &lt;li&gt;re-working the responsibilities of the regional mentors&lt;/li&gt;    &lt;li&gt;holding chapters accountable for meeting and growing&lt;/li&gt;    &lt;li&gt;PASS providing a speaker bureau&lt;/li&gt;    &lt;li&gt;the use and viability of Live meeting as provided by PASS&lt;/li&gt;    &lt;li&gt;training for chapter leaders, especially on using Live meeting and the DotNetNuke chapter sites hosted by PASS.&lt;/li&gt;    &lt;li&gt;If PASS should consider hosting the Summit in locations other than Seattle.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The best part is that most of the items discussed were items I broached about PASS helping local chapters in my blog post, What Should PASS Strive to Be?.&amp;#160; I think it showed that PASS is trying to become more relevant at the Chapter level.&amp;#160; &lt;/p&gt;  &lt;p&gt;I then went out to see who else was around and met Gail Shaw, who had the quote of the day, “It’s like a family reunion where you want to see everyone.”.&amp;#160; That might be a bit of a paraphrase, but the meaning was there.&amp;#160; I also met Bob Hovious, Brent Ozar (&lt;a href="http://twitter.com/BrentO" target="_blank"&gt;@BrentO&lt;/a&gt;), and ran into Kevin Kline (@kekline) and Steve Jones (@way0utwest).&amp;#160; I went to lunch with Steve, always a good time.&amp;#160; We ended up at the Fox Sport Grill where I got a very good burger.&amp;#160; It’s always good to sit and talk with Steve.&amp;#160; We spend more time discussing family and life in general than technical stuff, which is a nice change.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Let the Networking Begin&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;After lunch I attended a networking session for PASS volunteers with Don Gabor.&amp;#160; It was a great session about starting conversations and leaving a good impression.&amp;#160; It was fun with lots of exercise to help us apply the concepts.&amp;#160; The biggest thing I got out of it was how to remember names.&amp;#160; He shared his 5-second plan for remembering names, with, in my opinion, the key point being to concentrate on the other person’s name during the introduction instead of thinking about the next thing you are going to say.&amp;#160; During this session I met many people, whose last names I did not get, but there were several people on my list in the session that I did meet and, because they are on my list, I do remember their full names:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Michelle Ufford (&lt;a href="http://twitter.com/sqlfool" target="_blank"&gt;@sqlfool&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Tim Ford (&lt;a href="http://twitter.com/SQLAgentMan" target="_blank"&gt;@sqlagentman&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;TJay Bely (&lt;a href="http://twitter.com/tjaybelt" target="_blank"&gt;@tjaybelt&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Pat Wright (&lt;a href="http://twitter.com/sqlasylum" target="_blank"&gt;@SqlAsylum&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://thomaslarock.com" target="_blank"&gt;Tom LaRock&lt;/a&gt; (&lt;a href="http://twitter.com/SQLRockstar" target="_blank"&gt;@SQLRockstar&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Jason Strate (&lt;a href="http://twitter.com/stratesql" target="_blank"&gt;@StrateSQL&lt;/a&gt;)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Following the volunteer networking session there was longer, Networking for Business Contacts session with Don, that covered the content from the first session, but also included more information about body language (&lt;strong&gt;S&lt;/strong&gt;mile, &lt;strong&gt;O&lt;/strong&gt;pen arms, &lt;strong&gt;F&lt;/strong&gt;orward lean, &lt;strong&gt;T&lt;/strong&gt;ouch, &lt;strong&gt;E&lt;/strong&gt;ye contact, &lt;strong&gt;N&lt;/strong&gt;od).&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Opening Reception and SSC Party&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;From networking to the opening reception where some prizes were given out including the Log Reader Awards for blogging (I didn’t win any).&amp;#160; Then three 2-person teams competed in the Quiz Bowl put together by Tim Ford and Louis Davidson.&amp;#160; It was done Jeopardy-style with all questions having some kind of relationship to SQL Server.&amp;#160; The three teams were:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Paul Randal and Kimberly Tripp – who, not surprisingly won.&lt;/li&gt;    &lt;li&gt;Brent Ozar and Kevin Kline – they really knew their pop culture.&lt;/li&gt;    &lt;li&gt;Grant Fritchey and Joe Webb&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I tried to practice my newly learned networking skills at the reception, especially in one case where I saw someone sitting alone, so I went over and introduced myself to Phil, but I think I failed as I took a quick break to grab some food and one I came back, Phil was gone!&amp;#160; Well Don, I think I need more practice. I also met Arlene Gray (@whimSQL).&lt;/p&gt;  &lt;p&gt;From there is was on to the &lt;a href="http://www.sqlservercentral.com"&gt;SQLServerCentral&lt;/a&gt; party where I met Kevin Boles and Wes Brown and saw many other old friends.&amp;#160; I played some Texas Hold’em and managed to win more than I lost, but not enough to win a prize.&amp;#160; There was no cash involved as you were given a ticket for chips and then played until either time or your chips ran out.&amp;#160; I was also able to meet Marc Beacom (&lt;a href="http://twitter.com/marcbeacom" target="_blank"&gt;@marcbeacom&lt;/a&gt;) and re-connect with Tony Davis and Brad McGehee (&lt;a href="http://twitter.com/bradmcgehee" target="_blank"&gt;@bradmcgehee&lt;/a&gt;)&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;After the Party&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Many people went out to karaoke later in the evening, but I stayed late at the SSC party, so I was left behind, and to be honest, I was ready for a break and an earlier night.&amp;#160; &lt;/p&gt;  &lt;p&gt;The amazing thing is that my head is already spinning after meeting so many great people (many of whom I have not named because I only remember first names).&amp;#160; I can’t imagine what it will be like when the sessions start and everyone arrives.&lt;/p&gt;  &lt;p&gt;Also looking forward to getting together with people of like-faith on Tuesday.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-9009823198497130796?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=LGr1V5qide0:mBc-35DfNtE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=LGr1V5qide0:mBc-35DfNtE:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=LGr1V5qide0:mBc-35DfNtE:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=LGr1V5qide0:mBc-35DfNtE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=LGr1V5qide0:mBc-35DfNtE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=LGr1V5qide0:mBc-35DfNtE:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=LGr1V5qide0:mBc-35DfNtE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=LGr1V5qide0:mBc-35DfNtE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=LGr1V5qide0:mBc-35DfNtE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=LGr1V5qide0:mBc-35DfNtE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=LGr1V5qide0:mBc-35DfNtE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/LGr1V5qide0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/9009823198497130796/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/11/my-first-pass-experiences.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/9009823198497130796?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/9009823198497130796?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/LGr1V5qide0/my-first-pass-experiences.html" title="My First PASS Experiences" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/11/my-first-pass-experiences.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEANQnY9eyp7ImA9WxNUFkw.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-8160552726088444276</id><published>2009-11-02T08:01:00.001-05:00</published><updated>2009-11-07T11:53:13.863-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T11:53:13.863-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>Follow Up to Maintaining Security and Performance Using Stored Procedures Part I – Using Execute As</title><content type="html">This is a follow up to &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/10/maintaining-security-and-performance.html" target="_blank"&gt;Maintaining Security and Performance using Stored Procedures Part I – Using EXECUTE AS&lt;/a&gt; because of a comment on that &lt;a href="http://www.sqlservercentral.com/blogs/wisemanorwiseguy/archive/2009/10/08/maintaining-security-and-performance-using-stored-procedures-part-i-_1320_-using-execute-as.aspx#comments" target="_blank"&gt;post&lt;/a&gt; on the &lt;a href="http://www.sqlservercentral.com/"&gt;SQLServerCentral&lt;/a&gt; syndicated &lt;a href="http://www.sqlservercentral.com/blogs/wisemanorwiseguy" target="_blank"&gt;feed&lt;/a&gt; by Ken Lee.&amp;nbsp; He commented:&lt;br /&gt;
&lt;blockquote&gt;Like the technique, not the example. ISNULL() is a function, it forces the where clause to look at every record in the table.&lt;br /&gt;
SQL is smart enough to identify constants and know the variable name is true or not and will or will not evaluate the second OR statement used below.&lt;br /&gt;
First SET @LastName=@LastName+N'%', if it's null it remains null. To make sure it always works declare a nvarchar(51) field and assign it instead. If the field in the table is max 50 characters then this isn't needed.&lt;br /&gt;
Replace the function in the first example with "(@LastName IS NULL OR LastName Like @LastName) And" logic and you should get the performance without the dynamic SQL.&lt;br /&gt;
Kind of curious about the stats.&lt;br /&gt;
&lt;/blockquote&gt;Since the purpose of that post was to show how to get better performance using Dynamic SQL without compromising security, I decided I needed to do some testing on his method.&amp;nbsp; Here are the queries I ran (FREEPROCCACHE was run because the Dynamic SQL query plans were not removed from the cache when the stored procedure was altered):&lt;br /&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;DBCC &lt;/span&gt;FREEPROCCACHE&lt;span style="color: grey;"&gt;();
&lt;/span&gt;&lt;span style="color: blue;"&gt;GO

Exec &lt;/span&gt;dbo&lt;span style="color: grey;"&gt;.&lt;/span&gt;FindPhoneByName @FirstName &lt;span style="color: grey;"&gt;= &lt;/span&gt;&lt;span style="color: red;"&gt;'J'&lt;/span&gt;&lt;span style="color: grey;"&gt;, &lt;/span&gt;@LastName &lt;span style="color: grey;"&gt;= &lt;/span&gt;&lt;span style="color: red;"&gt;'A'&lt;/span&gt;&lt;span style="color: grey;"&gt;;

&lt;/span&gt;&lt;span style="color: blue;"&gt;GO

Exec &lt;/span&gt;dbo&lt;span style="color: grey;"&gt;.&lt;/span&gt;FindPhoneByName @FirstName &lt;span style="color: grey;"&gt;= &lt;/span&gt;&lt;span style="color: red;"&gt;'J'&lt;/span&gt;&lt;span style="color: grey;"&gt;;

&lt;/span&gt;&lt;span style="color: blue;"&gt;GO

Exec &lt;/span&gt;dbo&lt;span style="color: grey;"&gt;.&lt;/span&gt;FindPhoneByName @LastName &lt;span style="color: grey;"&gt;= &lt;/span&gt;&lt;span style="color: red;"&gt;'A'&lt;/span&gt;&lt;span style="color: grey;"&gt;;

&lt;/span&gt;&lt;span style="color: blue;"&gt;Go
&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I don’t know why, but his method DOES generate a different execution plan than my method using ISNULL() when you leave the Person.Contact in, what I believe is, the original state.&amp;nbsp; In the original state the optimizer chooses to do a scan of the index, IX_Contact_MiddleName, and bookmark lookup on the clustered index.&amp;nbsp; Here’s the index definition:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;CREATE NONCLUSTERED INDEX &lt;/span&gt;[IX_Contact_MiddleName] &lt;span style="color: blue;"&gt;ON &lt;/span&gt;[Person]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[Contact] 
&lt;span style="color: grey;"&gt;(
&lt;/span&gt;[MiddleName] &lt;span style="color: blue;"&gt;ASC
&lt;/span&gt;&lt;span style="color: grey;"&gt;)
&lt;/span&gt;INCLUDE &lt;span style="color: grey;"&gt;( &lt;/span&gt;[FirstName]&lt;span style="color: grey;"&gt;,
&lt;/span&gt;[LastName]&lt;span style="color: grey;"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
While the optimizer chose a clustered index scan for Ken’s query.&amp;nbsp; This access path required more reads when both parameters were provided, but fewer when only one was provided.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Dynamic SQL, however, provided the best of both, using the index when both parameters were provided and using the clustered index when only one parameter was provided.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Intrigued I decided to see what happened if a covering index was made available, so I created this index:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;CREATE NONCLUSTERED INDEX &lt;/span&gt;[IX_Contact_LastName_FirstName] &lt;span style="color: blue;"&gt;ON &lt;/span&gt;[Person]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[Contact] 
&lt;span style="color: grey;"&gt;(
&lt;/span&gt;[LastName] &lt;span style="color: blue;"&gt;ASC&lt;/span&gt;&lt;span style="color: grey;"&gt;,
&lt;/span&gt;[FirstName] &lt;span style="color: blue;"&gt;ASC&lt;/span&gt;&lt;span style="color: grey;"&gt;,
&lt;/span&gt;[MiddleName] &lt;span style="color: blue;"&gt;ASC
&lt;/span&gt;&lt;span style="color: grey;"&gt;)
&lt;/span&gt;INCLUDE &lt;span style="color: grey;"&gt;( &lt;/span&gt;[Title]&lt;span style="color: grey;"&gt;,
&lt;/span&gt;[Suffix]&lt;span style="color: grey;"&gt;,
&lt;/span&gt;[Phone]&lt;span style="color: grey;"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;&lt;span style="color: grey;"&gt;&lt;span style="color: #333333; font-family: 'Trebuchet MS';"&gt;With a covering index in place both non-dynamic solutions produced the same execution plan, scans of the newly created covering index.  The Dynamic SQL though had seeks on the covering index for queries 1 and 3, and a scan for query 2.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;&lt;span style="color: grey;"&gt;&lt;span style="color: #333333; font-family: 'Trebuchet MS';"&gt;Lastly I decided to see what happened when there was a non-covering index available, here’s that index:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;CREATE NONCLUSTERED INDEX &lt;/span&gt;[IX_Contact_LastName_FirstName] &lt;span style="color: blue;"&gt;ON &lt;/span&gt;[Person]&lt;span style="color: grey;"&gt;.&lt;/span&gt;[Contact] 
&lt;span style="color: grey;"&gt;(
&lt;/span&gt;[LastName] &lt;span style="color: blue;"&gt;ASC&lt;/span&gt;&lt;span style="color: grey;"&gt;,
&lt;/span&gt;[FirstName] &lt;span style="color: blue;"&gt;ASC&lt;/span&gt;&lt;span style="color: grey;"&gt;,
&lt;/span&gt;[MiddleName] &lt;span style="color: blue;"&gt;ASC
&lt;/span&gt;&lt;span style="color: grey;"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;&lt;span style="color: grey;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This case was similar to the first test, my solution did a scan on the index with a bookmark lookup, and Ken’s solution did a clustered index scan.&amp;nbsp; The dynamic SQL did an index seek/bookmark lookup when both parameters were provided and a clustered index scan when only one parameter was provided.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here’s the results from statistics IO:&lt;br /&gt;
&lt;table border="1" cellpadding="2" cellspacing="0" style="width: 398px;"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td colspan="2" rowspan="2" valign="top"&gt;&lt;br /&gt;
&lt;/td&gt;  &lt;td colspan="2" valign="top"&gt;IsNull() Solution&lt;br /&gt;
&lt;/td&gt;  &lt;td colspan="2" valign="top"&gt;Ken’s Solution&lt;br /&gt;
&lt;/td&gt;  &lt;td colspan="2" valign="top"&gt;Dynamic&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td valign="top"&gt;Scans&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Reads&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Scans&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Reads&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Scans&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Reads&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td rowspan="3" valign="top"&gt;Query 1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Original&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;593&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;593&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td valign="top"&gt;Covered&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;201&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;201&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;13&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td valign="top"&gt;Uncovered&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;457&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;359&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td rowspan="3" valign="top"&gt;Query 2&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Original&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;7783&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td valign="top"&gt;Covered&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;201&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;201&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;201&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td valign="top"&gt;Uncovered&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;7647&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td rowspan="3" valign="top"&gt;Query 3&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;Original&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;3031&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td valign="top"&gt;Covered&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;201&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;201&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;13&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td valign="top"&gt;Uncovered&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;2895&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1&lt;br /&gt;
&lt;/td&gt;  &lt;td valign="top"&gt;1116&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align="center"&gt;&lt;strong&gt;&lt;span style="font-size: medium;"&gt;Conclusion&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align="left"&gt;&lt;span style="font-size: x-small;"&gt;As you can see from the results above Ken’s solution does provide more consistent results than my original solution, while the Dynamic SQL still provides the best performance.&amp;nbsp; I should note that there is a tradeoff with the dynamic SQL solution, you get better plans because you get a plan for each option that is run, so depending on the number of parameter combinations you could get procedure cache bloat.&amp;nbsp; In most 64-bit implementations this shouldn’t be an issue, but you may see more compiles with a dynamic solution.&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align="left"&gt;&lt;span style="font-size: x-small;"&gt;As always test your options, monitor, and change as needed to keep your systems running as well possible.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align="left"&gt;&lt;span style="font-size: x-small;"&gt;All the files (except the AdventureWorks database, on &lt;a href="http://www.codeplex.com/MSFTDBProdSamples" target="_blank"&gt;CodePlex&lt;/a&gt;) can be found &lt;a href="http://cid-d959306fcfdbac21.skydrive.live.com/self.aspx/Public/Blog%20Resources/IsNullVsORVSDynamic.zip" target="_blank"&gt;here&lt;/a&gt;.&amp;nbsp; Included are the queries, the results from statistics IO, and a trace file showing the activity and query plans.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-8160552726088444276?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=fApoK4xtVFw:HFeRcKMMSZU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=fApoK4xtVFw:HFeRcKMMSZU:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=fApoK4xtVFw:HFeRcKMMSZU:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=fApoK4xtVFw:HFeRcKMMSZU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=fApoK4xtVFw:HFeRcKMMSZU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=fApoK4xtVFw:HFeRcKMMSZU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=fApoK4xtVFw:HFeRcKMMSZU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=fApoK4xtVFw:HFeRcKMMSZU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=fApoK4xtVFw:HFeRcKMMSZU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=fApoK4xtVFw:HFeRcKMMSZU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=fApoK4xtVFw:HFeRcKMMSZU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/fApoK4xtVFw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/8160552726088444276/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/11/follow-up-to-maintaining-security-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8160552726088444276?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8160552726088444276?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/fApoK4xtVFw/follow-up-to-maintaining-security-and.html" title="Follow Up to Maintaining Security and Performance Using Stored Procedures Part I – Using Execute As" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/11/follow-up-to-maintaining-security-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIDQHw9fyp7ImA9WxNVGE8.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-5670361785786835295</id><published>2009-10-29T08:30:00.000-04:00</published><updated>2009-10-29T08:49:31.267-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-29T08:49:31.267-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><title>What Should PASS Strive To Be?</title><content type="html">&lt;p&gt;Steve Jones had a good editorial earlier this week entitled, &lt;a href="http://www.sqlservercentral.com/articles/pass/68552/" target="_blank"&gt;What Do We Want from PASS?&lt;/a&gt;.&amp;#160; It didn’t generate as much discussion as I would have thought, but the discussion is worth &lt;a href="http://www.sqlservercentral.com/Forums/Topic806926-263-1.aspx" target="_blank"&gt;reading&lt;/a&gt;.&amp;#160; A couple of the posts mention how &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; does not seem to do anything to make the daily life of SQL Server professionals better.&amp;#160; I have to agree with that sentiment.&amp;#160; Until about two years ago I wasn’t even aware PASS existed.&amp;#160; I had heard about the Summit in passing, but never even considered attending.&amp;#160; Unfortunately I think this is a common occurrence with PASS.&amp;#160; What can be done to change this?&amp;#160; Here are some things I think PASS should be doing:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Make sure people refer to the conference as the PASS Summit not PASS.&amp;#160; If you follow SQL folks on &lt;a href="http://www.twitter.com" target="_blank"&gt;Twitter&lt;/a&gt; or many blogs you see people saying “See you at PASS” or “Are you going to PASS?”.&amp;#160; PASS needs these people, the influencers, to refer to the PASS Summit so that others understand that PASS is more than the Summit. &lt;/li&gt;    &lt;li&gt;PASS should be &lt;strong&gt;THE&lt;/strong&gt; voice for SQL Server Professionals.&amp;#160; When there is an issue that affects our profession, PASS should be speaking for us.&amp;#160; Regulations, best practices, salary information should all be found at PASS. &lt;/li&gt;    &lt;li&gt;PASS should build from the bottom up.&amp;#160; If PASS really wants to be relevant it needs strong local Chapters.&amp;#160; This is where the majority of the interaction between professionals will always be, make it a priority.&amp;#160; Here are some ideas on how it can be done:      &lt;ol&gt;       &lt;li&gt;Speaker list &lt;/li&gt;        &lt;li&gt;Sponsor contacts &lt;/li&gt;        &lt;li&gt;Training for Chapter Leaders on how to interact with sponsors and how to market the group. &lt;/li&gt;        &lt;li&gt;How to be a Technical Speaker seminars at a local/regional level &lt;/li&gt;        &lt;li&gt;Regional events.&amp;#160; &lt;a href="http://www.sqlsaturday.com"&gt;SQLSaturday&lt;/a&gt; is filling this void, and I’m a big fan of SQLSaturday, but this is really an area where PASS should be.&amp;#160; Not everyone can go to the Summit, especially east coast people when it is in Seattle every year.&amp;#160; Give them something to go to. &lt;/li&gt;        &lt;li&gt;SWAG, especially for startups.&amp;#160; PASS should be able leverage its reach to get vendors, publishers, recruiters, etc… to get some money and items. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;PASS should provide a growth path for leaders.&amp;#160; In addition to the international Board of Directors there should be regional boards that help implement the vision of the international board.&amp;#160; These groups can also be the one in charge of regional events.&amp;#160; Then you have a growth path from chapter leadership to regional leadership to national/international leadership. &lt;/li&gt;    &lt;li&gt;PASS should rotate the location of the Summit.&amp;#160; East coast, Central, and West Coast.&amp;#160; This will give people who can’t travel to Seattle a chance to go.&amp;#160; I’ll be honest, if SQLConnections continues to have a spring conference in Orlando (where I live), I’ll choose that over PASS some years.&amp;#160; I don’t have to pay for hotel and airfare or lose 2 days in travel.&amp;#160; I can fly to Boston in 3 hours.&amp;#160; Seattle? &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;There are some things that PASS does very well:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The PASS Summit.&amp;#160; This year will be my first one, but everyone I know who has gone raves about it, so it must be good. &lt;/li&gt;    &lt;li&gt;Virtual Chapters (formerly known as Special Interest Groups).&amp;#160; Online communities based on areas of interest instead of geographic location.&amp;#160; There are regular Live Meetings that are are fantastic. &lt;/li&gt;    &lt;li&gt;24 Hours of PASS.&amp;#160; Literally 24 straight hours of online training from some of the best SQL Server minds in the world. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I should note that I am good friends with Andy Warren who is on the PASS Board of Directors.&amp;#160; We have discussed what PASS should be doing before, but most of these ideas will be new to him as well.&amp;#160; I hope to meet and talk with all the members of the board at the Summit and share these ideas with them and hear their vision for PASS.&lt;/p&gt;  &lt;p&gt;What do you think PASS should strive to be?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-5670361785786835295?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_CMYdsYAZZc:fPeZkNI8XXc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_CMYdsYAZZc:fPeZkNI8XXc:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_CMYdsYAZZc:fPeZkNI8XXc:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_CMYdsYAZZc:fPeZkNI8XXc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_CMYdsYAZZc:fPeZkNI8XXc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_CMYdsYAZZc:fPeZkNI8XXc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_CMYdsYAZZc:fPeZkNI8XXc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_CMYdsYAZZc:fPeZkNI8XXc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_CMYdsYAZZc:fPeZkNI8XXc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_CMYdsYAZZc:fPeZkNI8XXc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_CMYdsYAZZc:fPeZkNI8XXc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/_CMYdsYAZZc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/5670361785786835295/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/what-should-pass-strive-to-be.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5670361785786835295?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5670361785786835295?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/_CMYdsYAZZc/what-should-pass-strive-to-be.html" title="What Should PASS Strive To Be?" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/what-should-pass-strive-to-be.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQAQHk6fyp7ImA9WxNVFkQ.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-8190064394166894544</id><published>2009-10-27T09:00:00.000-04:00</published><updated>2009-10-27T21:45:41.717-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-27T21:45:41.717-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Net" /><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><category scheme="http://www.blogger.com/atom/ns#" term="Professional Development" /><category scheme="http://www.blogger.com/atom/ns#" term="Networking" /><title>Where Will We PASS Each Other?</title><content type="html">&lt;p&gt;In my a &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/10/people-i-cant-pass-on-meeting.html" target="_blank"&gt;post&lt;/a&gt; on Monday, I talked about who I want to meet while at the &lt;a href="http://summit2009.sqlpass.org" target="_blank"&gt;PASS Summit&lt;/a&gt;.&amp;#160; Today I’m going to post where I plan to be while at the Summit.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Sunday&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’m scheduled to fly into Seattle at 6pm, which means I hope to be at the hotel (Sheraton) by 7:30pm.&amp;#160; I’ll probably try to find someone in addition to my roommate, Tim Mitchell, to have dinner with once I arrive at the hotel.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Monday&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’ll be looking for folks to meet up with for breakfast.&amp;#160; Then I’ll probably head to the convention center and depending on who I meet up with, either hang there for lunch or go out.&lt;/p&gt;  &lt;p&gt;In the afternoon I have the Networking Seminar for Volunteers with Don Gabor and then the full &lt;a href="http://www.regonline.com/checkin.asp?eventId=685107" target="_blank"&gt;Networking to Build Business Contacts&lt;/a&gt; seminar with Don Gabor.&amp;#160; I believe there are still some seats left for this session (only $60) and I’m sure you’ll get your money’s worth.&amp;#160; That session leads into the Welcome Reception and Quiz Bowl.&amp;#160; I’ll be finishing the night at the &lt;a href="http://www.sqlservercentral.com"&gt;SQLServerCentral&lt;/a&gt; party (instructions on how to get a ticket are &lt;a href="http://www.sqlservercentral.com/articles/SQLServerCentral/67586/" target="_blank"&gt;here&lt;/a&gt;).&amp;#160; I’ll likely pack it in after this party.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Tuesday&amp;#160; &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’ll be starting Tuesday by meeting with a group of people of like faith at breakfast, and event I’m really looking forward to.&amp;#160; Then I begin my sessions, of course if I get in the right conversation, I’ll skip a session or two.&amp;#160; Here’s the plan for the day:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Data Access Layers: A road map to smarter, efficient and effective queries.&lt;/li&gt;    &lt;li&gt;Birds of a Feather Lunch with MVP’s.&lt;/li&gt;    &lt;li&gt;Dr. DMV: How to Use Dynamic Management Views to Monito and Diagnose Performance Issues with High Volume OLTP Workloads.&lt;/li&gt;    &lt;li&gt;A Tale of Careers and User Groups.&lt;/li&gt;    &lt;li&gt;Exploring Index Internals.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Nothing planned for the evening so if you know of any good events to crash let me know.&amp;#160; I’ve already been told to follow Wendy Pastrick (&lt;a href="http://twitter.com/wendy_dance" target="_blank"&gt;@wendy_dance&lt;/a&gt;).&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Wednesday&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’m not a morning person normally, but I plan to start with the Quest Vendor-hosted Breakfast with a discussion of DMV’s.&amp;#160; I may not get anything out of it, but I know Brent Ozar (&lt;a href="http://twitter.com/BrentO" target="_blank"&gt;@BrentO&lt;/a&gt;) and Tim Ford (&lt;a href="http://twitter.com/SQLAgentMan" target="_blank"&gt;@SQLAgentMan&lt;/a&gt;) will be there so at least I’ll meet them. Then my session plan for the day:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Understanding Logging and Recovery in SQL Server&lt;/li&gt;    &lt;li&gt;Lunch with the people of like-faith.&lt;/li&gt;    &lt;li&gt;Database Design&lt;/li&gt;    &lt;li&gt;Insight into Indexes&lt;/li&gt;    &lt;li&gt;Nordic – turn SQL Server into an Object DB – I want to make sure I meet Paul Neilsen.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Again nothing planned in the evening.&amp;#160; Feel free to let me know what’s going on.&amp;#160; Wendy will tire of me following her around.&amp;#160; She may think I’m a stalker.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Thursday&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Nothing planned for breakfast, but I’ll probably try to get some time with Mike Walsh (&lt;a href="http://twitter.com/mike_walsh" target="_blank"&gt;@mike_walsh&lt;/a&gt;) to start out the day with some Christian fellowship.&amp;#160; Then the sessions I’ve picked out for the day:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;T-SQL Tips &amp;amp; Tricks&lt;/li&gt;    &lt;li&gt;Lunch&amp;#160; - Featuring Regional Chapter Leaders.&amp;#160; I’ll be the host of the &lt;a href="http://orlando.sqlpass.org" target="_blank"&gt;OPASS&lt;/a&gt; (Orlando &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt;) table as my co-President, Andy Warren, has other responsibilities during this time.&lt;/li&gt;    &lt;li&gt;Troubleshooting applications accessing SQL Server&lt;/li&gt;    &lt;li&gt;Proactive DBA: Manage SQL Server Better&lt;/li&gt;    &lt;li&gt;Advanced SQL Server 2008 Extended Events: Performance Profiling and Troubleshooting Techniques.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Again, nothing planned for the evening.&amp;#160; I figure I’ll be following &lt;a href="http://www.twitter.com" target="_blank"&gt;Twitter&lt;/a&gt; to findn out where everyone is.&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;Friday&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My flight home is at noon, so I’ll probably try to meet up for breakfast, then pack up and head to the airport.&amp;#160; &lt;/p&gt;  &lt;p&gt;Wow, when you type up the week it seems short.&amp;#160; I’m sure that the week will pass much more quickly than I anticipate.&amp;#160; I’m looking forward to meeting people and getting as much information as I can process.&lt;/p&gt;  &lt;p&gt;If you are on Twitter be sure to have a search for the #sqlpass hash tag.&amp;#160; I know I will.&lt;/p&gt;  &lt;p&gt;See you in a few days! &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-8190064394166894544?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=UvDYLYUKoLU:sMaYxnLduog:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=UvDYLYUKoLU:sMaYxnLduog:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=UvDYLYUKoLU:sMaYxnLduog:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=UvDYLYUKoLU:sMaYxnLduog:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=UvDYLYUKoLU:sMaYxnLduog:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=UvDYLYUKoLU:sMaYxnLduog:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=UvDYLYUKoLU:sMaYxnLduog:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=UvDYLYUKoLU:sMaYxnLduog:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=UvDYLYUKoLU:sMaYxnLduog:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=UvDYLYUKoLU:sMaYxnLduog:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=UvDYLYUKoLU:sMaYxnLduog:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/UvDYLYUKoLU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/8190064394166894544/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/where-will-we-pass-each-other.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8190064394166894544?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8190064394166894544?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/UvDYLYUKoLU/where-will-we-pass-each-other.html" title="Where Will We PASS Each Other?" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/where-will-we-pass-each-other.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAGSHw8fip7ImA9WxNVFks.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-6007360184056786203</id><published>2009-10-26T23:59:00.001-04:00</published><updated>2009-10-27T12:25:29.276-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-27T12:25:29.276-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Reviews" /><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Development" /><category scheme="http://www.blogger.com/atom/ns#" term="Products" /><category scheme="http://www.blogger.com/atom/ns#" term="Professional Development" /><title>Book Review: Murach’s JavaScript and DOM Scripting by Ray Harris</title><content type="html">&lt;p&gt;In early September I received a complimentary copy of &lt;em&gt;Murach’s JavaScript and DOM Scripting&lt;/em&gt; by Ray Harris (&lt;a href="http://www.amazon.com/Murachs-JavaScript-DOM-Scripting-Murach/dp/1890774553/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1256610471&amp;amp;sr=8-1" target="_blank"&gt;Amazon&lt;/a&gt;) to review.&amp;#160; I got the book because my friend, Andy Warren, passed my name along to the publisher when they asked him to review the book.&amp;#160; He knew I was attempting to learn JavaScript, so passed along this opportunity to me.&lt;/p&gt;  &lt;p&gt;This is the first Murach book I have read and it definitely has an interesting format.&amp;#160; The left page is text and the right page is code, examples, and summary of key points.&amp;#160; It took a couple of chapters to get used to the format, but once I did I found it to be very helpful.&amp;#160; For some of the early chapters I was able to just skim the right page to pick up the concepts as the content was already familiar to me.&lt;/p&gt;  &lt;p&gt;The book is broken down into four sections:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Introduction to JavaScript Programming &lt;/li&gt;    &lt;li&gt;JavaScript Essentials &lt;/li&gt;    &lt;li&gt;Dom Scripting &lt;/li&gt;    &lt;li&gt;Other JavaScript Skills &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;In the first section, Introduction to JavaScript Programming, you get the basics of web development including XHTML, CSS, and beginning JavaScripting.&amp;#160; As an inexperienced web programmer I found this information invaluable.&amp;#160; I’ve always been confused by CSS this book helped me to gain a basic understanding so I can now read, understand, and intelligently edit CSS pages.&amp;#160; An experience web developer will be able to skim/skip much of this section, but as a relative newbie, I ate it all up.&lt;/p&gt;  &lt;p&gt;In section two, JavaScript Essentials, you delve deeper into JavaScript functionality.&amp;#160; Getting input and displaying output, working with native objects, control statements, arrays, functions, objects, regex, exception handling, and data validation.&amp;#160; Some of the topics in this section, like control statements, are common to other languages so I was able to skim parts of this section and just use the examples and summary on the right hand page.&lt;/p&gt;  &lt;p&gt;In section three, DOM Scripting, you really get into the deeper topics.&amp;#160; This is where you really get to hone your skills and take advantage of the power of the DOM and scripting.&amp;#160; You learn to manipulate the DOM, CSS, and build libraries you can re-use to do this.&amp;#160; You get understandable examples and exercises that lead you through the concepts and help you build working examples of a slide show, manipulating tables, and animations.&amp;#160; From here to the end of the book, I would imagine that even experienced JavaScript developers would learn something.&lt;/p&gt;  &lt;p&gt;In section four, Other JavaScript Skills, you learn how to manipulate the browser and leverage existing JavaScript libraries like jQuery to extend your applications.&lt;/p&gt;  &lt;p&gt;The book was was easy to read and the examples and exercises were good.&amp;#160; Being a Microsoft developer I was a little disappointed that it the book did not really talk about using JavaScript with Visual Studio, but I guess that is to be expected.&amp;#160; I also didn’t think enough time was spent on showing how to deal with the situation when a user has disabled scripting in their browser.&amp;#160; The last thing was that I found the instructions in some of the exercises were too vague and while I finished them in a manner that worked, I wasn’t sure if I had done it correctly.&amp;#160; The finished scripts were included in the download, but I would have liked to have seen it in the book as an appendix.&lt;/p&gt;  &lt;p&gt;So I did have a couple of issues, but overall a really good book.&amp;#160; I think it works for beginners all the way to experienced web developers.&amp;#160; The more you know you can “mine” the parts of the book that address your weak areas.&amp;#160; I’d recommend the book and would buy other Murach books based on my experience with this one.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-6007360184056786203?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wz_jLVpCc7o:b4VITiYg4kY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wz_jLVpCc7o:b4VITiYg4kY:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wz_jLVpCc7o:b4VITiYg4kY:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wz_jLVpCc7o:b4VITiYg4kY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wz_jLVpCc7o:b4VITiYg4kY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wz_jLVpCc7o:b4VITiYg4kY:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wz_jLVpCc7o:b4VITiYg4kY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wz_jLVpCc7o:b4VITiYg4kY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wz_jLVpCc7o:b4VITiYg4kY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wz_jLVpCc7o:b4VITiYg4kY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wz_jLVpCc7o:b4VITiYg4kY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/wz_jLVpCc7o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/6007360184056786203/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/book-review-murachs-javascript-and-dom.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/6007360184056786203?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/6007360184056786203?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/wz_jLVpCc7o/book-review-murachs-javascript-and-dom.html" title="Book Review: Murach’s JavaScript and DOM Scripting by Ray Harris" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/book-review-murachs-javascript-and-dom.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEHSHs4fCp7ImA9WxNVFUs.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-719655461086271950</id><published>2009-10-26T09:18:00.000-04:00</published><updated>2009-10-26T09:27:19.534-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-26T09:27:19.534-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Summit" /><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Networking" /><title>People I Can’t PASS on Meeting</title><content type="html">&lt;p&gt;One week from today I will be in Seattle for my first ever &lt;a href="http://summit2009.sqlpass.org/" target="_blank"&gt;PASS Summit&lt;/a&gt;.&amp;#160; One of the things I have heard is what a great event this is for networking with other SQL Server people.&amp;#160; I think I’ve been able to experience this in a small way at the three SQLSaturday’s I have attended in the last year, but I’m sure the Summit is different.&amp;#160; &lt;a href="http://thomaslarock.com" target="_blank"&gt;Tom LaRock&lt;/a&gt; (&lt;a href="http://twitter.com/SQLRockstar" target="_blank"&gt;@SQLRockstar&lt;/a&gt;) blogged about this back in &lt;a href="http://thomaslarock.com/2009/05/the-value-of-your-network/" target="_blank"&gt;May&lt;/a&gt; and listed some people he has met at the Summit and people he wants to meet this year.&amp;#160; That’s what this post is, my list of people I want to meet and converse with at the Summit.&amp;#160; Most of these people I have interacted with on-line via &lt;a href="http://www.twitter.com" target="_blank"&gt;Twitter&lt;/a&gt; or &lt;a href="http://www.sqlservercentral.com"&gt;SQLServerCentral&lt;/a&gt;, but have not met in person.&amp;#160; The list would be longer, but I met a few who would have been on this list at &lt;a href="http://www.sqlsaturday.com"&gt;SQLSaturday&lt;/a&gt; #21 – Orlando (Kevin Kline, Andy Leonard, &lt;a href="http://blogs.msdn.com/buckwoody/" target="_blank"&gt;Buck Woody&lt;/a&gt;, and Joe Webb) all of whom I look forward to spending more time with, but they don’t qualify for this list as this is for people I have not met in person yet.&lt;/p&gt;  &lt;p&gt;Let’s start with the &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; Board of Directors both sitting and new members:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Wayne Snider&lt;/li&gt;    &lt;li&gt;Rushabh Mehta&lt;/li&gt;    &lt;li&gt;Bill Graziano&lt;/li&gt;    &lt;li&gt;&lt;a href="http://sqlblog.com/blogs/greg_low" target="_blank"&gt;Greg Low&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Christoph Stotz&lt;/li&gt;    &lt;li&gt;Lynda Rab&lt;/li&gt;    &lt;li&gt;Rick Heiges&lt;/li&gt;    &lt;li&gt;Pat Wright&lt;/li&gt;    &lt;li&gt;Douglas McDowell&lt;/li&gt;    &lt;li&gt;Tom LaRock&lt;/li&gt;    &lt;li&gt;Rick Bolesta&lt;/li&gt;    &lt;li&gt;Neil Buchwalter&lt;/li&gt;    &lt;li&gt;Kevin Yam&lt;/li&gt;    &lt;li&gt;Kristina Kerr&lt;/li&gt;    &lt;li&gt;&lt;a href="http://facility9.com" target="_blank"&gt;Jeremiah Peschka&lt;/a&gt; – Newly elected&lt;/li&gt;    &lt;li&gt;Brian Moran – Newly elected&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Why this group?&amp;#160; The board is the group that sets the direction for PASS and I am interested in where they think PASS should go and I have my own opinions on that as well.&amp;#160; They are influencers and I’d like to try to influence them.&amp;#160; I do have an in, as my friend Andy Warren is on the board and can introduce me.&amp;#160; Hopefully they will all be at the pre-conference networking session with Don Gabor.&lt;/p&gt;  &lt;p&gt;The next group comes from my peers at SQLServerCentral.&amp;#160; SSC is, in my opinion, a true community and these folks have helped me to be a better SQL Server developer and DBA by being willing to answer questions on their time and sharing their experiences.&amp;#160; I don’t even know if everyone on the list will be going to the Summit or if I am listing real or screen names in some cases, but I’ll list them anyway:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Grant Fritchey&lt;/li&gt;    &lt;li&gt;Gail Shaw&lt;/li&gt;    &lt;li&gt;R. Barry Young&lt;/li&gt;    &lt;li&gt;Alvin Ramard&lt;/li&gt;    &lt;li&gt;Bob Hovious &lt;/li&gt;    &lt;li&gt;Paul White&lt;/li&gt;    &lt;li&gt;WayneS – obviously a screen name&lt;/li&gt;    &lt;li&gt;Lynn Pettis – I don’t think Lynn will be there this year, but if he is, I want to meet him.&lt;/li&gt;    &lt;li&gt;Jeff Moden&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Then there is the SQL Server Twitter community, and I do mean community.&amp;#160; I have received help and given help to people in the Twitter community and think it is a great way to begin a relationship, and has definitely made it less intimidating to attend the Summit because I feel like I already have lots of friends there.&amp;#160; Again I don’t know if everyone I list will be there, but I hope they will be:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Brent Ozar (&lt;a href="http://twitter.com/BrentO" target="_blank"&gt;@BrentO&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Michelle Ufford (&lt;a href="http://twitter.com/sqlfool" target="_blank"&gt;@SQLFool&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Wendy Pastrick(&lt;a href="http://twitter.com/wendy_dance" target="_blank"&gt;@Wendy_Dance&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Mike Walsh (&lt;a href="http://twitter.com/mike_walsh" target="_blank"&gt;@mike_walsh&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Allen Kinsel (&lt;a href="http://twitter.com/sqlinsaneo" target="_blank"&gt;@sqlinsaneo&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Mladen Prajdic (&lt;a href="http://twitter.com/mladenprajdic" target="_blank"&gt;@mladenprajdic&lt;/a&gt;) – don’t know that he’ll be making the trip from Europe, but he definitely has earned a spot on this list.&lt;/li&gt;    &lt;li&gt;Paul Randal (&lt;a href="http://twitter.com/PaulRandal" target="_blank"&gt;@PaulRandal&lt;/a&gt;) – yeah, I know, he’s on everyone’s list.&amp;#160; Maybe I can catch him for 5 minutes.&lt;/li&gt;    &lt;li&gt;Kimberly Tripp (&lt;a href="http://twitter.com/kimberlyltripp" target="_blank"&gt;@KimberlyLTripp&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Linchi Shea (&lt;a href="http://twitter.com/linchi_shea" target="_blank"&gt;@linchi_shea&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Marlon Rubinal (&lt;a href="http://twitter.com/MarlonRubinal" target="_blank"&gt;@MarlonRubinal&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Robert Cain (&lt;a href="http://twitter.com/arcanecode" target="_blank"&gt;@arcanecode&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;TJay Belt (&lt;a href="http://twitter.com/tjaybelt" target="_blank"&gt;@tjaybelt&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Mark Wisecarver (&lt;a href="http://twitter.com/msftwise" target="_blank"&gt;@msftwise&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Marc Beacom (&lt;a href="http://twitter.com/marcbeacom" target="_blank"&gt;@marcbeacom&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Aaron Bertrand (&lt;a href="http://twitter.com/AaronBertrand" target="_blank"&gt;@AaronBertrand&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Jason Strate (&lt;a href="http://twitter.com/stratesql" target="_blank"&gt;@StrateSQL&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Arlene Gray (&lt;a href="http://twitter.com/whimsql" target="_blank"&gt;@whimsql&lt;/a&gt;) – I just live her Twitter handle.&lt;/li&gt;    &lt;li&gt;Tim Ford (&lt;a href="http://twitter.com/SQLAgentMan" target="_blank"&gt;@sqlagentman&lt;/a&gt;) – another great Twitter handle.&lt;/li&gt;    &lt;li&gt;Eric Humphrey (&lt;a href="http://twitter.com/lotsahelp" target="_blank"&gt;@lotsahelp&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Blythe Morrow (&lt;a href="http://twitter.com/blythemorrow" target="_blank"&gt;@blythemorrow&lt;/a&gt;)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I’m sure that I’ve left out someone I shouldn’t have, but this is a good starting point, and I hope all these people will be interested in meeting me.&amp;#160; &lt;/p&gt;  &lt;p&gt;This is definitely not an all-inclusive list.&amp;#160; I want to meet as many people as I possible and still get together with the “old friends” from SQLSaturday’s as well.&amp;#160; I’m sure it will be a busy, fun, and profitable week!&amp;#160; &lt;/p&gt;  &lt;p&gt;Hope to see you there.&amp;#160; Next up I’ll post what I know of my schedule so on the off chance you want to meet me you’ll know where I plan to be.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-719655461086271950?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_JcNxCFgDdo:0cWjFFg9Bys:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_JcNxCFgDdo:0cWjFFg9Bys:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_JcNxCFgDdo:0cWjFFg9Bys:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_JcNxCFgDdo:0cWjFFg9Bys:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_JcNxCFgDdo:0cWjFFg9Bys:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_JcNxCFgDdo:0cWjFFg9Bys:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_JcNxCFgDdo:0cWjFFg9Bys:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_JcNxCFgDdo:0cWjFFg9Bys:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_JcNxCFgDdo:0cWjFFg9Bys:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=_JcNxCFgDdo:0cWjFFg9Bys:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=_JcNxCFgDdo:0cWjFFg9Bys:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/_JcNxCFgDdo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/719655461086271950/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/people-i-cant-pass-on-meeting.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/719655461086271950?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/719655461086271950?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/_JcNxCFgDdo/people-i-cant-pass-on-meeting.html" title="People I Can’t PASS on Meeting" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/people-i-cant-pass-on-meeting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYBQ3gycCp7ImA9WxNVEk4.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-3377135703241773851</id><published>2009-10-22T13:32:00.001-04:00</published><updated>2009-10-22T13:39:12.698-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-22T13:39:12.698-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLSaturday" /><category scheme="http://www.blogger.com/atom/ns#" term="Volunteering" /><category scheme="http://www.blogger.com/atom/ns#" term="Community" /><title>SQLSaturday #21 – Orlando What We Can Do Better</title><content type="html">&lt;p&gt;Well, the event is over and the Event Evaluations have been &lt;a href="http://blog.sqlsaturday.com/2009/10/sqlsaturday-21-event-evaluation-results.html" target="_blank"&gt;tabulated&lt;/a&gt;.&amp;#160; I’ve already posted &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/10/week-of-sql-server.html" target="_blank"&gt;my week&lt;/a&gt; leading up to the event and my &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/10/sqlsaturday-21-orlando-recap.html" target="_blank"&gt;event recap&lt;/a&gt; that means it is time to do a self evaluation.&amp;#160; This is the fourth &lt;a href="http://www.sqlsaturday.com"&gt;SQLSaturday&lt;/a&gt; I’ve been involved with, but the first one that I’ve been part of the planning committee.&lt;/p&gt;  &lt;p&gt;Here are a few things I saw that we could improve on:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Better communication.&amp;#160; At the event I found out that some of the speakers had not been receiving speaker emails.&amp;#160; I’m not sure how you verify this if the messages don’t bounce back.&amp;#160; As the scheduler I should have taken ownership of speaker communication while letting Andy Warren handle other communication.&amp;#160; There was also some confusion caused by having the mini-sessions that could have been fixed had I been more proactive in communicating with the speakers.&lt;/li&gt;    &lt;li&gt;Volunteer scheduling.&amp;#160; We had plenty of people willing to help out, but we didn’t do a good job of using them efficiently.&amp;#160; The SQLSaturday site has a decent session scheduler and I think that it should be adapted to put together a volunteer schedule.&amp;#160; Sure there will have to be tweaks on Saturday, just like for the speakers, but if the volunteers know where, what, and when ahead of time then they can plan their day as well.&lt;/li&gt;    &lt;li&gt;Lunch Tickets.&amp;#160; Overall lunch went well and everyone got fed, but there were too many unconfirmed lunch payments.&amp;#160; I’ve never tried to interface with PayPal so I don’t know how difficult it is, but perhaps having some kind of confirmation that the attendee needs to print and bring to the event to get a ticket?&amp;#160; Also some type of identifier for those who ordered a vegetarian lunch (this would apply when lunch is free as well).&lt;/li&gt;    &lt;li&gt;Session Scheduling.&amp;#160; I wouldn’t say I totally screwed this up, but I definitely made some mistakes, especially putting SSAS/MDX in one of the smaller rooms.&amp;#160; I’d never attended those sessions, so I didn’t realize how popular they are.&amp;#160; Experience will definitely help here.&amp;#160; I also think have a specific beginner track would be good.&lt;/li&gt;    &lt;li&gt;Printed Schedule.&amp;#160; We may want to at least put level on the printed schedule, if not the abstract as well, especially if we do poster size schedules again.&lt;/li&gt;    &lt;li&gt;Presentation Resources.&amp;#160; Having the speakers upload them prior to the event or that day would be helpful.&lt;/li&gt;    &lt;li&gt;Session Evaluations.&amp;#160; We use them as raffle tickets as well, to try to encourage attendees to do them.&amp;#160; The only issue is that means they have to be sorted to be compiled.&amp;#160; &lt;a href="http://kendalvandyke.blogspot.com" target="_blank"&gt;Kendal Van Dyke&lt;/a&gt; had an excellent suggestion, a post-event volunteer meeting to sort and compile the evaluations.&amp;#160; This could also be used to do a post-event evaluation as well.&amp;#160; I still think that there has to be a better way to collect the information.&amp;#160; Always open to ideas.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Overall it was a good event and the majority of the feedback was positive, but you always learn something new you can do better. &lt;/p&gt;  &lt;p&gt;If you attended and have any comments on what you think can be done better please comment or email me.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-3377135703241773851?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=i3WQiYi6t38:9KhqrP-m85w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=i3WQiYi6t38:9KhqrP-m85w:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=i3WQiYi6t38:9KhqrP-m85w:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=i3WQiYi6t38:9KhqrP-m85w:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=i3WQiYi6t38:9KhqrP-m85w:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=i3WQiYi6t38:9KhqrP-m85w:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=i3WQiYi6t38:9KhqrP-m85w:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=i3WQiYi6t38:9KhqrP-m85w:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=i3WQiYi6t38:9KhqrP-m85w:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=i3WQiYi6t38:9KhqrP-m85w:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=i3WQiYi6t38:9KhqrP-m85w:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/i3WQiYi6t38" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/3377135703241773851/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/sqlsaturday-21-orlando-what-we-can-do.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/3377135703241773851?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/3377135703241773851?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/i3WQiYi6t38/sqlsaturday-21-orlando-what-we-can-do.html" title="SQLSaturday #21 – Orlando What We Can Do Better" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/sqlsaturday-21-orlando-what-we-can-do.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcESH85fSp7ImA9WxNVEU4.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-5746630052605834613</id><published>2009-10-21T09:00:00.000-04:00</published><updated>2009-10-21T09:00:09.125-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-21T09:00:09.125-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLSaturday" /><category scheme="http://www.blogger.com/atom/ns#" term="Volunteering" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><title>SQLSaturday #21 – Orlando Recap</title><content type="html">&lt;p&gt;In my &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/10/week-of-sql-server.html" target="_blank"&gt;previous post&lt;/a&gt; I discussed the week that led up to the &lt;a href="http://www.sqlsaturday.com"&gt;SQLSaturday&lt;/a&gt; event.&amp;#160; In this post I’ll tell you my perspective on how the event went and let you in on a secret.&lt;/p&gt;  &lt;h5&gt;Starting the Day&lt;/h5&gt;  &lt;p&gt;Not being a morning person I allowed Andy Warren to take the lead on setup.&amp;#160; He arrived at our venue, Seminole State College of Florida (formerly Seminole Community College) Lake Mary campus, at about 6:30am and had several volunteers meet him there.&amp;#160; They got the UHaul truck unloaded and were getting the check-in tables setup when I arrived at about 7:40am.&amp;#160; I helped put up our schedule posters (including marking room changes and crossing out sessions that had been cancelled) and helped direct people to the check-in station and chatted.&amp;#160; Check-in went smoothly due to our volunteers, I’d name names, but they know who they are and I might leave someone out.&amp;#160; We had three issues early:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;We had some people go to the wrong room because we forgot to put signs on the original rooms directing people to the new location.&amp;#160; Kindly pointed out by Joe Healey (DevFish).&lt;/li&gt;    &lt;li&gt;We forgot to bring the coffee pots so when the coffee we had purchased was gone, we were out of coffee.&lt;/li&gt;    &lt;li&gt;One of the speakers did not show, so we had to move people to other sessions.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I spent the first session directing people to the correct rooms as some were a little out of the way.&lt;/p&gt;  &lt;h5&gt;Mid-Morning&lt;/h5&gt;  &lt;p&gt;Fortunately for me we had an opening in the 10:15 block so we could move Joe Webb’s session on Locking and Blocking from 2:45 so he would have enough time to make his flight back home.&amp;#160; Fortunate for me because I got to attend his session.&amp;#160; I had a great time and learned a lot in the session.&amp;#160; I even asked a question that led directly to his next slide.&amp;#160; &lt;/p&gt;  &lt;h5&gt;Lunch Time&lt;/h5&gt;  &lt;p&gt;After Joe’s session I helped get setup for lunch.&amp;#160; This is one of the areas where we were most concerned because we had requested that attendees pay for lunch and there were some quirks in the system so we weren’t sure if we had ordered lunches correctly.&amp;#160; Getting people through the lunch line went very smoothly and we had enough lunches for everyone.&amp;#160; We also had two “sessions” during lunch.&amp;#160; A question and answer with Joe Celko on the quad, and a demo by Confio in one of the rooms.&amp;#160; I spent much of the lunch period announcing the Confio demo because we had not put the room on the schedule.&lt;/p&gt;  &lt;h5&gt;After Lunch&lt;/h5&gt;  &lt;p&gt;We had another “new” thing, 15 minute mini-sessions immediately after lunch.&amp;#160; I think they were received well.&amp;#160; The only issue we had was that this was the only time we didn’t have a change over between sessions which caused a little bit of issue because we (read I) didn’t speak with the full session speakers to prepare them.&amp;#160; We wanted to give some beginners a chance to speak and yet, still fill the room.&lt;/p&gt;  &lt;p&gt;I had my first session at 1:30, a panel discussion with Andy Warren, &lt;a href="http://kendalvandyke.blogspot.com" target="_blank"&gt;Kendal Van Dyke&lt;/a&gt;, and myself, on Getting Started in Technical Speaking and Blogging.&amp;#160; We had a much bigger crowd than I anticipated, standing room only.&amp;#160; The interesting thing was that everyone in the room raised their hand when we asked who wanted to be a speaker and no one said the problem was “fear of public speaking”, but one was lack of opportunity.&amp;#160; As a &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; Chapter leader in charge of getting speakers, I can say with authority that I can always use speakers, so please contact me!&amp;#160; It was well received even though we broke one of the cardinal rules of public speaking, we hadn’t practiced&lt;/p&gt;  &lt;p&gt;After that session I took a break to review for my solo session which was coming up at 4pm.&amp;#160; While waiting I ran into some of the other 4pm speakers, Patrick Leblanc, Herve Roggero, and Scott Klein, and we had a discussion about who would have the most in attendance in their session since Joe Celko, &lt;a href="http://blogs.msdn.com/buckwoody/" target="_blank"&gt;Buck Woody&lt;/a&gt;, and Jonathan Kehayias were also speaking in that block.&amp;#160; Scott Klein and his session on XML won with a packed room of 30.&lt;/p&gt;  &lt;h5&gt;My Session&lt;/h5&gt;  &lt;p&gt;My session was “Dive into the Default Trace” which I had done at the &lt;a href="http://spacecoast.sqlpass.org/" target="_blank"&gt;Space Coast User Group&lt;/a&gt; in September.&amp;#160; It went very well.&amp;#160; My biggest issue was that I could go on forever so I had to pick it up in the end.&amp;#160; My audience didn’t mind though, they enjoyed the interaction and the information provided.&lt;/p&gt;  &lt;h5&gt;Clean up and Raffle&lt;/h5&gt;  &lt;p&gt;While Andy was having fun passing out raffle gifts I was busy making sure all the rooms were cleaned up.&amp;#160; It was a struggle as the maintenance crew were moving very quickly to get everything closed up.&amp;#160; Andy almost gave away my coffee cup, but I walked out in time to save it.&lt;/p&gt;  &lt;h5&gt;After Party&lt;/h5&gt;  &lt;p&gt;We had a good turnout at JAX Fifth Avenue and I was able to make the rounds and spend time with just about everyone.&amp;#160; I was accused by one speaker of guilting them into coming this year because I sent a personal email asking if they were interesting in speaking again since they had spoken last year.&lt;/p&gt;  &lt;h5&gt;The Secret&lt;/h5&gt;  &lt;p&gt;Remember how I talked about discussing who would have the most attendees in the 4pm session, well, it wasn’t me, I had the LEAST!&amp;#160; I had one person, but as I said, it went really well and he had something to take back to the office and try.&amp;#160; Sure I’d like to speak to hundreds, but one on one was fun.&lt;/p&gt;  &lt;p&gt;Next up a few things we (really I) could have done better.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-5746630052605834613?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=o7HR3_NtbTM:h3XufG-cirU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=o7HR3_NtbTM:h3XufG-cirU:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=o7HR3_NtbTM:h3XufG-cirU:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=o7HR3_NtbTM:h3XufG-cirU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=o7HR3_NtbTM:h3XufG-cirU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=o7HR3_NtbTM:h3XufG-cirU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=o7HR3_NtbTM:h3XufG-cirU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=o7HR3_NtbTM:h3XufG-cirU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=o7HR3_NtbTM:h3XufG-cirU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=o7HR3_NtbTM:h3XufG-cirU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=o7HR3_NtbTM:h3XufG-cirU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/o7HR3_NtbTM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/5746630052605834613/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/sqlsaturday-21-orlando-recap.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5746630052605834613?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5746630052605834613?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/o7HR3_NtbTM/sqlsaturday-21-orlando-recap.html" title="SQLSaturday #21 – Orlando Recap" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/sqlsaturday-21-orlando-recap.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEAQXw8fCp7ImA9WxNVEEk.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-4240426437131176115</id><published>2009-10-20T08:44:00.000-04:00</published><updated>2009-10-20T08:44:00.274-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-20T08:44:00.274-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="User Group" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Community" /><title>A Week of SQL Server</title><content type="html">&lt;p&gt;As anyone who reads this blog knows, &lt;a href="http://sqlsaturday.com/eventhome.aspx?eventid=32" target="_blank"&gt;SQLSaturday #21 – Orlando&lt;/a&gt; was last Saturday (Oct. 17, 2009) and as a lead in to the event &lt;a href="http://www.sqlservercentral.com/blogs/andy_warren/default.aspx" target="_blank"&gt;Andy Warren&lt;/a&gt; and &lt;a href="http://www.sqlshare.com" target="_blank"&gt;SQLShare&lt;/a&gt; put together a week of one day seminars.&amp;#160; Here’s how I spent the week.&lt;/p&gt;  &lt;h5 align="center"&gt;Monday&lt;/h5&gt;  &lt;p&gt;It was the one day there was not a lot I had to do for &lt;a href="http://www.sqlsaturday.com"&gt;SQLSaturday&lt;/a&gt; nor were there any good networking opportunties here.&amp;#160; I did answer some email questions about the event and make a schedule tweak so one of our out of town speakers could make her flight home.&lt;/p&gt;  &lt;h5 align="center"&gt;Tuesday&lt;/h5&gt;  &lt;p&gt;We had a volunteer meeting this evening and stiffed the event bags.&amp;#160; We had a good group of volunteers and got the bags done quickly.&amp;#160; We also made general plans for who would do what jobs on Saturday.&lt;/p&gt;  &lt;h5 align="center"&gt;Wednesday&lt;/h5&gt;  &lt;p&gt;I had the opportunity to attend the Real World Performance Tuning seminar by &lt;a href="http://kevinekline.com" target="_blank"&gt;Kevin Kline&lt;/a&gt;.&amp;#160; I had never met Kevin so it was good to meet him and have the opportunity to hear and see the method he has developed when performance tuning.&amp;#160; It was also neat the one of the other attendees, Dale (can’t remember his last name), recognized me from my picture on &lt;a href="http://www.sqlservercentral.com"&gt;SQLServerCentral&lt;/a&gt;.&amp;#160; I felt famous.&lt;/p&gt;  &lt;p&gt;After the seminar we had an informal &lt;a href="http://orlando.sqlpass.org" target="_blank"&gt;OPASS&lt;/a&gt; meeting Bahama Breeze billed as a meet and greet with Kevin Kline.&amp;#160; Not counting Kevin and &lt;a href="http://sqlblog.com/blogs/andy_leonard/" target="_blank"&gt;Andy Leonard&lt;/a&gt;, who was in town to do a seminar on Thursday, there were 11 people that came to hang with and talk with Kevin.&amp;#160; This was a great time.&amp;#160; We talked shop and made contacts.&lt;/p&gt;  &lt;p&gt;As we discussed SQL Server and technology in general it was nice to be able to possibly help out with some technical problems others had experienced and it was great to be able to point over to Andy Leonard when an SSIS question came up and say, “There’s the man you want to talk to.”&lt;/p&gt;  &lt;p&gt;At the end it was down to Andy Warren, Andy Leonard, Kevin Kline, and myself and we had a great discussion about &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; and the PASS Summit.&amp;#160; Andy Leonard has a great story about meeting Ken Henderson at PASS.&amp;#160; I mostly listened and learned.&amp;#160; It’s like sitting at the feet of the masters.&lt;/p&gt;  &lt;h5 align="center"&gt;Thursday&lt;/h5&gt;  &lt;p&gt;Unfortunately I couldn’t attend Andy Leonard’s seminar on SSIS because I had conference call I had to be at work for.&amp;#160; While this was on-going we found out that some of the rooms we planned on using for SQLSaturday would basically be unusable because we would have had to use the instructor computers in order to use the projectors.&amp;#160; This would have nearly impossible as those PC’s do not have SQL Server installed.&amp;#160; So when taking breaks from the conference call I re-arranged the rooms we used.&amp;#160; Unfortunately we had already printed out all the signs and schedules with room numbers on them.&lt;/p&gt;  &lt;p&gt;That evening I was invited to dinner with Andy Warren, &lt;a href="http://blogs.msdn.com/buckwoody/" target="_blank"&gt;Buck Woody&lt;/a&gt; (in town for a seminar on Friday), and &lt;a href="http://kendalvandyke.blogspot.com" target="_blank"&gt;Kendal Van Dyke&lt;/a&gt;.&amp;#160; It was quite a learning experience as Buck shared some of his experience.&lt;/p&gt;  &lt;h5 align="center"&gt;Friday&lt;/h5&gt;  &lt;p&gt;I as able to attend part of the seminar, A Performance Tuning Methodology by Buck Woody.&amp;#160;&amp;#160; He talked about Application Path Analysis and how the DBA really needs to know all about the applications that access the database and how they do it.&amp;#160; Why, because DBA stands for Default Blame Acceptor, so you need to know what is happening elsewhere so you can find out what changed and identify the problem.&amp;#160; Documenting the Application Path is very important to this process.&lt;/p&gt;  &lt;p&gt;In the afternoon I met &lt;a href="http://www.sqlservercentral.com/blogs/sqldownsouth/default.aspx" target="_blank"&gt;Patrick Leblanc&lt;/a&gt; (&lt;a href="http://twitter.com/patrickdba" target="_blank"&gt;@PatrickDBA&lt;/a&gt;) and he joined Andy Warren and I on a trip to CostCo to pick up supplies for SQLSaturday and helped load up the UHAUL with all the supplies so we’d be ready for the morning.&amp;#160; Patrick is a great guy, fun to be around, and knows his stuff.&amp;#160; Take a look at his &lt;a href="http://www.sqllunch.com" target="_blank"&gt;SQLLunch&lt;/a&gt; site where he is attempting to provide regular lunch time (EST) SQL Server seminars.&lt;/p&gt;  &lt;p&gt;After we were done loading up we went our separate ways to get ready for the Speaker Party at Jax’s Fifth Avenue in Lake Mary.&amp;#160; We had a very good turnout with over 20 of the speaker’s in attendance.&amp;#160; I could actually name everyone who was there, but I won’t since it would make for a long list.&amp;#160; Needless to say it was a really good time talking shop and the next time anyone tells you that computer geeks aren’t social tell them to go to a SQLSaturday speaker party, I’ve never seen so many talkative geeks!!&lt;/p&gt;  &lt;h5 align="center"&gt;Summary&lt;/h5&gt;  &lt;p align="left"&gt;As you can see I had a busy week, but it was well worth it.&amp;#160; I met at least 30 new people this week, all of whom are SQL Guru’s and I got to re-connect with a bunch of “old” friends from other events.&amp;#160; It was like a taste of the PASS Summit just a few weeks early.&lt;/p&gt;  &lt;p&gt;I’ll cover Saturday in my next post as I’ll discuss the event, what I thought went well and where I think we can do better.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-4240426437131176115?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=RXR-xgkcyA4:WaAGRN0HMnc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=RXR-xgkcyA4:WaAGRN0HMnc:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=RXR-xgkcyA4:WaAGRN0HMnc:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=RXR-xgkcyA4:WaAGRN0HMnc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=RXR-xgkcyA4:WaAGRN0HMnc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=RXR-xgkcyA4:WaAGRN0HMnc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=RXR-xgkcyA4:WaAGRN0HMnc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=RXR-xgkcyA4:WaAGRN0HMnc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=RXR-xgkcyA4:WaAGRN0HMnc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=RXR-xgkcyA4:WaAGRN0HMnc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=RXR-xgkcyA4:WaAGRN0HMnc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/RXR-xgkcyA4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/4240426437131176115/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/week-of-sql-server.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4240426437131176115?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4240426437131176115?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/RXR-xgkcyA4/week-of-sql-server.html" title="A Week of SQL Server" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/week-of-sql-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEDQHw5cSp7ImA9WxNWEkQ.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-8632511535893148748</id><published>2009-10-11T16:57:00.001-04:00</published><updated>2009-10-11T16:57:51.229-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-11T16:57:51.229-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLSaturday" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Professional Development" /><title>Here Comes SQLSaturday 21 – Orlando</title><content type="html">&lt;p&gt;Here it comes!&amp;#160; The big event on my schedule &lt;a href="http://www.sqlsaturday.com/eventhome.aspx?eventid=32" target="_blank"&gt;SQLSaturday #21 –Orlando&lt;/a&gt;.&amp;#160; We’ve got over 300 registered so it should be a great event.&amp;#160; I’ll be presenting &lt;em&gt;Dive into the Default Trace&lt;/em&gt; and enjoying being a volunteer and the networking opportunities presented.&amp;#160; We’ve got a fantastic lineup of speakers with 9 MVP’s, a couple of MS employees, and then a bunch of other great speakers like &lt;strike&gt;myself,&lt;/strike&gt; &lt;a href="http://sqlchicken.com/sql-university/" target="_blank"&gt;SQL University&lt;/a&gt; founder &lt;a href="http://sqlchicken.com/" target="_blank"&gt;Jorge Segarra&lt;/a&gt; (&lt;a href="http://twitter.com/SQLChicken" target="_blank"&gt;@SQLChicken&lt;/a&gt;), &lt;a href="http://chadwickmiller.spaces.live.com/default.aspx" target="_blank"&gt;Chad Miller&lt;/a&gt; (&lt;a href="http://twitter.com/cmille19" target="_blank"&gt;@CMille19&lt;/a&gt;) and &lt;a href="http://kendalvandyke.blogspot.com" target="_blank"&gt;Kendal Van Dyke&lt;/a&gt; (&lt;a href="http://twitter.com/SQLDBA" target="_blank"&gt;@SQLDBA&lt;/a&gt;).&amp;#160; So check out the &lt;a href="http://www.sqlsaturday.com/schedule.aspx" target="_blank"&gt;schedule&lt;/a&gt;, as you can still register right up to through Saturday morning.&amp;#160; I believe that there are also seats available for the pre-event &lt;a href="http://www.sqlsaturday.com/seminars.aspx?eventid=32" target="_blank"&gt;seminars&lt;/a&gt; hosted at the SQLShare offices. &lt;/p&gt;  &lt;p&gt;There’s a lot to get done this week beginning with a volunteer/bag stuffing meeting at the &lt;a href="http://www.sqlshare.com" target="_blank"&gt;SQLShare&lt;/a&gt; offices on Tuesday night, the pre-event &lt;a href="http://www.sqlsaturday.com/seminars.aspx?eventid=32" target="_blank"&gt;seminars&lt;/a&gt; by Andy Warren, Brian Knight, Kevin Kline, Andy Leonard, and Buck Woody (I’ll be there Wednesday and Friday), a special &lt;a href="http://orlando.sqlpass.org" target="_blank"&gt;OPASS&lt;/a&gt; meeting with Kevin Kline on Wednesday evening, and final prep for the big event on Friday afternoon and evening, the speaker party Friday night, and, finally, the big event on Saturday.&lt;/p&gt;  &lt;p&gt;Please don’t hesitate to email &lt;a href="mailto:sqlsaturday21@sqlsaturday.com"&gt;sqlsaturday21@&lt;a href="http://www.sqlsaturday.com"&gt;sqlsaturday&lt;/a&gt;.com&lt;/a&gt; with any questions you might have about the event or the seminars.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-8632511535893148748?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ABL-jQEuaD4:CyR8NesSMa8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ABL-jQEuaD4:CyR8NesSMa8:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ABL-jQEuaD4:CyR8NesSMa8:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ABL-jQEuaD4:CyR8NesSMa8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ABL-jQEuaD4:CyR8NesSMa8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ABL-jQEuaD4:CyR8NesSMa8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ABL-jQEuaD4:CyR8NesSMa8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ABL-jQEuaD4:CyR8NesSMa8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ABL-jQEuaD4:CyR8NesSMa8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ABL-jQEuaD4:CyR8NesSMa8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ABL-jQEuaD4:CyR8NesSMa8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/ABL-jQEuaD4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/8632511535893148748/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/here-comes-sqlsaturday-21-orlando.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8632511535893148748?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8632511535893148748?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/ABL-jQEuaD4/here-comes-sqlsaturday-21-orlando.html" title="Here Comes SQLSaturday 21 – Orlando" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/here-comes-sqlsaturday-21-orlando.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8MQXo6fSp7ImA9WxNWEE4.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-6672016264464898429</id><published>2009-10-08T17:20:00.001-04:00</published><updated>2009-10-08T17:21:20.415-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-08T17:21:20.415-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><category scheme="http://www.blogger.com/atom/ns#" term="Development" /><category scheme="http://www.blogger.com/atom/ns#" term="Code Example" /><category scheme="http://www.blogger.com/atom/ns#" term="Best Practice" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><category scheme="http://www.blogger.com/atom/ns#" term="Performance" /><title>Maintaining Security and Performance using Stored Procedures Part I – Using EXECUTE AS</title><content type="html">&lt;p&gt;Anyone who knows me, or has worked with me, knows that I am a proponent of using stored procedures for all database access.&amp;#160; I believe that using stored procedures makes your database more secure and makes it simpler to maintain a well performing system.&amp;#160; One area where stored procedures are more difficult to work with than building queries in the GUI or business layer are with dynamic search queries.&amp;#160; Here are some traditional issues with dynamic search in stored procedures:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;If you use traditional IF, ELSE statements to build the procedure you get a long and hard read procedure, and you are less likely to get plan re-use. &lt;/li&gt;    &lt;li&gt;If you try tricks like WHERE LastName = IsNull(@LastName, LastName) and FirstName = IsNull(@FirstName, FirstName) you can get plan re-use, but the plan used may not be, and many times is not, the best plan to use. &lt;/li&gt;    &lt;li&gt;If you use dynamic SQL using the EXEC (@sql) syntax you do not get plan re-use, you open yourself up for SQL Injection, and, prior to SQL Server 2005, you had to grant access to the objects used in the query defeating part of the reason for using stored procedures in the first place. &lt;/li&gt;    &lt;li&gt;If you use dynamic SQL using sp_executsql and parameters you are more likely to get plan re-use, you are safe from sql injection, but, pre-2005, you still needed to grant access to the queried objects. &lt;/li&gt;    &lt;li&gt;Either dynamic SQL option means creating a large string of SQL and concatenating it, so it can be and, in my opinion is, a pain to read and a pain to make sure you have all your syntax right. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;See &lt;a href="http://www.sommarskog.se" target="_blank"&gt;Erland Sommarskog&lt;/a&gt;'s excellent articles, &lt;a href="http://www.sommarskog.se/dynamic_sql.html" target="_blank"&gt;The curse and blessings of dynamic SQL&lt;/a&gt; and &lt;a href="http://www.sommarskog.se/dyn-search-2005.html" target="_blank"&gt;Dynamic Search Conditions&lt;/a&gt;, for more details.&lt;/p&gt;  &lt;p&gt;Early in my career, when working with SQL Server 7 and 2000 I tended to use option 1, sometimes with temporary tables, then I moved to option 2.&amp;#160; I never used dynamic SQL because I did not want to grant select access to the tables being queried.&amp;#160; I sacrificed performance for security and counted on &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/03/whats-ownership-chaining.html" target="_blank"&gt;ownership chaining&lt;/a&gt; to handle access to the underlying tables.&amp;#160; With the advent of SQL Server 2005 and the EXECUTE AS I have moved to option 4, dynamic SQL using sp_executesql and parameters as I believe it gives me the best of both worlds.&lt;/p&gt;  &lt;h4 align="center"&gt;How’s it work&lt;/h4&gt;  &lt;p align="left"&gt;Essentially you create the stored procedure and add the WITH EXECUTE AS Caller/Owner/Self/’user name’/’login name’ (see the Books on Line entry for &lt;a href="http://msdn.microsoft.com/en-us/library/ms188354(SQL.90).aspx" target="_blank"&gt;EXECUTE AS&lt;/a&gt; for more details) and this changes the context in which the code within the procedure is run.&amp;#160; So you can create a user (SelectAll) in the database that has select rights on all the tables and then no matter who calls the stored procedure the procedure will run correctly.&amp;#160; If you choose to use EXECUTE AS OWNER then the procedure executes in the security context of the Owner of the procedure so you can simulate ownership chaining.&amp;#160; &lt;/p&gt;  &lt;h4 align="center"&gt;Example&lt;/h4&gt;  &lt;h5 align="center"&gt;Security&lt;/h5&gt;  &lt;p align="left"&gt;A post like this wouldn’t be complete without at least a simple example.&amp;#160; I will be using the AdventureWorks database (get it at &lt;a href="http://www.codeplex.com/MSFTDBProdSamples" target="_blank"&gt;CodePlex&lt;/a&gt;, I’m still using the 2005 version) with some added data (I used &lt;a href="http://www.red-gate.com/products/SQL_Data_Generator/index.htm" target="_blank"&gt;RedGate SQLDataGenerator&lt;/a&gt;).&amp;#160; All the code to run the examples is available for download &lt;a href="http://cid-d959306fcfdbac21.skydrive.live.com/self.aspx/Public/Blog%20Resources/DynamicSQLSecurity.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="left"&gt;First you need to create a user with limited persmissions:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Use &lt;/span&gt;AdventureWorks&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;br /&gt;&lt;br /&gt;Create &lt;/span&gt;&lt;span style="color: magenta"&gt;User &lt;/span&gt;DynamicSQLTest without &lt;span style="color: blue"&gt;login&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Notice that I used the Without Login syntax so I did not need to create a login as well.&amp;#160; This is because I will also be using EXECUTE AS before running the stored procedure to change my execution context to this limited rights user instead of creating a new connection with a limited rights login.&amp;#160; Next you need to create the stored procedure.&amp;#160; I’m going to start with a “normal” stored procedure using Option 2 from above, because I also want to demonstrate the difference in performance.&amp;#160; Here’s the procedure:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Use &lt;/span&gt;AdventureWorks&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;GO&lt;br /&gt;&lt;br /&gt;IF &lt;/span&gt;&lt;span style="color: magenta"&gt;OBJECT_ID&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;'dbo.FindPhoneByName'&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;N'P'&lt;/span&gt;&lt;span style="color: gray"&gt;) Is Not Null&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Begin&lt;br /&gt;        Drop Procedure &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;End&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;br /&gt;    &lt;br /&gt;CREATE PROCEDURE &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName&lt;br /&gt;    &lt;span style="color: gray"&gt;(&lt;br /&gt;    &lt;/span&gt;@LastName &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;50&lt;span style="color: gray"&gt;) = null,&lt;br /&gt;    &lt;/span&gt;@FirstName &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;50&lt;span style="color: gray"&gt;) = null&lt;br /&gt;    )&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;AS&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: blue"&gt;SET NOCOUNT ON&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Select&lt;br /&gt;         &lt;/span&gt;Title&lt;span style="color: gray"&gt;,&lt;br /&gt;         &lt;/span&gt;FirstName&lt;span style="color: gray"&gt;,&lt;br /&gt;         &lt;/span&gt;MiddleName&lt;span style="color: gray"&gt;,&lt;br /&gt;         &lt;/span&gt;LastName&lt;span style="color: gray"&gt;,&lt;br /&gt;         &lt;/span&gt;Suffix&lt;span style="color: gray"&gt;,&lt;br /&gt;         &lt;/span&gt;Phone  &lt;br /&gt;    &lt;span style="color: blue"&gt;From&lt;br /&gt;        &lt;/span&gt;Person&lt;span style="color: gray"&gt;.&lt;/span&gt;Contact&lt;br /&gt;    &lt;span style="color: blue"&gt;Where &lt;br /&gt;        &lt;/span&gt;LastName &lt;span style="color: gray"&gt;Like &lt;/span&gt;&lt;span style="color: magenta"&gt;IsNull&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;@LastName&lt;span style="color: gray"&gt;, &lt;/span&gt;LastName&lt;span style="color: gray"&gt;) + &lt;/span&gt;&lt;span style="color: red"&gt;N'%' &lt;/span&gt;&lt;span style="color: gray"&gt;And &lt;br /&gt;        &lt;/span&gt;FirstName &lt;span style="color: gray"&gt;Like &lt;/span&gt;&lt;span style="color: magenta"&gt;IsNull&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;@FirstName&lt;span style="color: gray"&gt;, &lt;/span&gt;FirstName&lt;span style="color: gray"&gt;) + &lt;/span&gt;&lt;span style="color: red"&gt;N'%'&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;        &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Return&lt;/span&gt;&lt;span style="color: gray"&gt;;         &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;END&lt;br /&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This procedure is pretty self explanatory.&amp;#160; Now we need to give the limited rights use, DynamicSQLTest, execute rights on our procedure:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Use &lt;/span&gt;AdventureWorks&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;br /&gt;&lt;br /&gt;Grant Exec on &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName &lt;span style="color: blue"&gt;to &lt;/span&gt;DynamicSQLTest&lt;span style="color: gray"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To test the security and performance of the stored procedure we are going to execute it 3 times with a dbo user and then repeat as the limited rights user, DynamicSQLTest.&amp;#160; Here is what I used:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Exec &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName @FirstName &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'J'&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;@LastName &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'A'&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;br /&gt;&lt;br /&gt;Exec &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName @FirstName &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'J'&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;br /&gt;&lt;br /&gt;Exec &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName @LastName &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'A'&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Then execute the same 3 calls, but run this first to change the security context:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Execute AS &lt;/span&gt;&lt;span style="color: magenta"&gt;User &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'DynamicSQLTest'&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you are running the code in the same SSMS session be sure to issue the REVERT command to return to your original security context.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The stored procedure calls should run successfully for both users and should produce the same results and performance for both users.&amp;#160; Now we’ll ALTER the procedure to use dynamic SQL:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Alter PROCEDURE &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName&lt;br /&gt;    &lt;span style="color: gray"&gt;(&lt;br /&gt;    &lt;/span&gt;@LastName &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;50&lt;span style="color: gray"&gt;) = null,&lt;br /&gt;    &lt;/span&gt;@FirstName &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;50&lt;span style="color: gray"&gt;) = null&lt;br /&gt;    )&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;AS&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;    SET NOCOUNT ON&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Declare &lt;/span&gt;@sql_cmd &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;2000&lt;span style="color: gray"&gt;),&lt;br /&gt;            &lt;/span&gt;@select &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;1000&lt;span style="color: gray"&gt;),&lt;br /&gt;            &lt;/span&gt;@where &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;1000&lt;span style="color: gray"&gt;),&lt;br /&gt;            &lt;/span&gt;@parameters &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;1000&lt;span style="color: gray"&gt;);&lt;br /&gt;    &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Set &lt;/span&gt;@parameters &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;N'@FirstName nvarchar(50), @LastName nvarchar(50)'&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Set &lt;/span&gt;@select &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;N'Select&lt;br /&gt;                     Title,&lt;br /&gt;                     FirstName,&lt;br /&gt;                     MiddleName,&lt;br /&gt;                     LastName,&lt;br /&gt;                     Suffix,&lt;br /&gt;                     Phone  &lt;br /&gt;                From&lt;br /&gt;                    Person.Contact'&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Set &lt;/span&gt;@where &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;N' Where 1=1 '                &lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;@LastName &lt;span style="color: gray"&gt;is not null&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;Begin&lt;br /&gt;            Set &lt;/span&gt;@where &lt;span style="color: gray"&gt;= &lt;/span&gt;@where &lt;span style="color: gray"&gt;+ &lt;/span&gt;&lt;span style="color: red"&gt;N' And LastName Like @LastName + N''%'' '&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;End&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;        &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;@FirstName &lt;span style="color: gray"&gt;is not null     &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;Begin&lt;br /&gt;            Set &lt;/span&gt;@where &lt;span style="color: gray"&gt;= &lt;/span&gt;@where &lt;span style="color: gray"&gt;+ &lt;/span&gt;&lt;span style="color: red"&gt;N' And FirstName Like @FirstName + N''%'''&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;End&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Set &lt;/span&gt;@sql_cmd &lt;span style="color: gray"&gt;= &lt;/span&gt;@select &lt;span style="color: gray"&gt;+ &lt;/span&gt;@where&lt;span style="color: gray"&gt;;&lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Exec &lt;/span&gt;&lt;span style="color: green"&gt;sys&lt;/span&gt;&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: maroon"&gt;sp_executesql &lt;/span&gt;@sql_cmd&lt;span style="color: gray"&gt;, &lt;/span&gt;@parameters&lt;span style="color: gray"&gt;, &lt;/span&gt;@LastName &lt;span style="color: gray"&gt;= &lt;/span&gt;@LastName&lt;span style="color: gray"&gt;, &lt;/span&gt;@FirstName &lt;span style="color: gray"&gt;= &lt;/span&gt;@FirstName&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Return&lt;/span&gt;&lt;span style="color: gray"&gt;;         &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now when you run our examples, you’ll see that it runs successfully under your original security context, but you receive an error when you run it as the limited rights user:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;p&gt;Msg 229, Level 14, State 5, Line 1 &lt;br /&gt;    &lt;br /&gt;The SELECT permission was denied on the object 'Contact', database 'AdventureWorks', schema 'Person'.&lt;/p&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font color="#000000"&gt;This is because the execution context changed and ownership chaining no longer applies.&amp;#160; To get the Dynamic SQL Stored procedure to work add WITH EXECUTE AS OWNER after the parameter definition like this:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;ALTER PROCEDURE &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;FindPhoneByName&lt;br /&gt;    &lt;span style="color: gray"&gt;(&lt;br /&gt;    &lt;/span&gt;@LastName &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;50&lt;span style="color: gray"&gt;) = null,&lt;br /&gt;    &lt;/span&gt;@FirstName &lt;span style="color: blue"&gt;nvarchar&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;50&lt;span style="color: gray"&gt;) = null&lt;br /&gt;    )&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;&lt;strong&gt;&lt;font size="3"&gt;With Execute As owner&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;AS&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Then you can re-run the your stored procedure calls and they should work both for the dbo user and the limited rights user because the EXECUTE AS OWNER has enabled access to the tables.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5 align="center"&gt;Perfomance&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;I ran all of my examples with SET STATISTICS IO ON so I could see the results.&amp;#160; Here are those results (also part of the download):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;th rowspan="2"&gt;Parameters&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;      &lt;th colspan="2"&gt;Non-Dynamic SQL&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;      &lt;th colspan="2"&gt;Dynamic SQL&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;th&gt;Scans&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;      &lt;th&gt;Reads&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;      &lt;th&gt;Scans&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;      &lt;th&gt;Reads&lt;/th&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td valign="top"&gt;@FirstName = 'J', @LastName = 'A'&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;593&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;593&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td valign="top"&gt;@FirstName = 'J'&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;7792&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1116&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;    &lt;tr&gt;&lt;br /&gt;      &lt;td valign="top"&gt;@LastName='A'&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;3039&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;      &lt;td valign="top" align="right"&gt;1116&lt;/td&gt;&lt;br /&gt;    &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Notice the reduced number of reads required by the Dynamic SQL when only 1 parameter is supplied.&amp;#160; This is because it is using a different query plan, while the Non-Dynamic procedure has one query plan which is not optimal when only one parameter is supplied &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 align="center"&gt;Conclusions&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As you can see some of the limitations of Dynamic SQL have been “cured” by the advent of the EXECUTE AS clause.&amp;#160; This has made it simpler to use Dynamic SQL and get the performance benefits provided by getting a proper execution plan and getting plan re-use.&amp;#160; Again all code is available &lt;a href="http://cid-d959306fcfdbac21.skydrive.live.com/self.aspx/Public/Blog%20Resources/DynamicSQLSecurity.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next I’ll be discussing using a Certificate to sign a stored procedure.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-6672016264464898429?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=qDCUxNSayjA:KyQB2f4v0eE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=qDCUxNSayjA:KyQB2f4v0eE:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=qDCUxNSayjA:KyQB2f4v0eE:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=qDCUxNSayjA:KyQB2f4v0eE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=qDCUxNSayjA:KyQB2f4v0eE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=qDCUxNSayjA:KyQB2f4v0eE:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=qDCUxNSayjA:KyQB2f4v0eE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=qDCUxNSayjA:KyQB2f4v0eE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=qDCUxNSayjA:KyQB2f4v0eE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=qDCUxNSayjA:KyQB2f4v0eE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=qDCUxNSayjA:KyQB2f4v0eE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/qDCUxNSayjA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/6672016264464898429/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/maintaining-security-and-performance.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/6672016264464898429?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/6672016264464898429?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/qDCUxNSayjA/maintaining-security-and-performance.html" title="Maintaining Security and Performance using Stored Procedures Part I – Using EXECUTE AS" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/maintaining-security-and-performance.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIGQXw4eip7ImA9WxNXGE4.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-8797222351723858513</id><published>2009-10-06T08:52:00.000-04:00</published><updated>2009-10-06T08:52:00.232-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-06T08:52:00.232-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Development" /><category scheme="http://www.blogger.com/atom/ns#" term="Code Example" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><category scheme="http://www.blogger.com/atom/ns#" term="Performance" /><title>Index on a Foreign Key?</title><content type="html">&lt;p&gt;About two weeks ago, I had a discussion on &lt;a href="http://www.twitter.com" target="_blank"&gt;Twitter&lt;/a&gt; and via email with &lt;a href="http://facility9.com" target="_blank"&gt;Jeremiah Peschka&lt;/a&gt; (&lt;a href="http://twitter.com/peschkaj" target="_blank"&gt;@peschkaj&lt;/a&gt;) about placing indexes on Foreign Key columns.&amp;#160; I made the comment that I while indexing a foreign key is not required that I thought they made good candidates.&amp;#160; I also shared this &lt;a href="http://sqlblog.com/blogs/greg_low/archive/2008/07/29/indexing-foreign-keys-should-sql-server-do-that-automatically.aspx" target="_blank"&gt;blog post&lt;/a&gt; by &lt;a href="http://sqlblog.com/blogs/greg_low" target="_blank"&gt;Greg Low&lt;/a&gt; with him.&amp;#160; &lt;/p&gt;  &lt;p&gt;Jeremiah mentioned that he had never had SQL Server recommend an index on a foreign key which I thought was strange so I decided to run some tests.&amp;#160; I ran the tests against my copy of AdventureWorks to which I have added data.&amp;#160; Here is the query I ran:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetailID&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderQty&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;ProductID&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;UnitPrice&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;UnitPriceDiscount&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;LineTotal&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;UnitPrice2&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;RevisionNumber&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;DueDate&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;ShipDate&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: blue"&gt;Status&lt;/span&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderNumber&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;PurchaseOrderNumber&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;AccountNumber&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;CustomerID&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SubTotal&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;TaxAmt&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;Freight&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;TotalDue&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;Comment&lt;br /&gt;&lt;span style="color: blue"&gt;FROM&lt;br /&gt;    &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderHeader &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOH &lt;span style="color: gray"&gt;JOIN&lt;br /&gt;    &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetail &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOD &lt;span style="color: blue"&gt;ON &lt;br /&gt;        &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;span style="color: gray"&gt;= &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;br /&gt;&lt;span style="color: blue"&gt;WHERE&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate &lt;span style="color: gray"&gt;&amp;gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'12/1/2007'&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In my copy of AdventureWorks I have 131465 rows in SalesOrderHeader and 1121317 rows in SalesOrderDetail.&amp;#160; The Max(SalesOrderHeader.OrderDate) is 12/30/2007 so I just queried for the last month (1095 rows).&amp;#160; In this query SalesOrderDetail.SalesOrderID is a foreign key referencing SalesOrderHeader.SalesOrderID and before modification the Clustered Primary Key on SalesOrderDetail is on SalesOrderID, SalesOrderDetailID.&amp;#160; Because SalesOrderID is the lead column in the clustering key the optimizer uses a clustered index seek to access SalesOrderDetail as shown here:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_VI8x-nuWx9g/SsqxREfsRNI/AAAAAAAABIg/AZ52PnMy7E4/s1600-h/image%5B5%5D.png" target="_blank"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_VI8x-nuWx9g/SsqxRTKJYHI/AAAAAAAABIk/GvcxBg1p2YM/image_thumb%5B3%5D.png?imgmax=800" width="305" height="87" /&gt;&lt;/a&gt;Now, to see if the Optimizer would recommend an index on SalesOrderDetail.SalesOrderID, I altered the clustered primary key on SalesOrderDetail, removing SalesOrderID with the following code:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;USE &lt;/span&gt;[AdventureWorks]&lt;br /&gt;&lt;span style="color: blue"&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;IF  &lt;/span&gt;&lt;span style="color: gray"&gt;EXISTS (&lt;/span&gt;&lt;span style="color: blue"&gt;SELECT &lt;/span&gt;&lt;span style="color: gray"&gt;* &lt;/span&gt;&lt;span style="color: blue"&gt;FROM &lt;/span&gt;&lt;span style="color: green"&gt;sys&lt;/span&gt;&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: green"&gt;indexes &lt;/span&gt;&lt;span style="color: blue"&gt;WHERE &lt;/span&gt;&lt;span style="color: magenta"&gt;object_id &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: magenta"&gt;OBJECT_ID&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;N'[Sales].[SalesOrderDetail]'&lt;/span&gt;&lt;span style="color: gray"&gt;) AND &lt;/span&gt;name &lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: red"&gt;N'PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID'&lt;/span&gt;&lt;span style="color: gray"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;ALTER TABLE &lt;/span&gt;[Sales]&lt;span style="color: gray"&gt;.&lt;/span&gt;[SalesOrderDetail] &lt;span style="color: blue"&gt;DROP CONSTRAINT &lt;/span&gt;[PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID]&lt;br /&gt;&lt;span style="color: blue"&gt;GO&lt;br /&gt;&lt;br /&gt;USE &lt;/span&gt;[AdventureWorks]&lt;br /&gt;&lt;span style="color: blue"&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;ALTER TABLE &lt;/span&gt;[Sales]&lt;span style="color: gray"&gt;.&lt;/span&gt;[SalesOrderDetail] &lt;span style="color: blue"&gt;ADD  CONSTRAINT &lt;/span&gt;[PK_SalesOrderDetail_SalesOrderID_SalesOrderDetailID] &lt;span style="color: blue"&gt;PRIMARY KEY CLUSTERED &lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;    &lt;/span&gt;[SalesOrderDetailID] &lt;span style="color: blue"&gt;ASC&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;)&lt;/span&gt;&lt;span style="color: blue"&gt;WITH &lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;PAD_INDEX  &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: blue"&gt;OFF&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;STATISTICS_NORECOMPUTE  &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: blue"&gt;OFF&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;SORT_IN_TEMPDB &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: blue"&gt;OFF&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;IGNORE_DUP_KEY &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: blue"&gt;OFF&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;ONLINE &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: blue"&gt;OFF&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;ALLOW_ROW_LOCKS  &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: blue"&gt;ON&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: blue"&gt;ALLOW_PAGE_LOCKS  &lt;/span&gt;&lt;span style="color: gray"&gt;= &lt;/span&gt;&lt;span style="color: blue"&gt;ON&lt;/span&gt;&lt;span style="color: gray"&gt;) &lt;/span&gt;&lt;span style="color: blue"&gt;ON &lt;/span&gt;[PRIMARY]&lt;br /&gt;&lt;span style="color: blue"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I then re-ran my first query and now you can see that I there is a clustered index scan, a hash match join, and, in green at the top, a index recommended on SalesOrderDetail.SalesOrderID:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_VI8x-nuWx9g/SsqxRr8GKkI/AAAAAAAABIo/nvbbWsggfyc/s1600-h/image%5B17%5D.png" target="_blank"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_VI8x-nuWx9g/SsqxR2W4rxI/AAAAAAAABIs/7MGCSprsccY/image_thumb%5B11%5D.png?imgmax=800" width="367" height="84" /&gt;&lt;/a&gt;Next I added the suggested index (remember that you should not just add indexes to production without checking other queries as well):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;USE &lt;/span&gt;[AdventureWorks]&lt;br /&gt;&lt;span style="color: blue"&gt;GO&lt;br /&gt;CREATE NONCLUSTERED INDEX &lt;/span&gt;SalesOrderDetails_SalesOrderId&lt;br /&gt;&lt;span style="color: blue"&gt;ON &lt;/span&gt;[Sales]&lt;span style="color: gray"&gt;.&lt;/span&gt;[SalesOrderDetail] &lt;span style="color: gray"&gt;(&lt;/span&gt;[SalesOrderID]&lt;span style="color: gray"&gt;)&lt;br /&gt;&lt;/span&gt;INCLUDE &lt;span style="color: gray"&gt;(&lt;/span&gt;[SalesOrderDetailID]&lt;span style="color: gray"&gt;,&lt;/span&gt;[OrderQty]&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;[ProductID]&lt;span style="color: gray"&gt;,&lt;/span&gt;[UnitPrice]&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;[UnitPriceDiscount]&lt;span style="color: gray"&gt;,&lt;/span&gt;[LineTotal]&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;[UnitPrice2]&lt;span style="color: gray"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Then I re-ran my query, and here’s the execution plan:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_VI8x-nuWx9g/SsqxSICgK9I/AAAAAAAABIw/sM-NEB2DIOc/s1600-h/image%5B18%5D.png" target="_blank"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_VI8x-nuWx9g/SsqxSLBRSVI/AAAAAAAABI0/QP0Wn59TrHM/image_thumb%5B12%5D.png?imgmax=800" width="408" height="103" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here are the Statistics IO results from the 3 queries as well:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Results with SalesOrderID as lead column in Primary Key (Original State)&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Table 'SalesOrderDetail'. Scan count 147, logical reads 516, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.&lt;br /&gt;  &lt;br /&gt;Table 'SalesOrderHeader'. Scan count 1, logical reads 461, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Results with SalesOrderID removed from Primary Key and not added as an index.&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.&lt;br /&gt;  &lt;br /&gt;Table 'SalesOrderDetail'. Scan count 1, logical reads 12584, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Table 'SalesOrderHeader'. Scan count 1, logical reads 461, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Results with the suggested index on SalesOrderID.&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Table 'SalesOrderDetail'. Scan count 147, logical reads 504, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.&lt;br /&gt;  &lt;br /&gt;Table 'SalesOrderHeader'. Scan count 1, logical reads 461, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4 align="center"&gt;Conclusion&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;In this case you can see that adding an index on the foreign key, whether the lead column in the Clustered Primary Key or in a non-clustered index, you get much improved performance particularly regarding reads, and that the non-clustered index actual provides a slightly better access path than being part of the clustered primary key.&amp;#160; Certainly you need to test for your individual situations but, I would say that the majority of the time a foreign key will benefit from an index since it is used as a filter in the JOIN criteria.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;AdventureWorks can be downloaded from &lt;a href="http://msftdbprodsamples.codeplex.com/" target="_blank"&gt;codeplex&lt;/a&gt;.&amp;#160; Execution Plans and T-SQL can be downloaded from &lt;a href="http://cid-d959306fcfdbac21.skydrive.live.com/self.aspx/Public/Foreign%20Key%20Index%20Resources.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-8797222351723858513?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=X0-AK9HbRi0:j-RYiHYfWrA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=X0-AK9HbRi0:j-RYiHYfWrA:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=X0-AK9HbRi0:j-RYiHYfWrA:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=X0-AK9HbRi0:j-RYiHYfWrA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=X0-AK9HbRi0:j-RYiHYfWrA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=X0-AK9HbRi0:j-RYiHYfWrA:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=X0-AK9HbRi0:j-RYiHYfWrA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=X0-AK9HbRi0:j-RYiHYfWrA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=X0-AK9HbRi0:j-RYiHYfWrA:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=X0-AK9HbRi0:j-RYiHYfWrA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=X0-AK9HbRi0:j-RYiHYfWrA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/X0-AK9HbRi0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/8797222351723858513/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/index-on-foreign-key.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8797222351723858513?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/8797222351723858513?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/X0-AK9HbRi0/index-on-foreign-key.html" title="Index on a Foreign Key?" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/index-on-foreign-key.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAGQXg6eip7ImA9WxNXFE0.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-4761486844868864326</id><published>2009-10-01T09:12:00.000-04:00</published><updated>2009-10-01T09:12:00.612-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-01T09:12:00.612-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLSaturday" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>Speaking at SQLSaturday #21 – Orlando</title><content type="html">&lt;p&gt;Well, I guess this isn’t a surprise since I put together the schedule, but I’m still excited to be speaking at &lt;a href="http://www.sqlsaturday.com"&gt;SQLSaturday&lt;/a&gt; #21 – Orlando on October 17th.&amp;#160; I’ll be presenting &lt;em&gt;Dive into the Default Trace&lt;/em&gt;.&amp;#160; Once again I am honored to be on the schedule with the other speakers including, Buck Woody, Kevin Kline, Andy Leonard, Joe Webb, Joe Celko, Andy Warren, Jonathan Kehayias, Kendal Van Dyke, and more… As &lt;a href="http://sqlchicken.com/" target="_blank"&gt;Jorge Segarra&lt;/a&gt; has said on &lt;a href="http://www.twitter.com" target="_blank"&gt;Twitter&lt;/a&gt;, it is like a one day &lt;a href="http://www.sqlpass.org"&gt;PASS&lt;/a&gt; SUMMIT East!&amp;#160; All the people I mentioned not only will be speaking here in Orlando, but also have sessions at the PASS SUMMIT as well.&amp;#160; &lt;/p&gt;  &lt;p&gt;We have over 50 sessions in 9 tracks going throughout the day and there is still time to &lt;a href="http://www.sqlsaturday.com/register.aspx" target="_blank"&gt;register&lt;/a&gt;.&amp;#160; Check out the &lt;a href="http://www.sqlsaturday.com/schedule.aspx" target="_blank"&gt;schedule&lt;/a&gt; and I’m sure you’ll find sessions that will help you become a better SQL Server DBA or developer.&amp;#160; And remember, you can’t beat &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/08/no-training-budget-still-no-excuse.html" target="_blank"&gt;FREE training&lt;/a&gt; that includes lunch (that’s $10), networking, donuts, coffee, water, and soda.&lt;/p&gt;  &lt;p&gt;Hope to see YOU there!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-4761486844868864326?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=FoFA9KCiVcc:YZpvmqSEGmA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=FoFA9KCiVcc:YZpvmqSEGmA:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=FoFA9KCiVcc:YZpvmqSEGmA:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=FoFA9KCiVcc:YZpvmqSEGmA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=FoFA9KCiVcc:YZpvmqSEGmA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=FoFA9KCiVcc:YZpvmqSEGmA:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=FoFA9KCiVcc:YZpvmqSEGmA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=FoFA9KCiVcc:YZpvmqSEGmA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=FoFA9KCiVcc:YZpvmqSEGmA:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=FoFA9KCiVcc:YZpvmqSEGmA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=FoFA9KCiVcc:YZpvmqSEGmA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/FoFA9KCiVcc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/4761486844868864326/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/10/speaking-at-sqlsaturday-21-orlando.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4761486844868864326?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/4761486844868864326?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/FoFA9KCiVcc/speaking-at-sqlsaturday-21-orlando.html" title="Speaking at SQLSaturday #21 – Orlando" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/10/speaking-at-sqlsaturday-21-orlando.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IMRno-fip7ImA9WxNXE0w.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-1243282368339633483</id><published>2009-09-30T09:02:00.000-04:00</published><updated>2009-09-30T10:06:27.456-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-30T10:06:27.456-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Development" /><category scheme="http://www.blogger.com/atom/ns#" term="Code Example" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>On vs. Where</title><content type="html">&lt;p&gt;&lt;font size="2" face="ms sans"&gt;Does it matter if you put your criteria in the ON clause or the WHERE clause?&amp;#160; Well, as with most things SQL the answer is, “It depends”.&amp;#160; If you are dealing with INNER JOIN’s then it really doesn’t matter because the query optimizer is smart enough to come up with the same execution plan for both.&amp;#160; For example these 2 queries evaluate to the same execution plan:&lt;/font&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;SELECT&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetailID&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;FROM&lt;br /&gt;    &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderHeader &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOH &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;JOIN&lt;br /&gt;    &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetail &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOD &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;ON &lt;br /&gt;        &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;span style="color: gray"&gt;= &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;WHERE&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate &lt;span style="color: gray"&gt;&amp;gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'7/1/2004' &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;AND &lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate &lt;span style="color: gray"&gt;&amp;lt; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="color: red"&gt;&lt;font size="2" face="ms sans"&gt;'8/1/2004'    &lt;br /&gt;    &lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;SELECT&lt;br /&gt;    &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetailID&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;FROM&lt;br /&gt;    &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderHeader &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOH&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetail &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOD &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;WHERE&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;span style="color: gray"&gt;= &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;AND&lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate &lt;span style="color: gray"&gt;&amp;gt;= &lt;/span&gt;&lt;span style="color: red"&gt;'7/1/2004' &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;AND &lt;br /&gt;    &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate &lt;span style="color: gray"&gt;&amp;lt; &lt;/span&gt;&lt;span style="color: red"&gt;'8/1/2004'&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_VI8x-nuWx9g/SrwtZu-Z7II/AAAAAAAABII/eTlfEwefBro/s1600-h/OnVSWhereExecPlan%5B6%5D.jpg" target="_blank"&gt;&lt;font size="2" face="ms sans"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Execution Plan" border="0" alt="Execution Plan" src="http://lh4.ggpht.com/_VI8x-nuWx9g/SrwtZ34EWvI/AAAAAAAABIM/v1gB-YvHQSU/OnVSWhereExecPlan_thumb%5B4%5D.jpg?imgmax=800" width="260" height="67" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="2" face="ms sans"&gt;The old SQL 6.5 OUTER JOIN syntax (*= and =*) has been &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms144262(SQL.90).aspx" target="_blank"&gt;&lt;font size="2" face="ms sans"&gt;discontinued beginning with SQL Server 2005&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="ms sans"&gt;, so you have to do the JOIN for OUTER JOIN’s in the ON as demonstrated in this code:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;SELECT &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetailID&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;, &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;FROM &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderHeader &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOH &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;LEFT JOIN &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;Sales&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderDetail &lt;span style="color: blue"&gt;AS &lt;/span&gt;SOD &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;ON &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;span style="color: gray"&gt;= &lt;/span&gt;SOD&lt;span style="color: gray"&gt;.&lt;/span&gt;SalesOrderID &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: blue"&gt;WHERE &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate &lt;span style="color: gray"&gt;&amp;gt;=&lt;/span&gt;&lt;span style="color: red"&gt;'7/1/2004' &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="ms sans"&gt;&lt;span style="color: gray"&gt;AND &lt;br /&gt;        &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;SOH&lt;span style="color: gray"&gt;.&lt;/span&gt;OrderDate &lt;span style="color: gray"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: red"&gt;'8/1/2004'&lt;/span&gt;&lt;/font&gt;&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="2" face="ms sans"&gt;Now let’s create a sandbox to play in.&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;&lt;span style="color: magenta"&gt;OBJECT_ID&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;'sales.orders'&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;'U'&lt;/span&gt;&lt;span style="color: gray"&gt;) Is Not Null&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Begin&lt;br /&gt;        Drop Table &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;orders&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;End&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;&lt;span style="color: magenta"&gt;OBJECT_ID&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;'sales.order_items'&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;'U'&lt;/span&gt;&lt;span style="color: gray"&gt;) Is Not Null&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Begin&lt;br /&gt;        Drop Table &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;order_items&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;End&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;br /&gt; &lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;&lt;span style="color: magenta"&gt;SCHEMA_ID&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;'sales'&lt;/span&gt;&lt;span style="color: gray"&gt;) Is Not Null&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Begin&lt;br /&gt;        Drop Schema &lt;/span&gt;sales&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;End&lt;/span&gt;&lt;span style="color: gray"&gt;;   &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;br /&gt;&lt;br /&gt;Create Schema &lt;/span&gt;sales&lt;span style="color: gray"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Go&lt;br /&gt;&lt;/span&gt;&lt;span style="color: green"&gt;/* &lt;br /&gt;Tables to hold sample data &lt;br /&gt;*/ &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Create Table &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;orders&lt;br /&gt;    &lt;span style="color: gray"&gt;( &lt;br /&gt;    &lt;/span&gt;order_id &lt;span style="color: blue"&gt;INT IDENTITY&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;1&lt;span style="color: gray"&gt;,&lt;/span&gt;1&lt;span style="color: gray"&gt;)&lt;/span&gt;&lt;span style="color: blue"&gt;PRIMARY KEY&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;br /&gt;    &lt;/span&gt;customer_id &lt;span style="color: blue"&gt;INT &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;); &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;Create Table &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;order_items&lt;br /&gt;    &lt;span style="color: gray"&gt;( &lt;br /&gt;    &lt;/span&gt;order_detail_id &lt;span style="color: blue"&gt;INT IDENTITY&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;1&lt;span style="color: gray"&gt;, &lt;/span&gt;1&lt;span style="color: gray"&gt;)&lt;/span&gt;&lt;span style="color: blue"&gt;PRIMARY KEY&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;br /&gt;    &lt;/span&gt;order_id &lt;span style="color: blue"&gt;INT&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;br /&gt;    &lt;/span&gt;product_id &lt;span style="color: blue"&gt;INT&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;br /&gt;    &lt;/span&gt;quantity &lt;span style="color: blue"&gt;INT &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;) &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: green"&gt;/* &lt;br /&gt;Load Sample data&lt;br /&gt;*/ &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;INSERT INTO &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;orders &lt;span style="color: gray"&gt;(&lt;/span&gt;customer_id&lt;span style="color: gray"&gt;) &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;SELECT TOP &lt;/span&gt;5&lt;br /&gt;        AO&lt;span style="color: gray"&gt;.&lt;/span&gt;[object_id] &lt;br /&gt;    &lt;span style="color: blue"&gt;FROM &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: green"&gt;sys&lt;/span&gt;&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: green"&gt;all_objects &lt;/span&gt;&lt;span style="color: blue"&gt;AS &lt;/span&gt;AO&lt;span style="color: gray"&gt;; &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;INSERT INTO &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;order_items &lt;br /&gt;    &lt;span style="color: gray"&gt;( &lt;br /&gt;    &lt;/span&gt;order_id&lt;span style="color: gray"&gt;, &lt;br /&gt;    &lt;/span&gt;product_id&lt;span style="color: gray"&gt;, &lt;br /&gt;    &lt;/span&gt;quantity &lt;br /&gt;    &lt;span style="color: gray"&gt;) &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;SELECT &lt;br /&gt;        &lt;/span&gt;1&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;1&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;7&lt;br /&gt;    &lt;span style="color: blue"&gt;Union &lt;/span&gt;&lt;span style="color: gray"&gt;ALL&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Select&lt;br /&gt;        &lt;/span&gt;2&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;1&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;4&lt;br /&gt;    &lt;span style="color: blue"&gt;Union &lt;/span&gt;&lt;span style="color: gray"&gt;ALL&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;Select&lt;br /&gt;        &lt;/span&gt;3&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;2&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;6&lt;br /&gt;     &lt;span style="color: blue"&gt;Union &lt;/span&gt;&lt;span style="color: gray"&gt;ALL&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: blue"&gt;Select&lt;br /&gt;        &lt;/span&gt;4&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;2&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;11&lt;br /&gt;     &lt;span style="color: blue"&gt;Union &lt;/span&gt;&lt;span style="color: gray"&gt;ALL&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: blue"&gt;Select&lt;br /&gt;        &lt;/span&gt;5&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;3&lt;span style="color: gray"&gt;,&lt;br /&gt;        &lt;/span&gt;1&lt;span style="color: gray"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;&lt;font color="#000000" size="2" face="ms sans"&gt;Now we want to return all the customers who have placed an order, but we only want to return the items where the quantity is greater than 5.  Here is method 1:&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Select&lt;br /&gt;    &lt;/span&gt;O&lt;span style="color: gray"&gt;.&lt;/span&gt;customer_id&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;OI&lt;span style="color: gray"&gt;.&lt;/span&gt;order_id&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;OI&lt;span style="color: gray"&gt;.&lt;/span&gt;product_id&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;OI&lt;span style="color: gray"&gt;.&lt;/span&gt;quantity      &lt;br /&gt;&lt;span style="color: blue"&gt;From&lt;br /&gt;    &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;orders &lt;span style="color: blue"&gt;AS &lt;/span&gt;O &lt;span style="color: gray"&gt;LEFT OUTER JOIN&lt;br /&gt;    &lt;/span&gt;sales&lt;span style="color: gray"&gt;.&lt;/span&gt;order_items &lt;span style="color: blue"&gt;AS &lt;/span&gt;OI &lt;span style="color: blue"&gt;ON&lt;br /&gt;        &lt;/span&gt;O&lt;span style="color: gray"&gt;.&lt;/span&gt;order_id &lt;span style="color: gray"&gt;= &lt;/span&gt;OI&lt;span style="color: gray"&gt;.&lt;/span&gt;order_id &lt;br /&gt;&lt;span style="color: blue"&gt;Where&lt;br /&gt;    &lt;/span&gt;OI&lt;span style="color: gray"&gt;.&lt;/span&gt;quantity &lt;span style="color: gray"&gt;&amp;gt; &lt;/span&gt;5&lt;span style="color: gray"&gt;;   &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;font color="#000000" size="2" face="ms sans"&gt;This returns:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;font size="2" face="ms sans"&gt;customer_id order_id    product_id  quantity&lt;br /&gt;----------- ----------- ----------- -----------&lt;br /&gt;3           1           1           7&lt;br /&gt;7           3           2           6&lt;br /&gt;8           4           2           11&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;font size="2" face="ms sans"&gt;Hmmm, we know we have orders from five customers, but this only returns the three rows.&amp;#160; Let’s look at the execution plan:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_VI8x-nuWx9g/SsKuNzXN8UI/AAAAAAAABIQ/X9LocqQ3M9k/s1600-h/image%5B2%5D.png"&gt;&lt;font size="2" face="ms sans"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_VI8x-nuWx9g/SsKuOC26uoI/AAAAAAAABIU/lKQujFXFqwE/image_thumb.png?imgmax=800" width="244" height="82" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="2" face="ms sans"&gt;What’s that nest loops (inner join) operator?&amp;#160; Well, by putting the criteria for the RIGHT (second) table in the WHERE clause we essentially converted our LEFT OUTER JOIN to an INNER JOIN.&amp;#160; The correct way to get the data we want would be this way:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;code style="font-size: 12px"&gt;&lt;span style="color: blue"&gt;SELECT&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;O.customer_id&lt;/span&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;OI.order_id&lt;/span&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;OI.product_id&lt;/span&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;OI.quantity&lt;br /&gt;      &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;FROM&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;sales.orders &lt;/span&gt;&lt;span style="color: blue"&gt;AS &lt;/span&gt;&lt;span style="color: black"&gt;O &lt;/span&gt;&lt;span style="color: magenta"&gt;LEFT &lt;/span&gt;&lt;span style="color: gray"&gt;OUTER &lt;/span&gt;&lt;span style="color: blue"&gt;JOIN&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;sales.order_items &lt;/span&gt;&lt;span style="color: blue"&gt;AS &lt;/span&gt;&lt;span style="color: black"&gt;OI &lt;/span&gt;&lt;span style="color: blue"&gt;ON&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;O.order_id &lt;/span&gt;&lt;span style="color: blue"&gt;= &lt;/span&gt;&lt;span style="color: black"&gt;OI.order_id &lt;/span&gt;&lt;span style="color: gray"&gt;AND&lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: black"&gt;OI.quantity &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;gt; &lt;/span&gt;&lt;span style="color: black"&gt;5&lt;/span&gt;&lt;span style="color: gray"&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="2" face="ms sans"&gt;This returns what we would expect to see:&lt;/font&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;font size="2" face="ms sans"&gt;customer_id order_id    product_id  quantity&lt;br /&gt;----------- ----------- ----------- -----------&lt;br /&gt;3           1           1           7&lt;br /&gt;5           NULL        NULL        NULL&lt;br /&gt;7           3           2           6&lt;br /&gt;8           4           2           11&lt;br /&gt;17          NULL        NULL        NULL&lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;font size="2" face="ms sans"&gt;And here is the execution plan:&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_VI8x-nuWx9g/SsKuOZqrAVI/AAAAAAAABIY/xJiFlCCE9TM/s1600-h/image%5B5%5D.png"&gt;&lt;font size="2" face="ms sans"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_VI8x-nuWx9g/SsKuOg5e9jI/AAAAAAAABIc/mSkI7a1VH8o/image_thumb%5B1%5D.png?imgmax=800" width="244" height="79" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="2" face="ms sans"&gt;Where you can see the Nested Loops (left outer join) operator.&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="2" face="ms sans"&gt;So yes, it does matter where you put your criteria when dealing with OUTER JOINS.&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-1243282368339633483?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=8S-I4fVHg2c:6H7gaCpNQa8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=8S-I4fVHg2c:6H7gaCpNQa8:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=8S-I4fVHg2c:6H7gaCpNQa8:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=8S-I4fVHg2c:6H7gaCpNQa8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=8S-I4fVHg2c:6H7gaCpNQa8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=8S-I4fVHg2c:6H7gaCpNQa8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=8S-I4fVHg2c:6H7gaCpNQa8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=8S-I4fVHg2c:6H7gaCpNQa8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=8S-I4fVHg2c:6H7gaCpNQa8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=8S-I4fVHg2c:6H7gaCpNQa8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=8S-I4fVHg2c:6H7gaCpNQa8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/8S-I4fVHg2c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/1243282368339633483/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/on-vs-where.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/1243282368339633483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/1243282368339633483?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/8S-I4fVHg2c/on-vs-where.html" title="On vs. Where" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/on-vs-where.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMEQXcyeip7ImA9WxNQF00.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-3886076023320584307</id><published>2009-09-23T08:20:00.000-04:00</published><updated>2009-09-23T08:20:00.992-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-23T08:20:00.992-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Development" /><category scheme="http://www.blogger.com/atom/ns#" term="Scripts" /><category scheme="http://www.blogger.com/atom/ns#" term="Code Example" /><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Professional Development" /><title>Venturing into Powershell</title><content type="html">&lt;p&gt;As you probably know if you read my blog regularly, I recently put together a presentation called, &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/09/thanks-space-coast-sql-user-group.html" target="_blank"&gt;Dive into the Default Trace&lt;/a&gt;, and as part of that presentation I wanted to provide examples of different ways to archive the Default Trace files.&amp;#160; Here are the option I considered:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;fn_trace_gettable to load the data into a table. &lt;/li&gt;    &lt;li&gt;SSIS to archive the files. &lt;/li&gt;    &lt;li&gt;PowerShell to archive the files. &lt;/li&gt;    &lt;li&gt;xp_cmdshell and the copy command. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I immediately eliminated #4 because I don’t have xp_cmdshell enabled and because &lt;a href="http://chadwickmiller.spaces.live.com/blog/" target="_blank"&gt;Chad Miller&lt;/a&gt; (&lt;a href="http://twitter.com/cmille19" target="_blank"&gt;@cmille19&lt;/a&gt;) had said in his Powershell talk that anything that requires xp_cmdshell is a good candidate for Powershell.&amp;#160; So I sent Chad an email asking him where to start and he was kind enough to help out.&amp;#160; I got a “working” script together and sent it off to Chad for review and he kindly told me my errors (there were several) and included a modified script that cleaned up my code.&amp;#160; I did make a couple of minor modifications after receiving the script from Chad.&amp;#160; The idea and starting point were mine, even if much of the finished product is Chad’s.&amp;#160; So here’s the code (please comment if you have any improvements):&lt;/p&gt;  &lt;pre class="code"&gt;&lt;font size="1"&gt;&lt;span style="color: green"&gt;# Written with much Assistance from Chad Miller &lt;br /&gt;# (http://chadwickmiller.spaces.live.com/Blog)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;param &lt;/span&gt;&lt;span style="color: black"&gt;(&lt;/span&gt;&lt;span style="color: purple"&gt;$serverName&lt;/span&gt;&lt;/font&gt;&lt;span style="color: black"&gt;&lt;font size="1"&gt;)&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="color: green"&gt;#######################&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;function &lt;/span&gt;&lt;/font&gt;&lt;span style="color: #5f9ea0"&gt;&lt;font size="1"&gt;Get-SqlData&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;param&lt;/span&gt;&lt;span style="color: black"&gt;([&lt;/span&gt;&lt;span style="color: teal"&gt;string&lt;/span&gt;&lt;span style="color: black"&gt;]&lt;/span&gt;&lt;span style="color: purple"&gt;$serverName&lt;/span&gt;&lt;span style="color: red"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;$(&lt;/span&gt;&lt;span style="color: blue"&gt;throw &lt;/span&gt;&lt;span style="color: maroon"&gt;'serverName is required.'&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;),&lt;br /&gt;            [&lt;/span&gt;&lt;span style="color: teal"&gt;string&lt;/span&gt;&lt;span style="color: black"&gt;]&lt;/span&gt;&lt;span style="color: purple"&gt;$databaseName&lt;/span&gt;&lt;span style="color: red"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;$(&lt;/span&gt;&lt;span style="color: blue"&gt;throw &lt;/span&gt;&lt;span style="color: maroon"&gt;'databaseName is required.'&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;),&lt;br /&gt;              [&lt;/span&gt;&lt;span style="color: teal"&gt;string&lt;/span&gt;&lt;span style="color: black"&gt;]&lt;/span&gt;&lt;span style="color: purple"&gt;$query&lt;/span&gt;&lt;span style="color: red"&gt;=&lt;/span&gt;&lt;span style="color: black"&gt;$(&lt;/span&gt;&lt;span style="color: blue"&gt;throw &lt;/span&gt;&lt;span style="color: maroon"&gt;'query is required.'&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;))&lt;br /&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;Write-Verbose &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: maroon"&gt;&amp;quot;Get-SqlData serverName:$serverName &lt;br /&gt;                    databaseName:$databaseName query:$query&amp;quot;&lt;br /&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: purple"&gt;$connString &lt;/span&gt;&lt;span style="color: red"&gt;= &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: maroon"&gt;&amp;quot;Server=$serverName;Database=$databaseName;&lt;br /&gt;                    Integrated Security=SSPI;&amp;quot;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: purple"&gt;$da &lt;/span&gt;&lt;span style="color: red"&gt;= &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;New-Object &lt;/span&gt;&lt;span style="color: maroon"&gt;&amp;quot;System.Data.SqlClient.SqlDataAdapter&amp;quot; &lt;/span&gt;&lt;span style="color: black"&gt;(&lt;/span&gt;&lt;span style="color: purple"&gt;$query&lt;/span&gt;&lt;span style="color: black"&gt;,&lt;/span&gt;&lt;span style="color: purple"&gt;$connString&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;)&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: purple"&gt;$dt &lt;/span&gt;&lt;span style="color: red"&gt;= &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;New-Object &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: maroon"&gt;&amp;quot;System.Data.DataTable&amp;quot;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: black"&gt;[&lt;/span&gt;&lt;span style="color: teal"&gt;void&lt;/span&gt;&lt;span style="color: black"&gt;]&lt;/span&gt;&lt;span style="color: purple"&gt;$da&lt;/span&gt;&lt;span style="color: black"&gt;.fill(&lt;/span&gt;&lt;span style="color: purple"&gt;$dt&lt;/span&gt;&lt;/font&gt;&lt;span style="color: black"&gt;&lt;font size="1"&gt;)&lt;br /&gt;    &lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="color: purple"&gt;$dt&lt;br /&gt; &lt;br /&gt;&lt;/span&gt;&lt;span style="color: black"&gt;} &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: green"&gt;#Get-SqlData&lt;br /&gt;&lt;br /&gt;#######################&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;function &lt;/span&gt;&lt;/font&gt;&lt;span style="color: #5f9ea0"&gt;&lt;font size="1"&gt;Get-TraceInfo&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;param&lt;/span&gt;&lt;span style="color: black"&gt;(&lt;/span&gt;&lt;span style="color: purple"&gt;$serverName&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple"&gt;$qry &lt;/span&gt;&lt;span style="color: red"&gt;= &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: maroon"&gt;@&amp;quot;&lt;br /&gt;SELECT&lt;br /&gt;   RIGHT(T.path, CharIndex('\', &lt;br /&gt;   Reverse(T.path))-1) as current_file,                      &lt;br /&gt;   Substring(T.path, 1, Len(T.Path) - &lt;br /&gt;       CharIndex('\', Reverse(T.path))+ 1) as trace_path&lt;br /&gt;FROM&lt;br /&gt;    sys.traces T &lt;br /&gt;WHERE&lt;br /&gt;    T.is_default = 1&lt;br /&gt;&amp;quot;@&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;Get-SqlData &lt;/span&gt;&lt;span style="color: purple"&gt;$serverName &lt;/span&gt;&lt;span style="color: maroon"&gt;'master' &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: purple"&gt;$qry&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: black"&gt;} &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: green"&gt;#Get-TraceInfo&lt;br /&gt;&lt;br /&gt;#######################&lt;br /&gt;# MAIN&lt;br /&gt;#######################&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;&lt;span style="color: black"&gt;(&lt;/span&gt;&lt;span style="color: purple"&gt;$serverName &lt;/span&gt;&lt;span style="color: red"&gt;-eq &lt;/span&gt;&lt;span style="color: purple"&gt;$null&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: purple"&gt;$serverName &lt;/span&gt;&lt;span style="color: red"&gt;= &lt;/span&gt;&lt;/font&gt;&lt;span style="color: purple"&gt;&lt;font size="1"&gt;$env:COMPUTERNAME&lt;br /&gt;    &lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: purple"&gt;$result &lt;/span&gt;&lt;span style="color: red"&gt;= &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;Get-TraceInfo &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: purple"&gt;$serverName&lt;br /&gt;$copy_path &lt;/span&gt;&lt;span style="color: red"&gt;= &lt;/span&gt;&lt;span style="color: purple"&gt;$result&lt;/span&gt;&lt;span style="color: black"&gt;.trace_path &lt;/span&gt;&lt;span style="color: red"&gt;+ &lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: maroon"&gt;'Archive' &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;&lt;span style="color: black"&gt;((&lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;Test-Path -Path &lt;/span&gt;&lt;span style="color: purple"&gt;$copy_path&lt;/span&gt;&lt;span style="color: black"&gt;) &lt;/span&gt;&lt;span style="color: red"&gt;-eq &lt;/span&gt;&lt;span style="color: purple"&gt;$false&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;New-Item -Path &lt;/span&gt;&lt;span style="color: purple"&gt;$result&lt;/span&gt;&lt;span style="color: black"&gt;.trace_path &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;-Name &lt;/span&gt;&lt;span style="color: maroon"&gt;'Archive' &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;-ItemType &lt;/span&gt;&lt;/font&gt;&lt;span style="color: maroon"&gt;&lt;font size="1"&gt;directory&lt;br /&gt;    &lt;/font&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;Get-ChildItem -Path &lt;/span&gt;&lt;span style="color: purple"&gt;$result&lt;/span&gt;&lt;span style="color: black"&gt;.trace_path &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;-Exclude &lt;/span&gt;&lt;span style="color: purple"&gt;$result&lt;/span&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: black"&gt;.current_file | &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;where &lt;/span&gt;&lt;span style="color: black"&gt;{&lt;/span&gt;&lt;span style="color: purple"&gt;$_&lt;/span&gt;&lt;span style="color: black"&gt;.name &lt;/span&gt;&lt;span style="color: red"&gt;-like &lt;/span&gt;&lt;span style="color: maroon"&gt;&amp;quot;*.trc&amp;quot;&lt;/span&gt;&lt;span style="color: black"&gt;} | &lt;/span&gt;&lt;span style="color: #5f9ea0"&gt;Move-Item -destination &lt;/span&gt;&lt;/font&gt;&lt;span style="color: purple"&gt;&lt;font size="1"&gt;$copy_path&lt;/font&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once I knew what cmdlet’s I needed the PowerShell was probably the second easiest one to implement.&amp;#160; I know SSIS fairly well and it got a bit complex because of having to exclude the file currently in use.&amp;#160; Using fn_trace_gettable is simple because it allows me to use T-SQL which I have many years experience in.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Using PowerShell is really a matter of knowing what cmdlet’s you need, once you have that, the built in help (get-help) is very good, so you can just about do anything.&amp;#160; PowerShell is very powerful and flexible.&amp;#160; It can actually do so much that I think you need to be careful.&amp;#160; For example, the New-Item cmdlet can create just about any item depending on the ItemType you use.&amp;#160; '&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So while I definitely recommend that any DBA learn some PowerShell I also recommend being very careful and Test, Test, Test!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-3886076023320584307?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=p6jiG2Up_Zs:W41SazLg4AM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=p6jiG2Up_Zs:W41SazLg4AM:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=p6jiG2Up_Zs:W41SazLg4AM:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=p6jiG2Up_Zs:W41SazLg4AM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=p6jiG2Up_Zs:W41SazLg4AM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=p6jiG2Up_Zs:W41SazLg4AM:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=p6jiG2Up_Zs:W41SazLg4AM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=p6jiG2Up_Zs:W41SazLg4AM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=p6jiG2Up_Zs:W41SazLg4AM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=p6jiG2Up_Zs:W41SazLg4AM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=p6jiG2Up_Zs:W41SazLg4AM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/p6jiG2Up_Zs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/3886076023320584307/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/venturing-into-powershell.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/3886076023320584307?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/3886076023320584307?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/p6jiG2Up_Zs/venturing-into-powershell.html" title="Venturing into Powershell" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/venturing-into-powershell.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIEQn07cCp7ImA9WxNQFk4.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-7752139310180611485</id><published>2009-09-22T11:15:00.001-04:00</published><updated>2009-09-22T11:15:03.308-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-22T11:15:03.308-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="User Group" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Community" /><category scheme="http://www.blogger.com/atom/ns#" term="OPASS" /><title>September OPASS Meeting Recap</title><content type="html">&lt;h5&gt;&lt;/h5&gt;  &lt;p&gt;&lt;a href="http://www.opass.org" target="_blank"&gt;OPASS&lt;/a&gt; met last Tuesday, September 14th, with a mini (15 minute) presentation by Todd Holmes on Backup Basics and &lt;a href="http://sqlchicken.blogspot.com" target="_blank"&gt;Jorge Segarra&lt;/a&gt; (&lt;a href="http://twitter.com/sqlchicken" target="_blank"&gt;@SQLChicken&lt;/a&gt;) speaking on Policy Based Management in the main presentation.&amp;#160; We had&amp;#160; good crowd of about 20-25.&lt;/p&gt;  &lt;h5 align="center"&gt;Meeting Introduction&lt;/h5&gt;  &lt;p&gt;We started the meeting with some announcements and discussion of who was going to the &lt;a href="http://summit2009.sqlpass.org" target="_blank"&gt;PASS SUMMIT&lt;/a&gt;.&amp;#160; I was officially presented as co-President of OPASS and took some time to discuss the upcoming &lt;a href="http://www.sqlsaturday.com" target="_blank"&gt;SQLSaturday&lt;/a&gt; 21 – Orlando schedule as I was the one responsible for putting the schedule together.&lt;/p&gt;  &lt;p&gt;We then had about 10 minutes of networking time.&amp;#160; I spent it talking with Mark, who had come to Orlando on a contract job that had been ended and was looking for work and guidance as to where to go to get solid SQL Server training.&lt;/p&gt;  &lt;h5 align="center"&gt;Mini Presentation – Backup Basics&lt;/h5&gt;  &lt;p&gt;Todd did an okay job on his mini presentation on Backup Basics.&amp;#160; He is a first time speaker and you could tell he was a little nervous about being in front of a group.&amp;#160; He covered recovery models, backup types, and backup and restore command syntax.&amp;#160; I thought he did well to cover that much information in 15 minutes.&amp;#160; I don’t think I could have covered as much, especially with the number of questions that were asked.&lt;/p&gt;  &lt;h5 align="center"&gt;Feature Presentation – Policy Based Management&lt;/h5&gt;  &lt;p&gt;Jorge did a good job presenting on PBM.&amp;#160; This was my first exposure to it and I was impressed by what you can do with it.&amp;#160; He went over the architecture and examples of how to use it.&amp;#160; I came away convinced that any DBA in a shop with more than a couple of SQL Servers should become familiar with it and use it.&amp;#160; We did learn one thing that is a little disturbing about having an active policy in place, like requiring stored procedure names to fit a standard.&amp;#160; If you have an existing procedure that does not meet the standard and you, for whatever reason, make changes to that procedure and choose to deploy those changes using a DROP and CREATE the policy will block the rollback the CREATE, but not the DROP.&amp;#160; Here’s an example:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: green"&gt;/*&lt;br /&gt;Existing Procedure&lt;br /&gt;*/&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;CREATE PROCEDURE &lt;/span&gt;sp_getorder&lt;br /&gt;    &lt;span style="color: gray"&gt;(&lt;br /&gt;    &lt;/span&gt;@order_id &lt;span style="color: blue"&gt;INT&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;AS&lt;br /&gt;&lt;br /&gt;SET NOCOUNT ON &lt;br /&gt;&lt;br /&gt;SELECT&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;*&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;FROM&lt;br /&gt;    &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;orders&lt;br /&gt;&lt;span style="color: blue"&gt;WHERE&lt;br /&gt;    &lt;/span&gt;order_id &lt;span style="color: gray"&gt;= &lt;/span&gt;@order_id&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;RETURN&lt;/span&gt;&lt;span style="color: gray"&gt;;    &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;GO    &lt;br /&gt;&lt;/span&gt;&lt;span style="color: green"&gt;/*&lt;br /&gt;Now you create a policy that says that &lt;br /&gt;stored procedures must begin with usp_%&lt;br /&gt;*/    &lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;You realize that SELECT * is a bad practice&lt;br /&gt;so you want to change the procedure to only&lt;br /&gt;return the required columns and you do a Drop&lt;br /&gt;and Create&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;IF &lt;/span&gt;&lt;span style="color: magenta"&gt;OBJECT_ID&lt;/span&gt;&lt;span style="color: gray"&gt;(&lt;/span&gt;&lt;span style="color: red"&gt;N'dbo.sp_getorder'&lt;/span&gt;&lt;span style="color: gray"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;N'P'&lt;/span&gt;&lt;span style="color: gray"&gt;) IS NOT NULL &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;BEGIN&lt;br /&gt;        DROP PROCEDURE &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;sp_getorder &lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue"&gt;END &lt;br /&gt;&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE &lt;/span&gt;sp_getorder&lt;br /&gt;    &lt;span style="color: gray"&gt;(&lt;br /&gt;    &lt;/span&gt;@order_id &lt;span style="color: blue"&gt;INT&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: gray"&gt;)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;AS&lt;br /&gt;&lt;br /&gt;SET NOCOUNT ON &lt;br /&gt;&lt;br /&gt;SELECT&lt;br /&gt;    &lt;/span&gt;order_no&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;customer_id&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;salesperson_id&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;purchase_order_no&lt;br /&gt;&lt;span style="color: blue"&gt;FROM&lt;br /&gt;    &lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;orders&lt;br /&gt;&lt;span style="color: blue"&gt;WHERE&lt;br /&gt;    &lt;/span&gt;order_id &lt;span style="color: gray"&gt;= &lt;/span&gt;@order_id&lt;span style="color: gray"&gt;;&lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;RETURN&lt;/span&gt;&lt;span style="color: gray"&gt;;    &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The PBM violation will not allow the CREATE to take place, but will allow the DROP.&amp;#160; There may be ways to work around this, but Jorge didn’t know any off the top of his head.&amp;#160; This discussion was driven by a question from &lt;a href="http://kendalvandyke.blogspot.com/" target="_blank"&gt;Kendal Van Dyke&lt;/a&gt; (&lt;a href="http://twitter.com/sqldba" target="_blank"&gt;@SQLDDBA&lt;/a&gt;).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5 align="center"&gt;Post Meeting Discussion&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As usual we had a good post meeting discussion as Kendal, Jorge, Andy, and I stuck around for about an hour and others for about 30 minutes.&amp;#160; We talked about networking, &lt;a href="http://www.sqlpass.org" target="_blank"&gt;PASS&lt;/a&gt;, PASS Summit, and keeping up. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As always some good value in the meeting and the post meeting discussion.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-7752139310180611485?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wIl5ujmKbAY:VzCQo_1mthg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wIl5ujmKbAY:VzCQo_1mthg:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wIl5ujmKbAY:VzCQo_1mthg:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wIl5ujmKbAY:VzCQo_1mthg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wIl5ujmKbAY:VzCQo_1mthg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wIl5ujmKbAY:VzCQo_1mthg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wIl5ujmKbAY:VzCQo_1mthg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wIl5ujmKbAY:VzCQo_1mthg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wIl5ujmKbAY:VzCQo_1mthg:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=wIl5ujmKbAY:VzCQo_1mthg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=wIl5ujmKbAY:VzCQo_1mthg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/wIl5ujmKbAY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/7752139310180611485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/september-opass-meeting-recap.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/7752139310180611485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/7752139310180611485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/wIl5ujmKbAY/september-opass-meeting-recap.html" title="September OPASS Meeting Recap" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/september-opass-meeting-recap.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MGSH0zeip7ImA9WxNQEE8.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-7831489601878081740</id><published>2009-09-15T09:30:00.001-04:00</published><updated>2009-09-15T09:30:29.382-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-15T09:30:29.382-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="User Group" /><category scheme="http://www.blogger.com/atom/ns#" term="OPASS" /><title>Orlando PASS Meeting</title><content type="html">&lt;p&gt;Tonight is the &lt;a href="http://orlando.sqlpass.org" target="_blank"&gt;OPASS&lt;/a&gt; bi-monthly meeting.&amp;#160; Todd Holmes will be giving a mini presentation on SQL Server Backups and out main speaker will be &lt;a href="http://sqlchicken.com/" target="_blank"&gt;Jorge Segarra&lt;/a&gt; (&lt;a href="http://twitter.com/SQLChicken" target="_blank"&gt;@SQLChicken&lt;/a&gt;) speaking on Policy Based Management.&amp;#160; Jorge is very involved in the community as a blogger, twitterer, and speaking at local user groups and SQLSaturday’s.&amp;#160; This will be my first time hearing Jorge speak, but I am sure it will go well as Jorge is knowledgeable and engaging.&lt;/p&gt;  &lt;p&gt;Come on out.&amp;#160; Meeting starts at 6 and there is free pizza and always some type of SWAG.&amp;#160; We meet at End to End Training’s office in Altamonte Springs, FL, sorry that would be &lt;a href="http://www.sqlshare.com" target="_blank"&gt;SQLShare&lt;/a&gt;’s offices (&lt;a href="http://maps.google.com/maps?client=firefox-a&amp;amp;q=225+S+Westmonte+Dr+Ste+2010,+Altamonte+Springs,+FL+32714&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;split=0&amp;amp;gl=us&amp;amp;ei=kpavSpnfCdKOtgf2ioSUCA&amp;amp;sa=X&amp;amp;oi=geocode_result&amp;amp;ct=title&amp;amp;resnum=1" target="_blank"&gt;Map&lt;/a&gt;).&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-7831489601878081740?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=DjuPk3D79is:Y2pYOfMowq8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=DjuPk3D79is:Y2pYOfMowq8:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=DjuPk3D79is:Y2pYOfMowq8:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=DjuPk3D79is:Y2pYOfMowq8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=DjuPk3D79is:Y2pYOfMowq8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=DjuPk3D79is:Y2pYOfMowq8:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=DjuPk3D79is:Y2pYOfMowq8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=DjuPk3D79is:Y2pYOfMowq8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=DjuPk3D79is:Y2pYOfMowq8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=DjuPk3D79is:Y2pYOfMowq8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=DjuPk3D79is:Y2pYOfMowq8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/DjuPk3D79is" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/7831489601878081740/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/orlando-pass-meeting.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/7831489601878081740?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/7831489601878081740?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/DjuPk3D79is/orlando-pass-meeting.html" title="Orlando PASS Meeting" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/orlando-pass-meeting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEHQXgycSp7ImA9WxNRFko.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-5807979624581432267</id><published>2009-09-11T09:10:00.001-04:00</published><updated>2009-09-11T09:10:30.699-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-11T09:10:30.699-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="User Group" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>Thanks Space Coast SQL User Group</title><content type="html">&lt;p&gt;I want to thank the &lt;a href="http://spacecoast.sqlpass.org/" target="_blank"&gt;Space Coast User Group&lt;/a&gt; for having me over to speak on the Default Trace last night.&amp;#160; I had a great time meeting everyone and hopefully I presented some information that they all can take back to the office and use.&lt;/p&gt;  &lt;p&gt;Space Coast is a relatively new user group but they have good core and are an enthusiastic group.&amp;#160; They asked good questions and 7 out of 9 (I think there were 9 I didn’t take attendance) attendees (not counting me) went to the after meeting get together at Holiday Inn.&lt;/p&gt;  &lt;p&gt;The meeting started with some announcements and then I got to jump in and start my presentation.&amp;#160; I started by doing some marketing for &lt;a href="http://sqlsaturday.com/eventhome.aspx?eventid=32" target="_blank"&gt;SQLSaturday #21 – Orlando&lt;/a&gt; and the great &lt;a href="http://www.sqlsaturday.com/seminars.aspx?eventid=32" target="_blank"&gt;seminar series&lt;/a&gt; scheduled the week before.&amp;#160; I then asked, “Before tonight, how many people knew that there is a trace running in SQL Server 2005/2008?”&amp;#160; Once again the majority were not even aware it existed.&amp;#160; We discussed what the Default Trace is, what it traces, where it is used, how to query it, and how to archive the data.&amp;#160; I went a little longer than an hour so I’ll have to trim it a little for &lt;a href="http://www.sqlsaturday.com" target="_blank"&gt;SQLSaturday&lt;/a&gt;.&amp;#160; I’d probably grade myself a B-/B as I stumbled around as I changed applications to show code and do demos and had a couple of brain cramps.&amp;#160; I need to practice this one a few more times.&amp;#160; My slide deck and demo scripts are available &lt;a href="http://cid-d959306fcfdbac21.skydrive.live.com/self.aspx/Public/Default%20Trace.zip" target="_blank"&gt;here&lt;/a&gt; on SkyDrive and I have sent them to Bonnie Allard to post on the &lt;a href="http://spacecoast.sqlpass.org" target="_blank"&gt;Space Coast SQL User Group&lt;/a&gt; web site so watch there as well.&lt;/p&gt;  &lt;p&gt;We had some great discussions after the event about Powershell, hurricanes, software vendors, and the differences in diets around the world.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-5807979624581432267?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=PfjtSBR5QLI:MO9RhqIZTW4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=PfjtSBR5QLI:MO9RhqIZTW4:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=PfjtSBR5QLI:MO9RhqIZTW4:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=PfjtSBR5QLI:MO9RhqIZTW4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=PfjtSBR5QLI:MO9RhqIZTW4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=PfjtSBR5QLI:MO9RhqIZTW4:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=PfjtSBR5QLI:MO9RhqIZTW4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=PfjtSBR5QLI:MO9RhqIZTW4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=PfjtSBR5QLI:MO9RhqIZTW4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=PfjtSBR5QLI:MO9RhqIZTW4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=PfjtSBR5QLI:MO9RhqIZTW4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/PfjtSBR5QLI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/5807979624581432267/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/thanks-space-coast-sql-user-group.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5807979624581432267?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5807979624581432267?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/PfjtSBR5QLI/thanks-space-coast-sql-user-group.html" title="Thanks Space Coast SQL User Group" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/thanks-space-coast-sql-user-group.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAEQX84eSp7ImA9WxNRFUQ.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-5378505613840254636</id><published>2009-09-10T12:05:00.000-04:00</published><updated>2009-09-10T12:05:00.131-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-10T12:05:00.131-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SqlServerCentral" /><category scheme="http://www.blogger.com/atom/ns#" term="Database Mail" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>What happened to that email?</title><content type="html">&lt;p&gt;This question: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Created script to send mails using sp_send_dbmail- working like a charm.      &lt;br /&gt;Now searching for a way to get result code of sent mail (like Success = Recipient got it,       &lt;br /&gt;Failure = Did not get regardless of the reason).       &lt;br /&gt;I mean SP return codes 0 (success) or 1 (failure) refer to correct mail Profile, not missing Recipient, etc.       &lt;br /&gt;Frankly not sure this is possible as it looks like outside Sql Server authority/responsibility?!&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;asked in this &lt;a href="http://www.sqlservercentral.com/Forums/Topic758425-146-1.aspx" target="_blank"&gt;thread&lt;/a&gt; on &lt;a href="http://www.sqlservercentral.com" target="_blank"&gt;SQLServerCentral&lt;/a&gt; prompted me to do some research into Database Mail.&amp;#160; The result of the research is that there is no way to get this information from SQL Server. &lt;/p&gt;  &lt;p&gt;Basically the way Database Mail/sp_send_dbmail works is that the message is placed in a Service Broker queue (sp_send_dbmail returns success), the external Database Mail executable reads the queue and sends the message to the designated SMTP mail server.&amp;#160; If the mail server accepts the message then Database Mail is done and the status is set to sent.&amp;#160; So, if you have an incorrect email address or the receiving server refuses it, SQL Server has no way to know.&amp;#160; In order to find this out you would need to use a valid Reply To or From email address and monitor that mailbox.&lt;/p&gt;  &lt;p&gt;Here’s the query I use for checking Database Mail:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;SELECT&lt;br /&gt;    &lt;/span&gt;SEL&lt;span style="color: gray"&gt;.&lt;/span&gt;event_type&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SEL&lt;span style="color: gray"&gt;.&lt;/span&gt;log_date&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SEL&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: blue"&gt;description&lt;/span&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;mailitem_id&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;recipients&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;copy_recipients&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;blind_copy_recipients&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: blue"&gt;subject&lt;/span&gt;&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;body&lt;span style="color: gray"&gt;,&lt;br /&gt;&lt;/span&gt;&lt;span style="color: gray"&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;sent_status&lt;span style="color: gray"&gt;,&lt;br /&gt;    &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;sent_date&lt;span style="color: gray"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;FROM&lt;br /&gt;    &lt;/span&gt;msdb&lt;span style="color: gray"&gt;.&lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: green"&gt;sysmail_faileditems &lt;/span&gt;&lt;span style="color: blue"&gt;AS &lt;/span&gt;SF &lt;span style="color: gray"&gt;JOIN&lt;br /&gt;    &lt;/span&gt;msdb&lt;span style="color: gray"&gt;.&lt;/span&gt;dbo&lt;span style="color: gray"&gt;.&lt;/span&gt;&lt;span style="color: green"&gt;sysmail_event_log &lt;/span&gt;&lt;span style="color: blue"&gt;AS &lt;/span&gt;SEL&lt;br /&gt;        &lt;span style="color: blue"&gt;ON &lt;/span&gt;SF&lt;span style="color: gray"&gt;.&lt;/span&gt;mailitem_id &lt;span style="color: gray"&gt;= &lt;/span&gt;SEL&lt;span style="color: gray"&gt;.&lt;/span&gt;mailitem_id&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Let me know if you have any better ways to find errors for Database Mail.  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-5378505613840254636?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=Wk1qy2p8kiA:44JMgNugleY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=Wk1qy2p8kiA:44JMgNugleY:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=Wk1qy2p8kiA:44JMgNugleY:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=Wk1qy2p8kiA:44JMgNugleY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=Wk1qy2p8kiA:44JMgNugleY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=Wk1qy2p8kiA:44JMgNugleY:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=Wk1qy2p8kiA:44JMgNugleY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=Wk1qy2p8kiA:44JMgNugleY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=Wk1qy2p8kiA:44JMgNugleY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=Wk1qy2p8kiA:44JMgNugleY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=Wk1qy2p8kiA:44JMgNugleY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/Wk1qy2p8kiA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/5378505613840254636/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/what-happened-to-that-email.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5378505613840254636?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/5378505613840254636?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/Wk1qy2p8kiA/what-happened-to-that-email.html" title="What happened to that email?" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/what-happened-to-that-email.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQGQX84fyp7ImA9WxNRFUw.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-2621139784805443091</id><published>2009-09-09T12:22:00.000-04:00</published><updated>2009-09-09T12:22:00.137-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-09T12:22:00.137-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="User Group" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><category scheme="http://www.blogger.com/atom/ns#" term="PASS" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>Speaking at Space Coast User Group</title><content type="html">&lt;p&gt;I have the privilege of presenting, Dive into the Default Trace, at the &lt;a href="http://spacecoast.sqlpass.org/" target="_blank"&gt;Space Coast User Group&lt;/a&gt;, tomorrow evening (Sept. 10).&amp;#160; &lt;/p&gt;  &lt;p&gt;We’ll be discussing what the default trace is, what it collects, where' it is used, how to find it, and how to query it.&amp;#160; I have what I think are some interesting demos and hopefully information that will help developers and DBA’s better manage and audit their SQL Servers.&lt;/p&gt;  &lt;p&gt;I’m really looking forward to meeting Bonnie Allard and the rest of the group.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-2621139784805443091?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ytLccOyLKH0:gzOIU1OiBwQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ytLccOyLKH0:gzOIU1OiBwQ:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ytLccOyLKH0:gzOIU1OiBwQ:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ytLccOyLKH0:gzOIU1OiBwQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ytLccOyLKH0:gzOIU1OiBwQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ytLccOyLKH0:gzOIU1OiBwQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ytLccOyLKH0:gzOIU1OiBwQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ytLccOyLKH0:gzOIU1OiBwQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ytLccOyLKH0:gzOIU1OiBwQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=ytLccOyLKH0:gzOIU1OiBwQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=ytLccOyLKH0:gzOIU1OiBwQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/ytLccOyLKH0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/2621139784805443091/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/speaking-at-space-coast-user-group.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/2621139784805443091?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/2621139784805443091?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/ytLccOyLKH0/speaking-at-space-coast-user-group.html" title="Speaking at Space Coast User Group" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/speaking-at-space-coast-user-group.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUNRXk8eSp7ImA9WxNRE0U.&quot;"><id>tag:blogger.com,1999:blog-5106689659668378141.post-2452978958208955806</id><published>2009-09-08T00:14:00.001-04:00</published><updated>2009-09-08T00:14:54.771-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-08T00:14:54.771-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><category scheme="http://www.blogger.com/atom/ns#" term="Win7" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="UAC" /><title>Windows 7, UAC, and SQL Server</title><content type="html">&lt;p&gt;This is just a quick note, almost a continuation of my &lt;a href="http://wiseman-wiseguy.blogspot.com/2009/08/access-denied-not-possible.html" target="_blank"&gt;Access Denied, Not Possible&lt;/a&gt; post.&amp;#160; I have been working on some queries for a Default Trace presentation that I am preparing for the &lt;a href="http://spacecoast.sqlpass.org/" target="_blank"&gt;Space Coast User Group&lt;/a&gt; and &lt;a href="http://www.sqlsaturday.com/eventhome.aspx?eventid=32" target="_blank"&gt;SQLSaturday #21 – Orlando&lt;/a&gt;, and one of the queries has to do with trying to find logins that have gained access through a Windows Group.&amp;#160; Since I am working on my laptop (no domain), I decided to add the Builtin\Administrators group, delete my explicit login, and get access via the group.&amp;#160; Interestingly enough, in order to get access to SQL Server via Builtin\Administrators you need to run SSMS as Administrator.&amp;#160; Here’s the error I get when &lt;strong&gt;not&lt;/strong&gt; running SSMS as administrator:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_VI8x-nuWx9g/SqXaPG5VqHI/AAAAAAAABHo/xtRfpwlWFLo/s1600-h/SSMSLoginFail%5B5%5D.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="SSMSLoginFail" border="0" alt="SSMSLoginFail" src="http://lh3.ggpht.com/_VI8x-nuWx9g/SqXaPmMz8II/AAAAAAAABHs/wxBeL38BK6k/SSMSLoginFail_thumb%5B3%5D.jpg?imgmax=800" width="385" height="126" /&gt;&lt;/a&gt;When I did run SSMS as administrator, I was able to successfully login to my local SQL Server.&lt;/p&gt;  &lt;p&gt;No, I do not leave Builtin\Adminstrators as sysadmin on my servers and with SQL Server 2008, I do not have it at all.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5106689659668378141-2452978958208955806?l=wiseman-wiseguy.blogspot.com'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=pSNUa80-nZQ:hSnX2eEHuaE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=pSNUa80-nZQ:hSnX2eEHuaE:4cEx4HpKnUU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=pSNUa80-nZQ:hSnX2eEHuaE:4cEx4HpKnUU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=pSNUa80-nZQ:hSnX2eEHuaE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=pSNUa80-nZQ:hSnX2eEHuaE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=pSNUa80-nZQ:hSnX2eEHuaE:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=pSNUa80-nZQ:hSnX2eEHuaE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=pSNUa80-nZQ:hSnX2eEHuaE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=pSNUa80-nZQ:hSnX2eEHuaE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?a=pSNUa80-nZQ:hSnX2eEHuaE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WiseManOrWiseGuyYouDecide?i=pSNUa80-nZQ:hSnX2eEHuaE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WiseManOrWiseGuyYouDecide/~4/pSNUa80-nZQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wiseman-wiseguy.blogspot.com/feeds/2452978958208955806/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wiseman-wiseguy.blogspot.com/2009/09/windows-7-uac-and-sql-server.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/2452978958208955806?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5106689659668378141/posts/default/2452978958208955806?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WiseManOrWiseGuyYouDecide/~3/pSNUa80-nZQ/windows-7-uac-and-sql-server.html" title="Windows 7, UAC, and SQL Server" /><author><name>Jack</name><uri>http://www.blogger.com/profile/10597545408348167623</uri><email>corbett.jack@gmail.com</email><gd:extendedProperty name="OpenSocialUserId" value="15281594690292647388" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://wiseman-wiseguy.blogspot.com/2009/09/windows-7-uac-and-sql-server.html</feedburner:origLink></entry></feed>
