<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.conchango.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Claypole's World - The SQL Server Side</title><link>http://blogs.conchango.com/jamesrowlandjones/default.aspx</link><description>Concerning development of bespoke applications and database administration.</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>SQLBits III - Registration is open!!!</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/18/sqlbits-iii-registration-is-open.aspx</link><pubDate>Fri, 18 Jul 2008 13:33:13 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11905</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11905.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11905</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11905</wfw:comment><description>&lt;p&gt;This morning the guys opened up registration for SQLBits III to be held in Hatfield on 13th September.&lt;/p&gt;  &lt;p&gt;In an incredible morning there has been over 100 successful registrations on the site - that's great going over 25% full on day 1.&lt;/p&gt;  &lt;p&gt;Just to remind you all this is a free to attend day by the SQL Server community for the community.&lt;/p&gt;  &lt;p&gt;I have cut and pasted the instructions below for those of you who haven't received the email from the UK SQL Server User Group.&lt;/p&gt;  &lt;p&gt;Also open today is the session voting and the world famous &lt;a title="External link to Logo Competition" href="http://www.sqlbits.com/LogoCompetition.aspx" target="_blank"&gt;logo competition&lt;/a&gt;. So head on over to SQLBits and register!&lt;/p&gt;  &lt;p&gt;Cheers, James &lt;/p&gt;  &lt;p&gt;Dear Claypole,&lt;/p&gt;  &lt;p&gt;Registration is now open for SQLBits III. &lt;/p&gt;  &lt;p&gt;We have a staggering 63 sessions submitted for this conference far more than the previous two. Because of this and to ensure you get to see the sessions you want to see we have setup the registration process as follows&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://www.sqlbits.com/EmailImage.aspx?e=58b13fd3-7a25-475f-92d2-c99c69dff35e&amp;amp;t=EB9F1894-9D88-4638-975B-BEC8236ABF0A&amp;amp;u=information\publicsessions.aspx"&gt;Vote on your top 10 sessions &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Register for the conference&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So to register for SQLBits III get &lt;a href="http://www.sqlbits.com/EmailImage.aspx?e=58b13fd3-7a25-475f-92d2-c99c69dff35e&amp;amp;t=DF686246-08FA-4048-A2C0-DDAED9620979&amp;amp;u=information\publicsessions.aspx"&gt;voting on your top 10 sessions&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;Training Day&lt;/h6&gt;  &lt;p&gt;We have also introduced this time a training day on the Friday before. We have 4 full day seminars available for more details go to the &lt;a href="http://www.sqlbits.com/EmailImage.aspx?e=58b13fd3-7a25-475f-92d2-c99c69dff35e&amp;amp;t=7524C04C-C55C-4E4F-BF72-D12E41D68949&amp;amp;u=information\TrainingDay.aspx"&gt;training day page on the site&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;Logo Competition&lt;/h6&gt;  &lt;p&gt;And finally but not least, you may have noticed the plain logo at the top of this email. We have decided to get a new logo and asked the community to get drawing. The logos have now been submitted and can be voted on. The logo with the most 5 star votes will win an xBox 360.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sqlbits.com/EmailImage.aspx?e=58b13fd3-7a25-475f-92d2-c99c69dff35e&amp;amp;t=9B7C012F-DA29-4D6E-9064-2248D57EBC41&amp;amp;u=LogoCompeition.aspx"&gt;So get voting on your favourite logo&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That's all for now and we hope to see you soon in Hatfield. &lt;/p&gt;  &lt;p&gt;Regards    &lt;br /&gt;&lt;strong&gt;SQL Bits Organising Committee&lt;/strong&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:54cbf997-0743-457b-ae3f-cc15cbb21a65" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Community" rel="tag"&gt;Community&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQLBits" rel="tag"&gt;SQLBits&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/UK%20SQL%20Server%20User%20Group" rel="tag"&gt;UK SQL Server User Group&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11905" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQLBITS/default.aspx">SQLBITS</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/UK+SQL+Server+User+Group/default.aspx">UK SQL Server User Group</category></item><item><title>ISNULL() &lt;&gt; COALESCE(). Discuss.</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/18/isnull-lt-gt-coalesce-discuss.aspx</link><pubDate>Fri, 18 Jul 2008 09:30:58 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11899</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11899.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11899</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11899</wfw:comment><description>&lt;p&gt;Crikey.&amp;#160; That title sounds like an essay I had to write when I was at school and that was a long time ago...&lt;/p&gt;  &lt;p&gt;&lt;a title="Jamie&amp;#39;s blog" href="http://blogs.conchango.com/JamieThomson" target="_blank"&gt;Jamie Thomson&lt;/a&gt; raised an important point in a comment on a blog I posted yesterday entitled &amp;quot;&lt;a title="Previous Post" href="http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/17/getting-rid-of-getdate.aspx" target="_blank"&gt;Getting rid of getdate()&lt;/a&gt;&amp;quot;.&amp;#160; In it I stated that ISNULL() and COALESCE() are in the same boat as getdate() and CURRENT_TIMESTAMP.&amp;#160; Both COALESCE() and CURRENT_TIMESTAMP are ANSI standard functions whereas their corollary T-SQL specific functions, ISNULL() and GETDATE() are not.&amp;#160; However, Jamie pointed out that ISNULL() does have a behaviour difference to COALESCE().&amp;#160; That set me thinking as to what if any other differences there were between these two functions.&amp;#160; Guess what I found one!&lt;/p&gt;  &lt;p&gt;In &lt;a title="Link to Books Online article on COALESCE()" href="http://msdn.microsoft.com/en-us/library/ms190349.aspx" target="_blank"&gt;Books On-line&lt;/a&gt; it states a key difference between the two functions.&amp;#160; When you COALESCE() an expression the value coalesced is Nullable.&amp;#160; Whereas if you used ISNULL then the value is NOT NULL.&amp;#160; This shows up when using these functions as computed columns.&amp;#160; I have to say this isn't something I do a lot but ignorance is no excuse in the eyes of the law and so I am not going to start making excuses now (although...I think I just have)...&lt;/p&gt;  &lt;p&gt;So to take the Books On-line example:&lt;/p&gt;  &lt;div&gt;   &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;CREATE&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;TABLE&lt;/span&gt; #CheckSumTest 
(
        ID &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;identity&lt;/span&gt; ,
        Num &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;DEFAULT&lt;/span&gt; ( RAND() * 100 ) ,
        RowCheckSum &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;COALESCE&lt;/span&gt;( CHECKSUM( id , num ) , 0 )  &lt;span style="color:#0000ff;"&gt;PRIMARY&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;KEY&lt;/span&gt;
)&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Produces an error:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#ff0000"&gt;Msg 1711, Level 16, State 1, Line 1
Cannot define PRIMARY KEY constraint on column 'RowCheckSum' in table '#CheckSumTest'. The computed column has to be persisted and not nullable.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.&lt;/font&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Whereas this (note now using ISNULL()) does not:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;CREATE&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;TABLE&lt;/span&gt; #CheckSumTest 
(
        ID &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;identity&lt;/span&gt; ,
        Num &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;DEFAULT&lt;/span&gt; ( RAND() * 100 ) ,
        RowCheckSum &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; ISNULL( CHECKSUM( id , num ) , 0 )  &lt;span style="color:#0000ff;"&gt;PRIMARY&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;KEY&lt;/span&gt;
)&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;So there we have it a difference.&amp;#160; This is not the end of the story though.&amp;#160; It &lt;em&gt;is&lt;/em&gt; still possible to use COALESCE() in this scenario.&amp;#160; You need to use the PERSISTED key word. Like this:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;CREATE&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;TABLE&lt;/span&gt; #CheckSumTest
(
        ID &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;identity&lt;/span&gt; ,
        Num &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;DEFAULT&lt;/span&gt; ( RAND() * 100 ) ,
        RowCheckSum &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;COALESCE&lt;/span&gt;( CHECKSUM( id , num ) , 0 ) PERSISTED &lt;span style="color:#0000ff;"&gt;PRIMARY&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;KEY&lt;/span&gt;
)&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;So functionally it can be the same.&amp;#160; Note the clue in the error message about persistence.&amp;#160; Functionally the same result can be achieved with either function and we can still safely dispose of ISNULL(). Hoorah.&lt;/p&gt;

&lt;p&gt;This however brings me nicely onto Jamie's comment.&amp;#160; He pointed me at an article that shows an example of ISNULL() and COALESCE() producing different results.&lt;/p&gt;

&lt;p&gt;The example was:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;DECLARE&lt;/span&gt; @&lt;span style="color:#0000ff;"&gt;value&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;VARCHAR&lt;/span&gt;(2)
&lt;span style="color:#0000ff;"&gt;DECLARE&lt;/span&gt; @result1 &lt;span style="color:#0000ff;"&gt;VARCHAR&lt;/span&gt;(4)
&lt;span style="color:#0000ff;"&gt;DECLARE&lt;/span&gt; @result2 &lt;span style="color:#0000ff;"&gt;VARCHAR&lt;/span&gt;(4)

&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt; @result1 = ISNULL(@&lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;,&lt;span style="color:#006080;"&gt;'test'&lt;/span&gt;)
&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt; @result2 = &lt;span style="color:#0000ff;"&gt;COALESCE&lt;/span&gt;(@&lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;,&lt;span style="color:#006080;"&gt;'test'&lt;/span&gt;)

&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt; @result1 &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Result&lt;/span&gt;
&lt;span style="color:#0000ff;"&gt;UNION&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;ALL&lt;/span&gt; 
&lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt; @result2 &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Result&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;With the result being:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/ISNULLCOALESCE.Discuss_75D1/Result_1.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="225" alt="Result" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/ISNULLCOALESCE.Discuss_75D1/Result_thumb_1.jpg" width="198" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Yuck. That to me has all the hallmarks of being a bug! Cards on the table time. I can't see how the definition of one variable should influence the output of the ISNULL()/COALESCE().&amp;#160; To me ISNULL is broken - each value separated by the comma is isolated and the test being performed is whether the value contained within either is or isn't null. The data type shouldn't have anything to do with it and certainly shouldn't have a bearing on the overall outcome of the function.&amp;#160; This gives me greater reason to exclude the usage of ISNULL from a standards perspective. If I saw a developer actually try and 'leverage' this feature I'd ask for the code to be re-written as I expect there'd have been a better way to write the same thing. In my own mind therefore I will continue to exclude the usage of ISNULL().&lt;/p&gt;

&lt;p&gt;However, many thanks to JT for pointing this out - it's certainly a gotcha that I hadn't previously appreciated.&lt;/p&gt;

&lt;p&gt;I am off to connect now to file some &amp;quot;feedback&amp;quot; on this feature... I'll update you in due course depending on what the powers say.&lt;/p&gt;

&lt;p&gt;Cheers, James&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b8c550c4-e3fa-48a2-a6c2-82141a4aaa9a" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Database%20Development" rel="tag"&gt;Database Development&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/T-SQL" rel="tag"&gt;T-SQL&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11899" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/T-SQL/default.aspx">T-SQL</category></item><item><title>Here and Now()</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/17/here-and-now.aspx</link><pubDate>Thu, 17 Jul 2008 09:39:00 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11882</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11882.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11882</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11882</wfw:comment><description>&lt;p&gt;AAAaaaaah...Yesterday was just one of those days.&amp;#160; I was trying to do something very simple in a script task - assign the current datetime value to one of my variables - and was pulling my stubbly hair out trying to do it.&lt;/p&gt;  &lt;p&gt;I am happy to confess to not being the strongest .netter in the world but we do also in SSIS get a pretty pony script editor in which to do our work.&amp;#160; Anyways, I digress.&amp;#160; Why was I finding this so hard?&lt;/p&gt;  &lt;p&gt;Well I had written this.&lt;/p&gt;  &lt;div&gt;   &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;Dts.Variables(&lt;span style="color:#006080;"&gt;&amp;quot;myvariable&amp;quot;&lt;/span&gt;) = Now.&lt;span style="color:#0000ff;"&gt;Date&lt;/span&gt;()&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Which is fine if you just want the date.&amp;#160; I didn't I wanted the time component as well.&amp;#160; So I dutifully edited my code deleting the Date() bit to get me back to here bring up the intellisense.&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;Dts.Variables(&lt;span style="color:#006080;"&gt;&amp;quot;myvariable&amp;quot;&lt;/span&gt;) = Now.&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I scanned the drop down looking for the date time option I needed and I couldn't find it anywhere!&amp;#160; How rubbish is that!&amp;#160; I could see every other imaginable component of the date but not the full datetime.&amp;#160; My brain then did an odd thing.&lt;/p&gt;

&lt;p&gt;I thought perhaps I need to build up a string using all these properties to get to my date time.&amp;#160; That would be RUBBISH I thought but would probably get me to where I needed to be.&amp;#160; However, fortunately for me, &lt;a title="Simon&amp;#39;s Blog" href="http://sqlblogcasts.com/blogs/simons/default.aspx" target="_blank"&gt;Simon Sabin&lt;/a&gt; was online and so I asked him about my problem.&lt;/p&gt;

&lt;p&gt;&amp;quot;How about just using Now()&amp;quot; he said.&amp;#160; &amp;quot;Does that work&amp;quot; I replied. &amp;quot;I thought I needed to use a property!&amp;quot;.&amp;#160; &lt;a title="Simon&amp;#39;s Blog" href="http://sqlblogcasts.com/blogs/simons/default.aspx" target="_blank"&gt;Simon&lt;/a&gt; proceeded to wet himself laughing at my little misfortune.&lt;/p&gt;

&lt;p&gt;Sure enough I tried it and&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;Dts.Variables(&lt;span style="color:#006080;"&gt;&amp;quot;myvariable&amp;quot;&lt;/span&gt;) = Now()&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;sets the variable to the current&amp;#160; date time.&amp;#160; Magic.&amp;#160; I had completely forgotten that the rest of this stuff is an inheritance of the base object.&amp;#160; At least I assume that is what is going on.&amp;#160; At the end of the day I am very glad I have a C# fundamentals course booked in as part of my training plan.&amp;#160; Roll on SQL 2008, C# in SSIS and a dream of better editors to make up for my stunning ignorance.&lt;/p&gt;

&lt;p&gt;Cheers, James&lt;/p&gt;

&lt;p&gt;
  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:18df46b7-04f4-4581-afcd-0b467f3a30b7" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/.net" rel="tag"&gt;.net&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/database%20development" rel="tag"&gt;database development&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/sql%20server%202005" rel="tag"&gt;sql server 2005&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/sqlbits" rel="tag"&gt;sqlbits&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/ssis" rel="tag"&gt;ssis&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11882" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Getting rid of Getdate()...</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/17/getting-rid-of-getdate.aspx</link><pubDate>Thu, 17 Jul 2008 09:32:08 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11881</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11881.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11881</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11881</wfw:comment><description>&lt;p&gt;Ok I admit - I use it. Pretty much everyone I know uses it and yet I feel dirty when I do.&amp;#160; &lt;/p&gt;  &lt;p&gt;Why? Well it's not portable SQL and most certainly not ANSI standard.&amp;#160; I need to get the datetime I hear you say.&amp;#160; How do I do this without getdate()?&amp;#160; &lt;/p&gt;  &lt;p&gt;There is a perfectly good substitute in the form of CURRENT_TIMESTAMP that is ANSI standard and therefore portable.&amp;#160; It's in SQL Server and works exactly the same as getdate().&amp;#160; So why don't we all use it?&lt;/p&gt;  &lt;p&gt;Based on my personal experience, my guess is that it is longer to write and more cumbersome to say. However, I don't feel I can excuse myself when, as a result of my actions, the SQL I have written has been tightly bound to SQL Server and it needn't have been the case.&lt;/p&gt;  &lt;p&gt;I find I am much more militant about the use of ISNULL() rather than COALESCE().&amp;#160; It's the same deal.&amp;#160; COALESCE() is portable and functionally the same as ISNULL().&amp;#160; So why do so many people use ISNULL()?&amp;#160; I have no idea.&amp;#160; I always use COALESCE() but then I also prefer the word :o).&lt;/p&gt;  &lt;p&gt;I don't seriously expect the SQL Server product team to drop these functions; mainly because of the body of legacy code out there. I'd love it if they did - once I had fixed all of my code...&lt;/p&gt;  &lt;p&gt;However, I do think we should all make more effort to keep our code portable. What do you think?&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b666d554-318a-466f-8f20-fd4cc4051088" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/SQL" rel="tag"&gt;SQL&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/T-SQL" rel="tag"&gt;T-SQL&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Database%20Development" rel="tag"&gt;Database Development&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11881" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/T-SQL/default.aspx">T-SQL</category></item><item><title>SQL Server Database Recovery Model: How do you set yours?</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/15/sql-server-database-recovery-model-how-do-you-set-yours.aspx</link><pubDate>Tue, 15 Jul 2008 09:07:27 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11843</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11843.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11843</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11843</wfw:comment><description>&lt;p&gt;We had the classic situation come up on a project the other day.&amp;#160; The recovery models on the databases were set to full and yet the backup strategy didn't reflect this.&amp;#160; Needless to say, we ran out of disk space on our build server.&amp;#160; In this case the answer was to change the recovery models over to simple.&amp;#160; However, I wanted to do this quickly and painlessly. This is how I did it.&lt;/p&gt;  &lt;p&gt;First of all I confirmed that this was indeed the case by checking all the recovery models on the server.&lt;/p&gt;  &lt;div&gt;   &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;Select&lt;/span&gt;   [name]
        ,state_desc 
        ,recovery_model_desc 
&lt;span style="color:#0000ff;"&gt;From&lt;/span&gt;    sys.databases&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/RecoveryModelWhatisyourdatabasesetto_75FB/Before.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="532" alt="Before" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/RecoveryModelWhatisyourdatabasesetto_75FB/Before_thumb.jpg" width="660" border="0" /&gt;&lt;/a&gt; (Stunning graphical editing powers to protect the innocent I know. Perhaps I should be having a word with &lt;a title="Matt Bagwell&amp;#39;s blog" href="http://blogs.conchango.com/mattbagwell/" target="_blank"&gt;Matt&lt;/a&gt; and our amazing creative team... )&lt;/p&gt;

&lt;p&gt;This told me that as I suspected every database save tempdb was in the full recovery model.&amp;#160; N.B. tempdb as we all know is &amp;quot;special&amp;quot;.&amp;#160; It can only be in the simple recovery model and if you try to change it then you will get the following error.&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#ff0000"&gt;Msg 5058, Level 16, State 1, Line 1
Option 'RECOVERY' cannot be set in database 'tempdb'.&lt;/font&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;So how did I change this.&amp;#160; I needed to accomplish two things.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Change a lot of databases to the simple recovery model&lt;/li&gt;

  &lt;li&gt;Leave tempdb alone to avoid raising the error message&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I opted to use my old friend &lt;font color="#800000"&gt;sp_MSforeachdb&lt;/font&gt;&lt;font color="#000000"&gt;. &lt;font color="#800000"&gt;sp_MSforeachdb&lt;/font&gt; is not documented in Books Online so I guess it's not officially supported. However, it is extremely useful at times like this.&amp;#160; &lt;font color="#800000"&gt;Sp_MSforeachdb&lt;/font&gt; opens up an OLEDB connection to the sql server and loops through the DB's so that you can execute a statement against each one. Yes that does mean a cursor - but at least I haven't had to write all that logic.&amp;#160; However, because it does it this way you can also parameterise your script using the ?&amp;#160; as a parameter.&amp;#160; If this proc has escaped your attention up till now I am sure you will also be delighted to know that it has a little sister called &lt;/font&gt;&lt;font color="#800000"&gt;sp_MSforeachtable&lt;/font&gt;&lt;font color="#000000"&gt;.&amp;#160; I'll let you work out what that does.&amp;#160; However, there is a pretty good write up &lt;a title="Database Journal arcticle on sp_MSforeachdb and sp_MSforeachtable" href="http://www.databasejournal.com/features/mssql/article.php/3441031" target="_blank"&gt;here&lt;/a&gt; on Database Journal.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;So anyways back to the story. I was left with a script that looked like this:&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;exec&lt;/span&gt; sp_msforeachdb &lt;span style="color:#006080;"&gt;'IF '&lt;/span&gt;&lt;span style="color:#006080;"&gt;'?'&lt;/span&gt;&lt;span style="color:#006080;"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span style="color:#006080;"&gt;'tempdb'&lt;/span&gt;&lt;span style="color:#006080;"&gt;' Begin EXEC('&lt;/span&gt;&lt;span style="color:#006080;"&gt;' alter database [?] set recovery simple '&lt;/span&gt;&lt;span style="color:#006080;"&gt;') print '&lt;/span&gt;&lt;span style="color:#006080;"&gt;'?'&lt;/span&gt;&lt;span style="color:#006080;"&gt;' + '&lt;/span&gt;&lt;span style="color:#006080;"&gt;' recovery model altered '&lt;/span&gt;&lt;span style="color:#006080;"&gt;' End'&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;For the keenly observant you will notice that I have put my alter database command inside an exec statement.&amp;#160; This was due to the fact that SQL Server continued&amp;#160; to raise the error mentioned above even though I had specifically coded around the problem.&amp;#160; I will go into more detail on why this happens in another post.&lt;/p&gt;

&lt;p&gt;A quick look at sys.databases confirms that all the recovery models are now set to simple. Now all that needs to be done is for the log files to be re-sized...&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/RecoveryModelWhatisyourdatabasesetto_75FB/After.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="541" alt="After" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/RecoveryModelWhatisyourdatabasesetto_75FB/After_thumb.jpg" width="661" border="0" /&gt;&lt;/a&gt; (hey where did the blue highlighting go... oh that's not very consistent...)&lt;/p&gt;

&lt;p&gt;Cheers, James&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:462c7331-f9d2-4c49-9e2d-37e6ce8f03b0" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Database%20Administration" rel="tag"&gt;Database Administration&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQLServer" rel="tag"&gt;SQLServer&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11843" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Administration/default.aspx">Database Administration</category></item><item><title>Synchronous and Asynchronous Shopping</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/11/synchronous-and-asynchronous-shopping.aspx</link><pubDate>Fri, 11 Jul 2008 09:06:28 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11797</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11797.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11797</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11797</wfw:comment><description>&lt;p&gt;A couple of days ago I was asked to explain the difference between synchronous and asynchronous I/O.&amp;#160; This was something that I covered last year at SQLBits II in my presentation &amp;quot;&lt;a title="Link to presentation at SQLBits II " target="_blank"&gt;I/O! I/O! It's off to work we go...&lt;/a&gt;&amp;quot;. However, when I was asked again the other day I thought of a rather good analogy.&lt;/p&gt;  &lt;h3&gt;Synchronous Shopping&lt;/h3&gt;  &lt;p&gt;It's Saturday and I need to go to Waitrose.&amp;#160; I get in the car and head off to my nearest store in sunny Dartford.&amp;#160; I pick up my trolley and look at the shopping list.&amp;#160;&amp;#160; Pasta, Sauce, and mince for the bolognese.&amp;#160; No prizes for guessing what we are having for dinner (unlike the &lt;a title="Link to SQLBits logo competition" href="http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/03/want-an-xbox-360-for-free-then-enter-the-sqlbits-logo-competition.aspx" target="_blank"&gt;SQLBits logo competition&lt;/a&gt;).&amp;#160; First of all I make my way to the pasta aisle. I look at my options and select the spaghetti.&amp;#160; Secondly, I glide over to the sauces and select something wholesome and organic that still comes out of a jar (I am no Gordon Ramsay).&amp;#160; Finally, over to the meat counter to pick up some nice mince.&amp;#160; With all my products in the basket I proceed to the checkout and make my way back home.&amp;#160; This is &amp;quot;Synchronous Shopping&amp;quot;: simple, structured, sequential &amp;amp; calm.&lt;/p&gt;  &lt;h3&gt;Asynchronous Shopping&lt;/h3&gt;  &lt;p&gt;It's Saturday again and Spag bol is back on the menu and I need to get to Waitrose - with the kids. We have an argument who is going to sit in the front and who is in the back, what music will be played from which ipod.&amp;#160; With the &amp;quot;Robots in Disguise&amp;quot; blaring out of my largely defunct stereo we head off to Waitrose. We get the trolley and armed with my little helpers we enter the store.&amp;#160; &amp;quot;Lucy go and get the Pasta&amp;quot; and off she goes as I make my way over to the sweets aisle (asynchronous help isn't free). &amp;quot;Kate can you get the sauce?&amp;quot;. Finally, &amp;quot;Oliver can you &lt;em&gt;please&lt;/em&gt; pick me some mince&amp;quot;.&amp;#160; Oliver is six years old so this is more of a hope based request.&amp;#160; As I make my way round the store my helpers start to return.&amp;#160; Kate has picked something tomato-ey but with mushrooms in that is sure to delight her siblings.&amp;#160; Lucy returns next with some tagliatelle.&amp;#160; Interesting choice.&amp;#160; Finally, Oliver returns and as if by magic this coincides with my arrival in the sweetie aisle.&amp;#160; However, he has mince so all is good with the world.&amp;#160; Welcome to &amp;quot;Asynchronous Shopping&amp;quot;: complex, unstructured, non-sequential &amp;amp;&amp;#160; hectic.&amp;#160; It can however be a lot quicker than when I do it by myself.&lt;/p&gt;  &lt;h3&gt;I/O&lt;/h3&gt;  &lt;p&gt;So how does this relate back to I/O?&amp;#160; Well your asynchronous reads and writes are to your data files whilst your synchronous activity is to the transaction log.&amp;#160; Your synchronous I/O is structured and sequential.&amp;#160; It uses the standard readfile and writefile api's. This is why we put this file onto mirrored drives where the disk head can simply move in one direction.&amp;#160; Asynchronous I/O is different.&amp;#160; It uses different API's (ReadfileEx and WritefileEx).&amp;#160; It fires off requests but doesn't wait for a response before moving on.&amp;#160; When an asynchronous I/O is required the task that requested it is put into a pending state and taken off the scheduler whilst it waits for the I/O to complete. Something else is moved onto the scheduler in the meantime. Once the task is complete SQL Server is notified the operation is now runnable and can get put back onto the cpu by the scheduler when the yield for the task that has been running occurs.&lt;/p&gt;  &lt;h3&gt;Service Broker&lt;/h3&gt;  &lt;p&gt;Service broker is an asynchronous shopper.&amp;#160; However, I won't go into that now.&amp;#160; I hope that this will be one of the sessions selected for &lt;a title="link to www.sqlbits.com" href="http://www.sqlbits.com/" target="_blank"&gt;SQLBits III&lt;/a&gt; and I'll get to talk about it then.&amp;#160; The guys are getting ready to open the voting for sessions and abstracts as well as the voting for the world famous SQLBits Logo competition.&amp;#160; I will update you all when the voting goes live but expect an announcement soon.&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:809b2a89-e738-441f-a04a-c9b65ce2d0de" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/SQLBits" rel="tag"&gt;SQLBits&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQLServer%20I/O" rel="tag"&gt;SQLServer I/O&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Community" rel="tag"&gt;Community&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11797" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQLBITS/default.aspx">SQLBITS</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/I_2F00_O/default.aspx">I/O</category></item><item><title>SQL Security Patch Build is CU6+ but not quite CU7</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/10/sql-security-patch-build-is-cu6-but-not-quite-cu7.aspx</link><pubDate>Thu, 10 Jul 2008 10:40:44 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11770</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11770.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11770</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11770</wfw:comment><description>&lt;p&gt;So as suspected when I installed the new Security patch released by Microsoft for SQL 2005 sp2 that I mentioned &lt;a title="SQL Security Patch blog post" href="http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/10/sql-server-and-windows-security-patch-posted.aspx" target="_blank"&gt;this morning&lt;/a&gt; my build number has indeed shot up to 3233.&amp;#160; &lt;/p&gt;  &lt;p&gt;This places me somewhere between CU6 and CU7. Build 9.00.3228 was CU6 and 9.00.3239 is CU7.&lt;/p&gt;  &lt;p&gt;So just bear in mind that when you plop on your patch you are actually taking a number of other fixes through with you. Test...Test... Test...&lt;/p&gt;  &lt;p&gt;If you are interested in seeing what published builds are out there I know of no better resource than &lt;a title="SQLSecurity Site" href="http://www.sqlsecurity.com/" target="_blank"&gt;sqlsecurity.com&lt;/a&gt;'s version database which you can find &lt;a title="SQL Security Version Database" href="http://www.sqlsecurity.com/FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Cheers, JRJ&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:11986cff-1947-484c-ac4c-64c85b6253ba" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Security" rel="tag"&gt;Security&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202005" rel="tag"&gt;SQL Server 2005&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Sp2" rel="tag"&gt;Sp2&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11770" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/sp2/default.aspx">sp2</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Security/default.aspx">Security</category></item><item><title>SQL Server and Windows Security patch posted</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/10/sql-server-and-windows-security-patch-posted.aspx</link><pubDate>Thu, 10 Jul 2008 08:33:40 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11761</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11761.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11761</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11761</wfw:comment><description>&lt;p&gt;And so the great run comes to an end...&lt;/p&gt;  &lt;p&gt;For the full details of this incident please click &lt;a title="Link to Microsoft Site explaining the issue in full" href="http://www.microsoft.com/technet/security/bulletin/MS08-040.mspx" target="_blank"&gt;here&lt;/a&gt;. N.B. This also affects Windows. However this is released under a different KB article.&lt;/p&gt;  &lt;p&gt;For the SQL 2005 sp2 KB article look at this link &lt;a title="Microsoft Knowledge Base Article 948108" href="http://support.microsoft.com/kb/948108"&gt;http://support.microsoft.com/kb/948108&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For SQL 2000 GDR and MSDE 2000 KB article look at this one &lt;a title="http://support.microsoft.com/?kbid=948110" href="http://support.microsoft.com/?kbid=948110"&gt;http://support.microsoft.com/?kbid=948110&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If the Windows article is what you are after click here &lt;a title="http://support.microsoft.com/?kbid=948109" href="http://support.microsoft.com/?kbid=948109"&gt;http://support.microsoft.com/?kbid=948109&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The post-sp2 security patch popped up on my radar via my Automatic Updates (I knew there was a reason I looked at the Advanced Custom Settings first)...&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/SQLServer2005SecurityPatchposted_74C7/Auto%20Update.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="378" alt="Auto Update" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/SQLServer2005SecurityPatchposted_74C7/Auto%20Update_thumb.jpg" width="531" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It applies to pretty much all versions of SQL 2005 with sp2 installed.&amp;#160; What a dog's breakfast sp2 was. It looks like it takes the build number up to 3233.&amp;#160; However, as I have mentioned this also affects &lt;/p&gt;  &lt;p&gt;The situation with windows is also interesting.&amp;#160; The component affected in Windows is MSDE for windows 2000 and 2003 on 32 bit.&amp;#160; However, for those running the WYUKON Windows Internal Database component in Windows 2003 or if you are on the bleeding edge on Windows 2008 then you are also impacted.&lt;/p&gt;  &lt;p&gt;Windows 2008 is particularly interesting.&amp;#160; The article states that the &amp;quot;Server Core Installation (...is...) affected. ... This applies...whether or not Windows Server 2008 was installed using the Server Core installation option.&amp;quot;&lt;/p&gt;  &lt;p&gt;If you'd like to know more about Server Core then here is a &lt;a title="link to article on MSDN about Server Core" href="http://msdn.microsoft.com/en-us/library/ms723891(VS.85).aspx"&gt;link&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;There are also some known issues with the installs but these are covered in the link above.&lt;/p&gt;  &lt;p&gt;Those links again:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/948108" href="http://support.microsoft.com/kb/948108"&gt;http://support.microsoft.com/kb/948108&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/?kbid=948110" href="http://support.microsoft.com/?kbid=948110"&gt;http://support.microsoft.com/?kbid=948110&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/?kbid=948109" href="http://support.microsoft.com/?kbid=948109"&gt;http://support.microsoft.com/?kbid=948109&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;It has been a great run for SQL Server and Microsoft on the security side of the equation.&amp;#160; Slammer taught Microsoft an invaluable lesson and it is a testament to the team that ever since that horrific week of callout when we all went patch-tastic there has been a dearth of security based issues especially in the server products.&amp;#160; However, I fear the counter now has to be reset pretty much across the board for Windows and SQL Server.&amp;#160; Let's hope we have to wait as long for the next one.&lt;/p&gt;  &lt;p&gt;Cheers, JRJ&lt;/p&gt;  &lt;p&gt;   &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:16ea8ebe-3fec-41ea-b574-d248d6b0c299" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Windows%202008" rel="tag"&gt;Windows 2008&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Windows%202003" rel="tag"&gt;Windows 2003&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Windows%202000" rel="tag"&gt;Windows 2000&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202000" rel="tag"&gt;SQL Server 2000&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202005" rel="tag"&gt;SQL Server 2005&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202005%20sp2" rel="tag"&gt;SQL Server 2005 sp2&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Security" rel="tag"&gt;Security&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11761" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/sp2/default.aspx">sp2</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Security/default.aspx">Security</category></item><item><title>Resources for Spatial Data in SQL Server 2008</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/09/resources-for-spatial-data-in-sql-server-2008.aspx</link><pubDate>Wed, 09 Jul 2008 08:14:19 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11742</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11742.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11742</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11742</wfw:comment><description>&lt;p&gt;As you may be aware we recently hosted a meeting of the &lt;a title="UK SQL Server User Group Site" href="http://www.sqlserverfaq.com" target="_blank"&gt;UK SQL Server User Group&lt;/a&gt; featuring &lt;a title="Michael&amp;#39;s blog" href="http://sqlblog.com/blogs/michael_rys/default.aspx" target="_blank"&gt;Michael Rys&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;For those of you who weren't able to jot down the resources he mentioned in his presentation I have copied and pasted them in below. Thanks to Michael for posting them through - I didn't have time either! :o)&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Spatial Site: .     &lt;br /&gt;&lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx"&gt;http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx&lt;/a&gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Forum:      &lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1629&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1629&amp;amp;SiteID=1&lt;/a&gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Weblogs:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.msdn.com/isaac"&gt;http://blogs.msdn.com/isaac&lt;/a&gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.msdn.com/edkatibah"&gt;http://blogs.msdn.com/edkatibah&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:476f4029-a945-4594-9240-54718e1bccc6" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Community" rel="tag"&gt;Community&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Spatial%20Data" rel="tag"&gt;Spatial Data&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/UK%20SQL%20Server%20User%20Group" rel="tag"&gt;UK SQL Server User Group&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11742" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/UK+SQL+Server+User+Group/default.aspx">UK SQL Server User Group</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Spatial+Data/default.aspx">Spatial Data</category></item><item><title>VISIO 2007 add-in for SQL Server Infrastructure Diagrams</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/09/visio-2007-add-in-for-sql-server-infrastructure-diagrams.aspx</link><pubDate>Tue, 08 Jul 2008 23:33:06 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11738</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11738.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11738</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11738</wfw:comment><description>&lt;p&gt;Here's a little freebie from Microsoft for those of you who have the job of drawing out infrastructure diagrams of SQL Server farms. Ok that already sounds like a pretty niche market.&amp;#160; How about here's a little freebie from Microsoft for those of you that should have diagrams of your SQL Server Infrastructure &lt;em&gt;but don't have the time...&lt;/em&gt; Ah yes. That old chestnut.&amp;#160; Well help is at hand in the form of a (relatively) new add-in to Visio 2007 that is free download from the mighty M$ &lt;a title="Visio Add-in for SQL Server" href="http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=779561DE-C704-4584-80AC-7E4348C927C0&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;To cut a fairly dull story short basically there is a read-me in the download that will tell you all your pre-requisites (.net 2.0 and some dlls that I just hope are installed when I installed visio) and also give a pretty thorough overview of the tool and how to use it.&lt;/p&gt;  &lt;p&gt;However, to show you how easy it is to use here is my not so thorough version.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 1: Fire up Visio Start/All Programs/...&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;lt;No Picture for this&amp;gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2: Look to the top!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%202.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="364" alt="Step 2" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%202_thumb.jpg" width="1126" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 3: Go Configure&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;lt;No Picture for this either&amp;gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 4: A Wizard! Shock ... Horror&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%204.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="452" alt="Step 4" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%204_thumb.jpg" width="618" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Clicking &lt;u&gt;N&lt;/u&gt;ext about now would be a good thing&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 5: Your Servers .. Count em&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%205.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="446" alt="Step 5" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%205_thumb.jpg" width="609" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Think of a number...&lt;/p&gt;  &lt;p&gt;Again &lt;u&gt;N&lt;/u&gt;ext is recommended at this point&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 6: Things start to get interesting&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%206.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="449" alt="Step 6" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%206_thumb.jpg" width="615" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Pick your Server (Slightly ropey ordering I have to say)&lt;/li&gt;    &lt;li&gt;Identify your SQL Server Version (Oh it's already got SQL Server 2008... nice touch)&lt;/li&gt;    &lt;li&gt;OS is next... Windows 2008 I think (and now things don't look so clever) Beta 3?&amp;#160; We've RTM'ed here luv.&lt;/li&gt;    &lt;li&gt;Finally SQL Edition. Oh dear Developer Edition only. I have had a play about here with these settings and I can't get it off developer edition in this drop down for SQL 2008.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Then you Click Save and do it for the next server.&amp;#160; You'll get asked if you really meant that in a Vista stylee but hey ho that's the way of the world nowadays.&lt;/p&gt;  &lt;p&gt;N.B. A few little pecularities emerge.&lt;/p&gt;  &lt;p&gt;If you want to select a cluster be very sure to select at least two servers before progressing to select sql server versions. If you fail to do this you will not be able to select the &amp;quot;Enable Clusters for SQL Servers&amp;quot; check box that I have cunningly hidden with my drop down for Step 6.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 6a the clustering checkbox revealed....&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%206a.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="448" alt="Step 6a" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%206a_thumb.jpg" width="612" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Ooo look at that! Nodes a plenty and storage options too..&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 7 Repeat until complete&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;No Picture just keep going until you are allowed to hit next&amp;gt;&lt;/p&gt;  &lt;p&gt;Then hit &lt;u&gt;N&lt;/u&gt;ext &amp;gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 8 Time for the Summary&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%208.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="450" alt="Step 8" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%208_thumb.jpg" width="615" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A screen that performs next to no real purpose other than showing off my affinity for Enterprise Edition.&amp;#160; I guess you could delete records but after spending that time putting in all that info why ever would you want to do that...&lt;/p&gt;  &lt;p&gt;Click &lt;u&gt;N&lt;/u&gt;ext &amp;gt; (Please let it end)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 9 Sweet Relief&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%209.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="451" alt="Step 9" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%209_thumb.jpg" width="617" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visio is finally doing some work and we are about to see the fruits of our labour...&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 10 We must be there now!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%2010.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="457" alt="Step 10" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%2010_thumb.jpg" width="627" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Sadly not. Unfortunately, I require a screen to tell me that Visio hasn't crashed.&lt;/p&gt;  &lt;p&gt;Out of morbid curiosity I press close&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 11 The Reveal&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%2011.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="746" alt="Step 11" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/VISIO2007addinforSQLServerInfrastructure_141BC/Step%2011_thumb.jpg" width="1050" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And there you have it. In only 11 easy steps...&lt;/p&gt;  &lt;p&gt;Notice that by clicking on a shape and looking at the shape data out pops all that metadata we spent ages adding in.&amp;#160; The good news is that this data is totally amendable so I can RTM my windows 2008 server which my clients will be pleased about.&lt;/p&gt;  &lt;p&gt;Anyways if you fancy a play you can always download a copy yourself.&amp;#160; It is better than nothing I wouldn't say by much but it is an albeit small step in making Visio useful to a much wider audience.&amp;#160; I find only Microsoft Project to be more unwieldy than Visio.&amp;#160; Perhaps that's just me... &lt;/p&gt;  &lt;p&gt;Visio needs shapes and addin's like this in my view that anyone can download and install. The frustrating thing I find is that it could be such a useful tool - but often it just winds me up.&lt;/p&gt;  &lt;p&gt;It would also be a lot more useful if it was updated to have all the latest and greatest Server OS and SQL Server combinations. Given how new this download is I'd say it's a shame that it's content is already out of date.&lt;/p&gt;  &lt;p&gt;Cheers, JRJ&lt;/p&gt;  &lt;p&gt;Link:&lt;/p&gt;  &lt;p&gt;The software : &lt;a title="http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=779561DE-C704-4584-80AC-7E4348C927C0&amp;amp;displaylang=en" href="http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=779561DE-C704-4584-80AC-7E4348C927C0&amp;amp;displaylang=en"&gt;http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=779561DE-C704-4584-80AC-7E4348C927C0&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:10cb0995-235a-40a3-ad07-edbb88aaf989" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Visio%202007" rel="tag"&gt;Visio 2007&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Database%20Administration" rel="tag"&gt;Database Administration&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11738" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Administration/default.aspx">Database Administration</category></item><item><title>Using a Bitmask - a practical example</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/04/using-a-bitmask-a-practical-example.aspx</link><pubDate>Fri, 04 Jul 2008 22:28:51 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11686</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11686.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11686</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11686</wfw:comment><description>&lt;p&gt;A colleague of mine asked for a simple example to get him up and running with the basics of bitmasking.&amp;#160; Since I had gone to the effort to create the example I thought I might as well blog it :o).&lt;/p&gt;  &lt;p&gt;This example uses the logical AND operator &amp;amp;.&lt;/p&gt;  &lt;p&gt;First of all you need to define your table..&lt;/p&gt;  &lt;div&gt;   &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;create&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;table&lt;/span&gt; BitmaskDemo
(ID &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Primary&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;key&lt;/span&gt;
,Supermarket &lt;span style="color:#0000ff;"&gt;varchar&lt;/span&gt;(10)
,bitmask varbinary(1000)
)&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;and then secondly assign a numeric value to your data values.&amp;#160; I have used numbers in the power of 2 in this example.&amp;#160; This ensures that every value gets assigned a unique number and that the sum of these numbers will always generate a unique combination.&amp;#160; So bananas and oranges = 5. &lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#008000"&gt;/*
&lt;span style="color:#0000ff;"&gt;values&lt;/span&gt;
1 = Banana              00000001
2 = Strawberries        00000010
4 = Oranges             00000100
8 = Apples              00001000
16 = plums              00010000
32 = pineapple          00100000
*/&lt;/font&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;We are now ready to populate the table with some data&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;Insert &lt;span style="color:#0000ff;"&gt;into&lt;/span&gt; Bitmaskdemo
&lt;span style="color:#0000ff;"&gt;values&lt;/span&gt; (1,&lt;span style="color:#006080;"&gt;'Tesco'&lt;/span&gt;,7) &lt;span style="color:#008000;"&gt;-- Bananas,strawberries &amp;amp; oranges 00000111&lt;/span&gt;
Insert &lt;span style="color:#0000ff;"&gt;into&lt;/span&gt; Bitmaskdemo
&lt;span style="color:#0000ff;"&gt;values&lt;/span&gt; (2,&lt;span style="color:#006080;"&gt;'Sainsburys'&lt;/span&gt;,31) &lt;span style="color:#008000;"&gt;-- Bananas, strawberries, oranges, apples &amp;amp; plums 00011111&lt;/span&gt;
Insert &lt;span style="color:#0000ff;"&gt;into&lt;/span&gt; Bitmaskdemo
&lt;span style="color:#0000ff;"&gt;values&lt;/span&gt; (3,&lt;span style="color:#006080;"&gt;'Morrissons'&lt;/span&gt;,8) &lt;span style="color:#008000;"&gt;-- Apples 00001000&lt;/span&gt;
Insert &lt;span style="color:#0000ff;"&gt;into&lt;/span&gt; Bitmaskdemo
&lt;span style="color:#0000ff;"&gt;values&lt;/span&gt; (4,&lt;span style="color:#006080;"&gt;'Waitrose'&lt;/span&gt;,24) &lt;span style="color:#008000;"&gt;-- Apples and plums 00011000&lt;/span&gt;
Insert &lt;span style="color:#0000ff;"&gt;into&lt;/span&gt; BitmaskDemo
&lt;span style="color:#0000ff;"&gt;values&lt;/span&gt; (5,&lt;span style="color:#006080;"&gt;'Aldi'&lt;/span&gt;,25) &lt;span style="color:#008000;"&gt;-- Bananas, Apples and Plums 00011001&lt;/span&gt;
Insert &lt;span style="color:#0000ff;"&gt;into&lt;/span&gt; BitmaskDemo
&lt;span style="color:#0000ff;"&gt;values&lt;/span&gt; (6,&lt;span style="color:#006080;"&gt;'Somerfield'&lt;/span&gt;,9) &lt;span style="color:#008000;"&gt;-- Bananas &amp;amp; Apples 00001001&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Finally we can now ask some questions&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#008000"&gt;/* Who sells strawberries */&lt;/font&gt;
&lt;span style="color:#0000ff;"&gt;Select&lt;/span&gt; *
&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; BitmaskDemo
&lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; Bitmask &amp;amp; 2 = 2&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%201_1.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="103" alt="Bitmask Demo Result 1" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%201_thumb_1.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#008000"&gt;/* Who sells Bananas &amp;amp; Plums */&lt;/font&gt;
&lt;span style="color:#0000ff;"&gt;Select&lt;/span&gt; *
&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; BitmaskDemo
&lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; Bitmask &amp;amp; 17 = 17&lt;/pre&gt;
  &lt;font color="#008000"&gt;&lt;/font&gt;&lt;/div&gt;

&lt;p&gt;&lt;font color="#008000"&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%202_1.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="102" alt="Bitmask Demo Result 2" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%202_thumb_1.jpg" width="244" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#008000"&gt;/* Who sells Bananas &amp;amp; Plums */&lt;/font&gt;
&lt;span style="color:#0000ff;"&gt;Select&lt;/span&gt; *
&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; BitmaskDemo
&lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; Bitmask &amp;amp; 17 = 17&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%203.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="169" alt="Bitmask Demo Result 3" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%203_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#008000"&gt;/* Who doesn't sell bananas  */ &lt;/font&gt;
&lt;span style="color:#0000ff;"&gt;Select&lt;/span&gt; * 
&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; BitmaskDemo 
&lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; Bitmask &amp;amp; 1 &amp;lt;&amp;gt; 1 &lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%204_1.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="101" alt="Bitmask Demo Result 4" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%204_thumb_1.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#008000"&gt;/* Who Sells Bananas &lt;span style="color:#0000ff;"&gt;or&lt;/span&gt; Pineapples */&lt;/font&gt; 
&lt;span style="color:#0000ff;"&gt;select&lt;/span&gt; * 
&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; BitmaskDemo 
&lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; bitmask &amp;amp; 33 = 1 
&lt;span style="color:#0000ff;"&gt;OR&lt;/span&gt; bitmask &amp;amp; 33 = 32 &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%205.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="145" alt="Bitmask Demo Result 5" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%205_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;font color="#008000"&gt;/* Who Sells Apples but does &lt;span style="color:#0000ff;"&gt;not&lt;/span&gt; sell plums */ 
&lt;/font&gt;&lt;span style="color:#0000ff;"&gt;select&lt;/span&gt; * 
&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt; BitmaskDemo 
&lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; bitmask &amp;amp; 24 = 8 
&lt;span style="color:#0000ff;"&gt;AND&lt;/span&gt; bitmask &amp;amp; 24 &amp;lt;&amp;gt; 24 &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%206.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="103" alt="Bitmask Demo Result 6" src="http://blogs.conchango.com/blogs/jamesrowlandjones/WindowsLiveWriter/UsingaBitmaskapracticalexample_1382F/Bitmask%20Demo%20Result%206_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope this helps anyone else trying to get their head round bitmasking!&amp;#160; If there are any other amendments or suggestions that people want to make.&lt;/p&gt;

&lt;p&gt;Cheers, JRJ &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:40b0d355-ac0f-4297-a27e-c97196691334" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Database%20Development" rel="tag"&gt;Database Development&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL" rel="tag"&gt;SQL&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/T-SQL" rel="tag"&gt;T-SQL&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Bitmask" rel="tag"&gt;Bitmask&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11686" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/T-SQL/default.aspx">T-SQL</category></item><item><title>SQLBits III Session Submissions Deadline Update</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/04/sqlbits-iii-session-submissions-deadline-update.aspx</link><pubDate>Fri, 04 Jul 2008 20:40:18 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11681</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11681.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11681</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11681</wfw:comment><description>&lt;p&gt;In an earlier &lt;a title="Earlier post on SQLBits session submission" href="http://blogs.conchango.com/jamesrowlandjones/archive/2008/06/24/sqlbits-iii-session-submission-is-open.aspx" target="_blank"&gt;post&lt;/a&gt; I mentioned that the 4th July had been set as the deadline for submission of session abstracts.&amp;#160; This deadline has now been extended till July 11th as there are still a number of people who we are waiting to hear from.&amp;#160; For those of you still mulling over your session submissions you now have exactly a week to get your thoughts together, take the plunge and put your hat in the ring (can't think of any more cliche's right now) for SQLBits III.&lt;/p&gt;  &lt;p&gt;I presented at SQLBits II and I have to say I thoroughly enjoyed the experience.&amp;#160; If you are interested but are nervous / unsure or would like to talk to me about it first then please feel free to drop me a &lt;a title="My Contact form" href="http://blogs.conchango.com/jamesrowlandjones/contact.aspx" target="_blank"&gt;note&lt;/a&gt;.&amp;#160; I'd be more than happy to share my experiences with you and help get you started if you are feeling a bit nervous about taking your maiden voyage (found one last one to end with :o)).&lt;/p&gt;  &lt;p&gt;Cheers, JRJ&amp;#160; &lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a02bac5d-4589-468b-9686-4a967f900cc1" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Community" rel="tag"&gt;Community&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQLBits" rel="tag"&gt;SQLBits&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/UK%20SQL%20Server%20User%20Group" rel="tag"&gt;UK SQL Server User Group&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11681" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQLBITS/default.aspx">SQLBITS</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/UK+SQL+Server+User+Group/default.aspx">UK SQL Server User Group</category></item><item><title>Spatial Data Eye Candy</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/04/spatial-data-eye-candy.aspx</link><pubDate>Fri, 04 Jul 2008 08:40:51 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11673</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11673.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11673</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11673</wfw:comment><description>&lt;p&gt;In an earlier &lt;a title="previous post about spatial data presentation with Michael Rys" href="http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/03/conchango-hosts-uk-sql-server-user-group-with-michael-rys.aspx" target="_blank"&gt;post&lt;/a&gt; I mentioned the new visualisation functionality for spatial data.&amp;#160; &lt;a title="Michael&amp;#39;s blog" href="http://sqlblog.com/blogs/michael_rys/default.aspx" target="_blank"&gt;Michael Rys&lt;/a&gt; kindly pointed me in the direction of Isaac's &lt;a title="Isaac&amp;#39;s blog" href="http://blogs.msdn.com/isaac/default.aspx" target="_blank"&gt;blog&lt;/a&gt; that has some pictures of the new &amp;quot;Spatial Data&amp;quot; tab and resulting visualisation.&amp;#160; As confirmed in the comments below the blog this is using some of the Dundas controls that Microsoft recently procured.&lt;/p&gt;  &lt;p&gt;So if you haven't seen them yet - check out this &lt;a title="Isaac&amp;#39;s post on the spatial data viewer" href="http://blogs.msdn.com/isaac/archive/2008/06/02/eye-candy-of-the-highest-order.aspx" target="_blank"&gt;post&lt;/a&gt; from Isaac.&lt;/p&gt;  &lt;p&gt;Nice work guys.&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1d922f88-a86f-4962-a259-bf89b9670dcb" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Michael%20Rys" rel="tag"&gt;Michael Rys&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Spatial%20Data" rel="tag"&gt;Spatial Data&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server%202008" rel="tag"&gt;SQL Server 2008&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Database%20Development" rel="tag"&gt;Database Development&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11673" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Spatial+Data/default.aspx">Spatial Data</category></item><item><title>Want an XBOX 360 for free? Then enter the SQLBits Logo Competition...</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/03/want-an-xbox-360-for-free-then-enter-the-sqlbits-logo-competition.aspx</link><pubDate>Thu, 03 Jul 2008 17:35:32 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11661</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11661.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11661</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11661</wfw:comment><description>&lt;p&gt;That's right! The prize for coming up with the winning logo for SQLBits is an XBOX 360! Not only do you get the console but also the satisfaction of seeing your logo emblazoned across the internet and also (hopefully) sunny Hertfordshire on 13th September when SQLBits III rolls into town...&lt;/p&gt;  &lt;p&gt;It get's better.&amp;#160; At the moment there are less than 10 logos in the competition.&amp;#160; So that's a 1 in 10 chance of walking away with the juice.&amp;#160; Not even Betfair has those odds... &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What are you waiting for?&lt;/strong&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.sqlbits.com/LogoCompetition.aspx" href="http://www.sqlbits.com/LogoCompetition.aspx"&gt;http://www.sqlbits.com/LogoCompetition.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;   &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d6348756-9fcb-4af3-a637-4ead86482727" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/competition" rel="tag"&gt;competition&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQLBits" rel="tag"&gt;SQLBits&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Community" rel="tag"&gt;Community&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/UK%20SQL%20Server%20User%20Group" rel="tag"&gt;UK SQL Server User Group&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11661" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQLBITS/default.aspx">SQLBITS</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/UK+SQL+Server+User+Group/default.aspx">UK SQL Server User Group</category></item><item><title>T-SQL IDENTITY : Fun and Games with DBCC CHECKIDENT</title><link>http://blogs.conchango.com/jamesrowlandjones/archive/2008/07/03/t-sql-identity-fun-and-games-with-dbcc-checkident.aspx</link><pubDate>Thu, 03 Jul 2008 17:26:59 GMT</pubDate><guid isPermaLink="false">e847c0e7-38d9-45c0-b593-56747303e088:11658</guid><dc:creator>James.Rowland-Jones</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.conchango.com/jamesrowlandjones/comments/11658.aspx</comments><wfw:commentRss>http://blogs.conchango.com/jamesrowlandjones/commentrss.aspx?PostID=11658</wfw:commentRss><wfw:comment>http://blogs.conchango.com/jamesrowlandjones/rsscomments.aspx?PostID=11658</wfw:comment><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This issue caught me out today whilst putting together some build scripts for reference data. So I thought I&amp;#8217;d share it.&lt;/p&gt;  &lt;p&gt;USE [tempdb]&lt;/p&gt;  &lt;p&gt;GO&lt;/p&gt;  &lt;p&gt;CREATE TABLE [dbo].[Table_1](&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Col1] [int] IDENTITY(1,1) NOT NULL,&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Col2] [char](1) NOT NULL&lt;/p&gt;  &lt;p&gt;) ON [PRIMARY]&lt;/p&gt;  &lt;p&gt;GO&lt;/p&gt;  &lt;p&gt;delete from dbo.table_1&lt;/p&gt;  &lt;p&gt;dbcc checkident(Table_1,Reseed,0)&lt;/p&gt;  &lt;p&gt;insert into table_1&lt;/p&gt;  &lt;p&gt;values('1')&lt;/p&gt;  &lt;p&gt;--Checking identity information: current identity value 'NULL', current column value '0'.&lt;/p&gt;  &lt;p&gt;--DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;/p&gt;  &lt;p&gt;Select * from table_1&lt;/p&gt;  &lt;p&gt;Basically when you first create a table with an identity column the value of the identity prior to inserting any data is NULL and not 0.&amp;#160; &lt;/p&gt;  &lt;p&gt;Therefore the first DBCC CHECKIDENT does not behave as expected.&amp;#160; &lt;/p&gt;  &lt;p&gt;The first row you write has an identity value of 0 and not 1.&amp;#160; &lt;/p&gt;  &lt;p&gt;Now Run it again and the problem magically disappears&amp;#8230;(the helpful messages in green didn&amp;#8217;t come out in the build scripts &amp;#8211; at least I didn&amp;#8217;t see them.)&lt;/p&gt;  &lt;p&gt;delete from dbo.table_1&lt;/p&gt;  &lt;p&gt;dbcc checkident(Table_1,Reseed,0)&lt;/p&gt;  &lt;p&gt;insert into table_1&lt;/p&gt;  &lt;p&gt;values('1')&lt;/p&gt;  &lt;p&gt;--Checking identity information: current identity value '0', current column value '0'.&lt;/p&gt;  &lt;p&gt;--DBCC execution completed. If DBCC printed error messages, contact your system administrator.&lt;/p&gt;  &lt;p&gt;Select * from table_1&lt;/p&gt;  &lt;p&gt;drop table dbo.table_1&lt;/p&gt;  &lt;p&gt;I should also point out that I was using Database Edition and this code was in my post-deployment script. I therefore didn't see the messages as it was all executed in msbuild. What was even more interesting was that the build scripts carried on regardless even though as a result of my bug a foreign key violation occurred. More on that in another post methinks...&lt;/p&gt;  &lt;p&gt;Cheers, James&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:510f93ef-a37b-4325-8e1b-658fbd1d321f" style="padding-right:0px;display:inline;padding-left:0px;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/T-SQL" rel="tag"&gt;T-SQL&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server" rel="tag"&gt;SQL Server&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/SQL%20Server2005" rel="tag"&gt;SQL Server2005&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/DBCC%20CHECKIDENT" rel="tag"&gt;DBCC CHECKIDENT&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Database%20Development" rel="tag"&gt;Database Development&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Database%20Edition" rel="tag"&gt;Database Edition&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Data%20Dude" rel="tag"&gt;Data Dude&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.conchango.com/aggbug.aspx?PostID=11658" width="1" height="1"&gt;</description><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Development/default.aspx">Database Development</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Team+Edition+for+Database+Professionals/default.aspx">Team Edition for Database Professionals</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Datadude/default.aspx">Datadude</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/Database+Edition/default.aspx">Database Edition</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.conchango.com/jamesrowlandjones/archive/tags/T-SQL/default.aspx">T-SQL</category></item></channel></rss>