<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5892883484418619512</id><updated>2011-11-27T18:17:26.802-06:00</updated><category term='virtualization'/><category term='Visual Studio'/><category term='CTP 6'/><category term='SQL 2008'/><category term='SQL'/><category term='70-448'/><category term='Certification'/><category term='Troubleshooting'/><category term='Review'/><category term='User Groups'/><category term='SP3'/><category term='CTP'/><category term='Business Intelligence'/><category term='SQL Tools'/><category term='trace replay'/><category term='PowerShell'/><category term='Backup'/><category term='SQL Training'/><category term='SSRS'/><category term='SQL 2008 R2'/><category term='DBA'/><category term='Replays'/><category term='performance'/><category term='What I Learned'/><category term='SQLServerPedia Syndication'/><category term='Data Warehouse'/><category term='Miscellaneous'/><category term='SSIS'/><category term='Training'/><category term='Launch Event'/><category term='Utilities'/><title type='text'>SQL Servings</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>90</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5012095639550212581</id><published>2010-12-31T18:03:00.002-06:00</published><updated>2010-12-31T18:04:38.135-06:00</updated><title type='text'>Moving to new home</title><content type='html'>I'm moving SQL Servings to a new site, at &lt;a href="http://www.pertell.com/sqlservings"&gt;http://www.pertell.com/sqlservings&lt;/a&gt;. See you there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5012095639550212581?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5012095639550212581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5012095639550212581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5012095639550212581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5012095639550212581'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/12/moving-to-new-home.html' title='Moving to new home'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6289480237826184425</id><published>2010-12-16T10:08:00.000-06:00</published><updated>2010-12-16T10:08:51.674-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Review'/><title type='text'>SQL and Relational Theory Master Class by C.J. Date</title><content type='html'>&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;"&gt;I recently had a chance to review C.J. Date's video, Relational Theory Master Class. This is an excellent resource and I highly recommend it for anyone who wishes to better understand the theory behind relational database design. But be prepared; this is not a beginner’s class. You should have a basic understanding of SQL and database design before viewing this video. And while the content is expensive at $299 I feel it’s worth it. It’s still cheaper than attending a similar seminar in person, and you can review it whenever you like.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;"&gt;The video is a companion to Date’s book, SQL and Relational Theory, but it’s not required to read or purchase the book too. There’s 16 hours of video content, and I feel the class does a better job of describing relational theory. One of the features of the video I like is that it’s not static; that is, the camera focus is not always on the speaker or a slide deck. Moving between the speaker, the audience, and the content keeps the viewer’s interest. And you can hear the questions asked; it’s almost like you’re attending the class in person. &lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;"&gt;The content is excellent. It’s not centered on any specific platform. The methods you learn here help you to better understand why your table joins work the way they do, regardless if your database is Oracle or SQL Server. Once you better understand relation theory your code will make more sense.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: .0001pt; margin: 0in;"&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;"&gt;You can find&amp;nbsp;SQL and Relational Theory Master Class at&amp;nbsp;&lt;a href="http://oreilly.com/catalog/0636920002710"&gt;O'Reilly Books&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6289480237826184425?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6289480237826184425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6289480237826184425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6289480237826184425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6289480237826184425'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/12/sql-and-relational-theory-master-class.html' title='SQL and Relational Theory Master Class by C.J. Date'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6794009683658711340</id><published>2010-10-04T16:23:00.001-05:00</published><updated>2010-10-04T16:23:37.925-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>What I learned today: No backup or restore with the DAC</title><content type='html'>&lt;p&gt;&lt;font color="#000000"&gt;For everything I teach, I learn something in return.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;I began to train a new junior level DBA today. He’s someone that works with us already as a developer but he’s shown an interest in learning how to be a DBA so I’m beginning to teach him what I know. To start off we began by discussing his daily tasks, then we started to talk about backup and recovery, topics I gave him as an assignment last week. For this week’s homework I told him to read up on the Dedicated Administrator Connection (DAC) and to get familiar with SQLCMD. I mentioned how the DAC was useful in situations where the server was under a strain and you need a way to connect to troubleshoot the problem. Then I said you can use it for backups and recoveries.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;I should have quit when I was ahead.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;As my new colleague correctly pointed out, you can’t use the DAC for backups or recovery. If you try, you’ll get the following error:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Msg 3637, Level 16, State 3, Line 1      &lt;br /&gt;A parallel operation cannot be started from a DAC connection.       &lt;br /&gt;Msg 3013, Level 16, State 1, Line 1       &lt;br /&gt;BACKUP DATABASE is terminating abnormally.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;And BOL can’t make it any clearer:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;SQL Server prohibits running parallel queries or commands with the DAC. For example, error 3637 is generated if you execute either of the following statements with the DAC:&lt;/em&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;em&gt;RESTORE&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;&lt;em&gt;BACKUP&lt;/em&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;em&gt;(Ref: &lt;a href="http://technet.microsoft.com/en-us/library/ms189595.aspx"&gt;http://technet.microsoft.com/en-us/library/ms189595.aspx&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;For some reason I’d forgotten that. It was something that I had read a long time ago and forgot since I don’t use the DAC very often, never in production other than to confirm that it was set up through the firewall. I had assumed that backing up a database in an emergency would be one of the reasons I’d use the DAC. Luckily I was reminded before a situation arose where I relied on it.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#000000"&gt;So I actually learned two things today. I was reminded about the restriction of the DAC, and I learned to be more careful about what I tell others when it comes to SQL, not to assume facts and to do my own homework. I hope I remember both lessons equally.&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6794009683658711340?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6794009683658711340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6794009683658711340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6794009683658711340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6794009683658711340'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/10/what-i-learned-today-no-backup-or.html' title='What I learned today: No backup or restore with the DAC'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6914218553061936783</id><published>2010-09-30T08:58:00.001-05:00</published><updated>2010-09-30T08:59:42.254-05:00</updated><title type='text'>Using the IGNORE_DUP_KEY index option</title><content type='html'>This is a quick demo I put together for a talk on indexes earlier. It shows  the behavior of the IGNORE_DUP_KEY option when you create a unique index.&lt;br /&gt;First, create a small sample table. I used tempdb but feel free to use  whatever test database you want. Then create a unique clustered index on the  field1 column.&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;TABLE&lt;/span&gt; Table1&lt;br /&gt;(&lt;br /&gt;    field1 &lt;span class="kwrd"&gt;int&lt;/span&gt;        &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    field2 &lt;span class="kwrd"&gt;char&lt;/span&gt;(2)    &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;&lt;br /&gt;)&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;UNIQUE&lt;/span&gt; &lt;span class="kwrd"&gt;CLUSTERED&lt;/span&gt; &lt;span class="kwrd"&gt;INDEX&lt;/span&gt; cl_Table_1 &lt;span class="kwrd"&gt;ON&lt;/span&gt; Table1 &lt;br /&gt;(&lt;br /&gt;    field1 &lt;span class="kwrd"&gt;ASC&lt;/span&gt;&lt;br /&gt;)&lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;Next insert a few records into the table. I’m inserting records in two  separate blocks to trap the intentional duplicate key error.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt; TRY&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(1, &lt;span class="str"&gt;'aa'&lt;/span&gt;)&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(2, &lt;span class="str"&gt;'ab'&lt;/span&gt;)&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(3, &lt;span class="str"&gt;'bb'&lt;/span&gt;)&lt;br /&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt; TRY&lt;br /&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt; CATCH&lt;br /&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt; ERROR_MESSAGE ()&lt;br /&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt; CATCH&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt; TRY&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(4, &lt;span class="str"&gt;'cc'&lt;/span&gt;)&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(3, &lt;span class="str"&gt;'ac'&lt;/span&gt;)&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(5, &lt;span class="str"&gt;'dd'&lt;/span&gt;)&lt;br /&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt; TRY&lt;br /&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt; CATCH&lt;br /&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt; ERROR_MESSAGE ()&lt;br /&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt; CATCH&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; field1, field2 &lt;span class="kwrd"&gt;FROM&lt;/span&gt; Table1&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre{ font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/style&gt;  You won’t get any errors in the first block because all three values are  unique as defined by the key. The second block will generate the duplicate key  error when it tries to insert the value 3 into field1. At this point the error  is trapped and value 5 doesn’t get inserted. Viewing the values shows the 4  records. &lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="width: 175px;" unselectable="on"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td valign="top" width="76"&gt;field1&lt;/td&gt; &lt;td valign="top" width="97"&gt;fiels2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="76"&gt;1&lt;/td&gt; &lt;td valign="top" width="97"&gt;aa&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="76"&gt;2&lt;/td&gt; &lt;td valign="top" width="97"&gt;ab&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="76"&gt;3&lt;/td&gt; &lt;td valign="top" width="97"&gt;bb&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="76"&gt;4&lt;/td&gt; &lt;td valign="top" width="97"&gt;cc&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Now lets alter the index to ignore duplicate key errors. When you use this  option any error is ignored and execution of the batch continues. Only the  duplicate record is not inserted. We’ll insert three more records and again trap  any errors.&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;INDEX&lt;/span&gt; cl_Table_1 &lt;span class="kwrd"&gt;ON&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;SET&lt;/span&gt; ( IGNORE_DUP_KEY  = &lt;span class="kwrd"&gt;ON&lt;/span&gt; );&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt; TRY&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(6, &lt;span class="str"&gt;'zz'&lt;/span&gt;)&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(2, &lt;span class="str"&gt;'dd'&lt;/span&gt;)&lt;br /&gt;    INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; Table1 &lt;span class="kwrd"&gt;VALUES&lt;/span&gt;(7, &lt;span class="str"&gt;'cc'&lt;/span&gt;)&lt;br /&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt; TRY&lt;br /&gt;&lt;span class="kwrd"&gt;BEGIN&lt;/span&gt; CATCH&lt;br /&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt; ERROR_MESSAGE ()&lt;br /&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt; CATCH&lt;/pre&gt;&lt;pre class="csharpcode"&gt;&lt;/pre&gt;This time no error is generated. The duplicate value of 2 is ignored and  execution continues, meaning that the next record of 7 is also inserted. Viewing  the values shows this.&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="width: 200px;" unselectable="on"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td valign="top" width="100"&gt;field1&lt;/td&gt; &lt;td valign="top" width="100"&gt;field2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="100"&gt;1&lt;/td&gt; &lt;td valign="top" width="100"&gt;aa&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="100"&gt;2&lt;/td&gt; &lt;td valign="top" width="100"&gt;ab&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="100"&gt;3&lt;/td&gt; &lt;td valign="top" width="100"&gt;bb&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="100"&gt;4&lt;/td&gt; &lt;td valign="top" width="100"&gt;cc&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="100"&gt;6&lt;/td&gt; &lt;td valign="top" width="100"&gt;zz&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="100"&gt;7&lt;/td&gt; &lt;td valign="top" width="100"&gt;cc&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6914218553061936783?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6914218553061936783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6914218553061936783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6914218553061936783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6914218553061936783'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/09/this-is-quick-demo-i-put-together-for.html' title='Using the IGNORE_DUP_KEY index option'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7406489782983938779</id><published>2010-08-21T09:19:00.001-05:00</published><updated>2010-08-21T09:19:52.793-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Training'/><category scheme='http://www.blogger.com/atom/ns#' term='Miscellaneous'/><title type='text'>Does your company owe you training?</title><content type='html'>&lt;p&gt;Recently I read an interesting post by Steve Jones (&lt;a href="http://www.sqlservercentral.com/blogs/steve_jones/default.aspx" target="_blank"&gt;Blog&lt;/a&gt; | &lt;a href="http://twitter.com/way0utwest" target="_blank"&gt;Twitter&lt;/a&gt;) on &lt;a href="http://www.sqlservercentral.com" target="_blank"&gt;SQL Central&lt;/a&gt; about &lt;a href="http://www.sqlservercentral.com/articles/Editorial/70982/" target="_blank"&gt;Personal Investments&lt;/a&gt;, how you invest in your career. It’s also something I’ve been thinking about lately. I agree with Steve that I’m responsible for my own education. But I feel that companies should be, to some extent, as well.&lt;/p&gt;  &lt;p&gt;I fall into the “accidental dba” category. When a senior member of our team left I was assigned to work on maintaining and monitoring our databases, something no-one really did before that. It fell to me because I had the most knowledge about SQL Server, as opposed to just writing T-SQL statements. I learned what I could by going to all the free events I could find. I joined my local SQL User Group and attended as many meetings as possible. I bought and read many excellent SQL books and blogs. I took any free or cheap training resource that was available. Eventually I passed a number of Microsoft certification exams. I’m proud of what I’ve achieved on my own, and I will continue to further my technical education.&lt;/p&gt;  &lt;p&gt;There’s a cost to my training, even if it’s free. There’s the hours of attending conferences and viewing webcasts. There’s the price of purchasing books, and the time it takes to read them. There’s even travel related costs, such as attending a SQL Saturday event in another state. I pay the cost gladly, and I’ve already seen the benefits.&lt;/p&gt;  &lt;p&gt;But at what point should a company start providing training? &lt;/p&gt;  &lt;p&gt;Now I don’t believe your company should always pay for your education. As Steve said in his post, you should make your own investment in your career, showing your managers the value of your training. You’re the one responsible for keeping your skills up to date. But it should be a partnership. Your company also needs to make an investment. They have as much to gain as you do.&lt;/p&gt;  &lt;p&gt;This isn’t just to motivate an employee, giving you a nice job perk. Frankly, if you’re not self-motivated to get the basic skills needed to do your job maybe you should start looking for another position. But if your job suddenly requires specialized knowledge they should help you attain that knowledge.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Let’s say, for instance, that your company has decided to use clustering for high availability. And since you’re the SQL ‘expert” they’ve come to you to set it up. You’ve read up on clustering, and you know in theory how it works. But you’ve never worked in a clustering environment, let alone design the architecture involved. Shouldn’t your company help you learn what you need to know to succeed? After all, they have more at stake in this case than you do.&lt;/p&gt;  &lt;p&gt;I just feel that companies should also contribute to your technical education. I’m interested in how other’s feel about it.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7406489782983938779?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7406489782983938779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7406489782983938779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7406489782983938779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7406489782983938779'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/08/does-your-company-owe-you-training.html' title='Does your company owe you training?'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-2591843889836470193</id><published>2010-08-16T19:15:00.001-05:00</published><updated>2010-08-16T19:15:34.409-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What I Learned'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>What I learned today – CHECKDB and database snapshots</title><content type='html'>&lt;p&gt;A few days ago I was sitting in my local coffee shop, getting a little light reading done. At work we’re about to move from the Standard Edition of SQL 2005 to the Enterprise Edition and I wanted to learn more about some features of database snapshots. Snapshots are basically just a read-only copy of a database taken at a specific time. Anyway I was reading &lt;strong&gt;Chapter 3 – Database and Database Files&lt;/strong&gt; in the excellent book &lt;a href="http://www.amazon.com/Microsoft-SQL-Server-2008-Internals/dp/0735626243" target="_blank"&gt;Microsoft SQL Server 2008 Internals&lt;/a&gt;. The discussion turned to space allocated for the snapshots. That’s when I read that DBCC CHECKDB actually runs against a snapshot of the database.&lt;/p&gt;  &lt;p&gt;That caught me by surprise. Until then I thought that the CHECKDB ran against the database itself.&lt;/p&gt;  &lt;p&gt;Now I thought I was doing OK with protecting our databases. I faithfully run CHECKDB weekly against all databases and check for any errors. I set the CHECKSUM option and verify backups. I occasionally restore databases on a standby server to make sure there’s no problems with the backups. And I monitor database and drive space pretty closely.&lt;/p&gt;  &lt;p&gt;But I was flying blind. I have no idea how near I came to having CHECKDB fail because of a lack of space. So I started digging a little deeper into CHECKDB. And I was able to learn a little bit more of how CHECKDB works with snapshots.&lt;/p&gt;  &lt;p&gt;For anything concerning CHECKDB, your first resource should be Paul Randal (&lt;a href="http://sqlskills.com/BLOGS/PAUL/" target="_blank"&gt;Blog&lt;/a&gt; | &lt;a href="http://twitter.com/PaulRandal" target="_blank"&gt;Twitter&lt;/a&gt;). Read his excellent series on &lt;a href="http://sqlskills.com/BLOGS/PAUL/category/CHECKDB-From-Every-Angle.aspx" target="_blank"&gt;CHECKDB From Every Angle&lt;/a&gt; to get a good understanding of what’s going on. And he also wrote &lt;strong&gt;Chapter 11 – DBCC Internals&lt;/strong&gt; in &lt;a href="http://www.amazon.com/Microsoft-SQL-Server-2008-Internals/dp/0735626243" target="_blank"&gt;Microsoft SQL Server 2008 Internals&lt;/a&gt;, a great book you should read anyway.&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;CHECKDB needs a consistent view of the database to work with. In SQL 7 it acquired table locks. In SQL 2000 it analyzed the transaction log. Beginning with SQL 2005 and going forward it creates a hidden snapshot on the same volume as the database – you have no control over where it’s placed. If you’re running CHECKDB at the same time that your server has a heavy workload the snapshot can run out of space and you’ll get an error showing that CHECKDB didn’t complete. If that happens you have a few options;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create your own database snapshot on a drive that has enough space and run CHECKDB against that snapshot. CHECKDB will know that its running against a snapshot and won’t create another one. &lt;/li&gt;    &lt;li&gt;Start the SQL service in single user mode. &lt;/li&gt;    &lt;li&gt;Put the database in read-only mode.&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Once CHECKDB has finished it will delete the snapshot if it created one. &lt;/p&gt;  &lt;p&gt;But there are a few gotcha’s with CHECKDB creating the snapshot. First, it has to be created on an NTFS drive. Second, you can’t use the WITH TABLOCK hint. And third, you can’t run against tempdb; but why would you want to?.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;I’m sure I’m over simplifying. I still need to finish Chapter 11.&lt;/p&gt;  &lt;p&gt;One other thing I’m wondering. If CHECKDB can create a snapshot database in SQL 2005 regardless of the edition, can the Standard Edition create one with a hidden flag? &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-2591843889836470193?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/2591843889836470193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=2591843889836470193' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2591843889836470193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2591843889836470193'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/08/what-i-learned-today-checkdb-and.html' title='What I learned today – CHECKDB and database snapshots'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7262292335331975692</id><published>2010-08-09T12:23:00.001-05:00</published><updated>2010-08-09T12:23:04.691-05:00</updated><title type='text'>Why I bought an iPad</title><content type='html'>&lt;h5&gt;Disclaimer&lt;/h5&gt;  &lt;p&gt;I bought my new iPad a week ago. I thought I’d write a post explaining why I bought one, and kind of giving it a review against other eReaders I’ve used. But I noticed that Steve Jones wrote something similar at &lt;a href="http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/08/06/ereaders-_2D00_-kindle-v-nook-v-ipad.aspx" target="_blank"&gt;SQL Musings&lt;/a&gt; a few days ago. I had almost finished my post when I read it, and I decided to go ahead and finish it with this disclaimer. But please read Steve’s post, he raises some excellent points. &lt;/p&gt;  &lt;h5&gt;Background&lt;/h5&gt;  &lt;p&gt;I read. A lot. Always have. And since I have a long daily commute I have a lot of time in which to read. My tastes range from light summer reading, books that are perfect for taking to the beach or on vacation, to heavily technical training manuals. &lt;/p&gt;  &lt;p&gt;My problem is what to carry with me. I usually use my morning commute to study or to read the news. The afternoons are most likely spent doing research. Nights and weekends are for reading the latest novel. For instance I’m currently studying for the SQL 2008 Business Intelligence certifications so I’m going through the &lt;a href="http://http://www.amazon.com/MCTS-Self-Paced-Training-Exam-70-448/dp/0735626367/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1281287181&amp;amp;sr=1-1" target="_blank"&gt;MS Press Training Kit for 70-448&lt;/a&gt;. But I’m also reading Carl Hiassen’s latest novel &lt;a href="http://www.amazon.com/Star-Island-Carl-Hiaasen/dp/0307272583/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1281287130&amp;amp;sr=1-1" target="_blank"&gt;Star Island&lt;/a&gt;. And I’ve got James Lee Burke’s &lt;a href="http://www.amazon.com/Glass-Rainbow-Dave-Robicheaux-Novel/dp/1439128294/ref=sr_1_1?s=books&amp;amp;ie=UTF8&amp;amp;qid=1281287085&amp;amp;sr=1-1" target="_blank"&gt;The Glass Rainbow&lt;/a&gt; on tap.&lt;/p&gt;  &lt;h5&gt;Older Devices&lt;/h5&gt;  &lt;p&gt;I’ve been reading eBooks for a while now, on any number of devices. I started by reading pdf files on my desktop computer. Then came Microsoft Reader and their .lit files. Of course Word documents and text files were included. &lt;/p&gt;  &lt;p&gt;But the problem with using a desktop computer was that it wasn’t portable. Once I got an IT job I could justify buying a laptop computer. Even more handy were PDA devices, precursors to the smart phones of today. Each of these devices also had issues. Laptops, at least the ones I had years ago, were bulky, took a while to boot up, and generally didn’t have a lot of extra storage. And PDA screens were too small for my liking. If I made the font large enough to read comfortably then I was turning pages constantly.&amp;#160; &lt;/p&gt;  &lt;h5&gt;My devices now&lt;/h5&gt;  &lt;p&gt;Enter the Amazon Kindle. I know that the Sony Reader came first, but it never really tempted me. I thought the price was too high and the book selection was too small. I thought the same of the Kindle 1 when it first came out. It wasn’t until the Kindle 2 was released, with a growing number of eBooks and a cheaper price, that I got behind it.&lt;/p&gt;  &lt;p&gt;I also had a different laptop now, an HP Pavilion TX2000 that’s a Tablet PC with a swivel screen that can run as a slate or a classic laptop. This 3 year old PC has 4 GB of RAM and a 500 GB hard drive so it can run pretty much anything I want.&lt;/p&gt;  &lt;p&gt;And as you can tell from the title of this post, I just bought an Apple iPad. I’ve got the 16 GB WiFi model, more than enough storage for my pdfs and other documents. &lt;/p&gt;  &lt;p&gt;I should also say I’ve ruled out the Nook from Barnes and Noble as too much like the Kindle. I know it can share books, but I don’t know anyone else with a Nook and I don’t think the eBook selection is as good as Amazon.&lt;/p&gt;  &lt;h5&gt;Kindle pros and cons&lt;/h5&gt;  &lt;p&gt;I’ve been using the Kindle 2 now since it came out and I love most of it. It’s light, easy to hold in one hand while reading. It has a large enough storage capacity of 1.5 GB, free 3G Whispernet connectivity and direct connect to Amazon or other sites to download a book in 60 seconds. You can adjust the font and the number of words per line, and the readability on the Kindle is the best of my three main devices. The battery life is 2 weeks with 3G off, 4 days with it on. And you can read in direct sunlight, so I can read just about anywhere. There’s no back light, but I have a clip-on for the few times I read in bed. The last Kindle upgrade added collections, a way of grouping my books by category.&lt;/p&gt;  &lt;p&gt;My only regret about the Kindle is that it’s not the best device to read technical books or pdfs on. Originally, I could email a pdf to a special Kindle account and it would convert it to a Kindle-formatted ebook. Later there was an update that allows me to copy a pdf directly to the Kindle. And there’s always been 3rd party tools like MobiReader and Calibre that could convert pdfs to a format that Kindles can read. However big pdfs are a problem, and converted pdfs never really convert cleanly. The 2.5 update allows zooming into pdfs and you can rotate the screen, but there’s still an uncomfortable amount of scrolling and page turning that makes reading pdfs on the Kindle very difficult, at least for me.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;h5&gt;Tablet PC pros and cons&lt;/h5&gt;  &lt;p&gt;I love my tablet pc. It fits my needs as a laptop computer, allowing me to run every application I want, plus it’s Wacom and touch enabled so I can take handwritten notes. Amazon and other eBook manufacturers have released a Kindle app for pcs so I can sync my Kindle books between devices. I’ve got built-in WiFi and a Sprint 3G data card so I can connect to the internet from just about anywhere. Using Adobe Reader allows me to size my pdfs to any size I need. And when I’m studying its great to have the ability to work directly in another application to try out some of the things I’m reading about in my current pdf.&lt;/p&gt;  &lt;p&gt;But the tablet pc is the most expensive device. It’s also has the least amount of battery life, though I have more than enough for my daily commutes. It takes the longest to start up either cold or warm. It’s the bulkiest by far. And the screen is unreadable in sunlight. &lt;/p&gt;  &lt;h5&gt;iPad pros and cons&lt;/h5&gt;  &lt;p&gt;I fought getting an iPad for a while, I really did. I thought for the most part it would just duplicate what i could already do on my tablet pc. But it does have some distinct advantages. First, it’s much lighter. Not as light as my Kindle but pounds less that my tablet. It starts up almost immediately. The larger screen makes the iPad ideal for my technical documents. I can browse the web and read emails through the WiFi connection. And like my tablet, there’s a Kindle app so I can sync up my Amazon books. &lt;/p&gt;  &lt;p&gt;Again, like the tablet, I can’t read the screen outdoors. It’s far more expensive than the Kindle ($499 vs $139 for the lowest priced models) but not as expensive as my tablet. Battery life is started at 10 hours. That’s acceptable for my commutes but I’d have to carry a charger for vacations. &lt;/p&gt;  &lt;h5&gt;My conclusions&lt;/h5&gt;  &lt;p&gt;I really want to have a single ebook reader but my perfect device isn’t out there just yet. I want a device that can easily read all formats, has great battery life, is small enough to be carried easily, can be read in all light conditions, has Internet connectivity through WiFi or 3G, and is affordable. Until that device is available I’ll be using my iPad for technical readings and my Kindle for my more causal readings.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7262292335331975692?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7262292335331975692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7262292335331975692' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7262292335331975692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7262292335331975692'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/08/why-i-bought-ipad.html' title='Why I bought an iPad'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4464132493580506858</id><published>2010-07-27T08:54:00.001-05:00</published><updated>2010-07-27T08:54:03.082-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Creating your own default trace</title><content type='html'>&lt;p&gt;Are you aware of the default trace that SQL Server runs when it starts? Did you know it’s configurable?&lt;/p&gt;  &lt;p&gt;No, you can’t edit it. But you can still run a trace on startup that captures only the events that you want.&lt;/p&gt;  &lt;p&gt;The first thing you should do is to see if the default trace is enabled. Simple enough, just run sp_configure with advanced options and look for 'default trace enabled'. Or query sys.configurations for configuration_id 1568.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;br /&gt;&lt;span class="kwrd"&gt;FROM&lt;/span&gt; sys.configurations&lt;br /&gt;&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; configuration_id = 1568&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;On my laptop it is.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/TE7k6U1PLpI/AAAAAAAAArE/6jyfR0XmQOQ/s1600-h/image15.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_R-tbJU7CXwQ/TE7k6zUCc_I/AAAAAAAAArI/udcYm_Wwhvc/image_thumb15.png?imgmax=800" width="588" height="162" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There’s a few ways to see what the trace is doing. First find the trace id. It should be 1, but you can make sure…&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; sys.traces&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; ::fn_trace_getinfo(0) &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;…then query fn_traace_geteventinfo(1) to see what events the default trace is looking at. You can see the descriptions of the events by joining to some system views. &lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; tc.name &lt;span class="kwrd"&gt;AS&lt;/span&gt; [Category],&lt;br /&gt;   dt.eventid, te.name &lt;span class="kwrd"&gt;AS&lt;/span&gt; [Event Name], &lt;br /&gt;   dt.columnid, tcol.name &lt;span class="kwrd"&gt;AS&lt;/span&gt; [&lt;span class="kwrd"&gt;Column&lt;/span&gt; Name] &lt;br /&gt;&lt;span class="kwrd"&gt;FROM&lt;/span&gt; ::fn_trace_geteventinfo(1) &lt;span class="kwrd"&gt;AS&lt;/span&gt; dt&lt;br /&gt;   &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; sys.trace_events &lt;span class="kwrd"&gt;AS&lt;/span&gt; te &lt;span class="kwrd"&gt;ON&lt;/span&gt; dt.eventid = te.trace_event_id&lt;br /&gt;   &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; sys.trace_columns &lt;span class="kwrd"&gt;AS&lt;/span&gt; tcol &lt;span class="kwrd"&gt;ON&lt;/span&gt; dt.columnid = tcol.trace_column_id&lt;br /&gt;   &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; sys.trace_categories &lt;span class="kwrd"&gt;AS&lt;/span&gt; tc &lt;span class="kwrd"&gt;ON&lt;/span&gt; te.category_id = tc.category_id &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;a href="http://lh4.ggpht.com/_R-tbJU7CXwQ/TE7k7eiYglI/AAAAAAAAArM/iSyiFodAqtc/s1600-h/image21.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_R-tbJU7CXwQ/TE7k8SdwyzI/AAAAAAAAArQ/xTIDy8t98lg/image_thumb24.png?imgmax=800" width="517" height="348" /&gt;&lt;/a&gt; &lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;But what if, after looking at the events that the default trace is looking at, you decide to add to the list? Or maybe you want to skip some events? Remember, you can’t alter the default trace.&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;First disable the default trace. Use sp_configure, the change doesn’t require a restart. It will also close the trace.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;sp_configure &lt;span class="str"&gt;'default trace enabled'&lt;/span&gt;, 0;&lt;br /&gt;&lt;span class="kwrd"&gt;go&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;reconfigure&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;Next create a stored procedure in the master database that will create and start your trace. Use sp_trace_create to generate a trace id, use sp_trace_setevent to select the events you want to capture, and finally start the trace with sp_trace_setstatus. Read more about creating traces &lt;a href="http://msdn.microsoft.com/en-us/library/ms190362.aspx" target="_blank"&gt;here&lt;/a&gt;. If you aren’t familiar with creating traces via T-SQL use SQL Profiler to capture the events you need and set whatever properties you need then extract the trace properties to a script file.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;Finally mark your new procedure to start when SQL does by using sp_procoption. This procedure takes 3 parameters; the name of your procedure, the option ‘startup’, and a true or false value. ‘Startup’ is the only option available, true sets to autostart, and false sets to not autostart. &lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;In my demo script below I’ve created a trace that will track what a certain user does in the database as well as when they log in or out. &lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;USE [master]&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[MyDefaultTrace]&lt;br /&gt;AS&lt;br /&gt;&lt;br /&gt;begin    &lt;br /&gt;    declare @rc int&lt;br /&gt;    declare @TraceID int&lt;br /&gt;    declare @maxfilesize bigint&lt;br /&gt;    declare @filecount int&lt;br /&gt;    set @maxfilesize = 100&lt;br /&gt;    set @filecount = 5&lt;br /&gt;&lt;br /&gt;    exec @rc = sp_trace_create @TraceID output, 2, &lt;br /&gt;        N'C:\Perflogs\MyDefaultTrace', &lt;br /&gt;        @maxfilesize, NULL, @filecount&lt;br /&gt;&lt;br /&gt;    declare @on bit&lt;br /&gt;    set @on = 1&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 7, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 23, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 8, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 64, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 1, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 9, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 21, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 25, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 41, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 49, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 57, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 2, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 6, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 10, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 14, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 26, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 66, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 3, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 11, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 35, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 51, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 12, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 14, 60, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 7, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 15, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 23, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 8, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 16, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 64, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 9, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 17, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 41, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 49, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 57, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 6, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 10, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 14, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 18, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 26, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 66, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 3, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 11, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 35, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 51, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 12, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 60, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 13, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 15, 21, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 7, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 15, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 8, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 64, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 1, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 9, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 41, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 2, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 10, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 3, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 11, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 35, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 51, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 12, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 5, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 13, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 6, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 14, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 43, 62, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 7, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 8, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 64, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 1, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 41, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 10, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 3, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 11, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 35, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 51, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 12, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 5, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 13, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 6, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 14, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 62, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 45, 15, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 7, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 15, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 8, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 64, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 1, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 41, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 10, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 3, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 11, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 35, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 51, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 12, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 5, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 13, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 6, @on&lt;br /&gt;    exec sp_trace_setevent @TraceID, 41, 14, @on&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    -- Set the Filters&lt;br /&gt;    declare @intfilter int&lt;br /&gt;    declare @bigintfilter bigint&lt;br /&gt;&lt;br /&gt;    exec sp_trace_setfilter @TraceID, 11, 0, 6, N'BadUser'&lt;br /&gt;    &lt;br /&gt;    exec sp_trace_setstatus @TraceID, 1&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;EXEC sp_procoption N'MyDefaultTrace', 'startup', '1'&lt;br /&gt;&lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now when I check to see what traces are running trace id #1 is the trace created in my procedure. The trace start is also written to the SQL error log when the master database starts.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/TE7k9UIZz1I/AAAAAAAAArU/V-P2TWRqcD4/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_R-tbJU7CXwQ/TE7k-WczRcI/AAAAAAAAArY/-VB83KNz3Mc/image_thumb%5B1%5D.png?imgmax=800" width="513" height="451" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As always, please test this on a server you can play with before putting into production. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4464132493580506858?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4464132493580506858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4464132493580506858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4464132493580506858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4464132493580506858'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/07/creating-your-own-default-trace.html' title='Creating your own default trace'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_R-tbJU7CXwQ/TE7k6zUCc_I/AAAAAAAAArI/udcYm_Wwhvc/s72-c/image_thumb15.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8640129079678255240</id><published>2010-07-21T21:02:00.001-05:00</published><updated>2010-07-21T21:02:00.649-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Winning the DBA Open</title><content type='html'>&lt;p&gt;Last weekend I, like millions of other golf fans around the world, watched as Louis Oosthuizen, an unknown (at least to me) golfer out of South Africa, won The Open Championship at St Andrews by an astounding 7 strokes. He showed confidence in his abilities throughout the tournament, never losing his composure playing in some of the toughest conditions on any course in the world. Congratulations, Louis!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://picsrv.opengolf.com/img/DownloadFile.dwn?filename=CROP_82279a3a-6c8e-4799-817b-ab1b7e1d859a_A006850_13_27.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;As i watched the game, I began to think that being a DBA and being a champion golfer weren’t that different. Both need to be confident in their abilities, both need to have a solid game plan, and both have to be able to execute their craft under pressure, being prepared for any eventuality.&lt;/p&gt;  &lt;h4&gt;Preparing for the tournament&lt;/h4&gt;  &lt;p&gt;A good golfer gets to the course early, days before the tournament begins. They play the course, talk to locals to learn any particular quirks the course may have, and practices hundreds of shots of different lengths or difficulties.&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="golfer" src="http://www.designedtoat.com/clipart3/golf_14.gif" /&gt;&lt;/p&gt;  &lt;p&gt;Good DBAs do the same. They find out about the host server, talking to the system team or SAN administrator; what kind of disk subsystem is there? what’s the memory or CPU like? does the server meet the requirements for SQL?&lt;/p&gt;  &lt;h4&gt;You drive for show…&lt;/h4&gt;  &lt;p&gt;The golfer starts his round on the tee. He’ll determine the club to use based on experience and conditions; where’s the wind coming from? how long is the hole? where’s the danger spots? A well hit drive will end up far down the fairway, perfectly placed for his next shot.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="Click to view" src="http://classroomclipart.com/images/gallery/Clipart/Sports/Golf_Clipart/TN_crca_golfer_clipart.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;The DBA does the same when he sets up the server. His experience comes into play knowing what has to be done, and server conditions will help him to correctly place the system databases and data and log files for other databases. He’ll know what options to set and what to set them to. His server will be set up to optimal conditions, perfectly placed for hosting the company data.&lt;/p&gt;  &lt;h4&gt;…the approach shot…&lt;/h4&gt;  &lt;p&gt;Now the golfer will try to get his ball onto the green. He’ll again choose the right club, line up the shot, take a practice swing or two, then hits his best shot. He’ll know how his ball will fly because he has hit the same shot hundreds of times before so he can compare against past performance.&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="Click to view" src="http://classroomclipart.com/images/gallery/Clipart/Sports/Golf_Clipart/TN_13-11-08_R12A.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;The DBAs approach shot is to benchmark his system. He should know how the server will perform during peak and non-peak times. &lt;/p&gt;  &lt;h4&gt;---getting out of a hazard…&lt;/h4&gt;  &lt;p&gt;Sometimes, though, the golfer’s approach shot is mishit. Or maybe a gust of wind holds up the shot and it lands in a greenside bunker. A good golfer knows how to get out of those situations and save par.&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="humorous golf hazard" src="http://www.webweaver.nu/clipart/img/entertainment/sports/golf/golf-hazard.gif" /&gt;&lt;/p&gt;  &lt;p&gt;Similarly, a DBA must know how to get out of disaster scenarios. He knows he has set up and is maintaining&amp;#160; a proper backup strategy and has practiced recovering databases until he knows the procedure inside and out. He knows the different options available for DBCC CHECKDB. &lt;/p&gt;  &lt;h4&gt;---and you putt for dough&lt;/h4&gt;  &lt;p&gt;This is where the good golfers shine. They don’t fade when standing over a three foot putt with the tournament on the line. They know they’ve made the same putt over and over before, and they’ve practiced for just this occasion. They read the putt’s line, judge the speed, and with millions of eyes watching they calmly knock it hit it center cup.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="Click to view" src="http://classroomclipart.com/images/gallery/Clipart/Sports/Golf_Clipart/TN_22-3-07_4.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;The DBA also is good under pressure. They’ve written and checked over their scripts, and they’re confidant they’ll perform as written. They don’t wilt when the CIO is standing over their shoulder asking why performance is so bad on their server.&amp;#160; &lt;/p&gt;  &lt;h4&gt;The caddy…&lt;/h4&gt;  &lt;p&gt;All good golfers know the value of their caddy. A caddy’s job is to help his golfer, pointing out the course yardage, offering the right club, taking some of the pressure of the golfer. Sometimes the caddy is also a teacher, pointing out flaws in the golfer’s swing.&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="Golf Caddies Baltusrol" src="http://2.bp.blogspot.com/_TZ4zYEBSw1I/TETEWTd2wRI/AAAAAAAAM4Y/0ZWaDL072bI/s400/golf_Caddies_Baltusrol_2.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;A DBA also needs a caddy. Their caddy can be a mentor or coworker at work. They can use social networks for advice on specific problems or as a sounding board.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;h4&gt;Preparing for the next tournament&lt;/h4&gt;  &lt;p&gt;The golfer is always practicing. He’s at the driving range on his day off, constantly working on correcting swing flaws and working on new shots.&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" src="http://imagecache6.allposters.com/LRG/27/2744/M2BTD00Z.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;Likewise the DBA is constantly learning. They attend their local PASS chapter meetings or go to national conventions. They’re constantly reading blogs and whitepapers, learning new skills to help them manage their servers or help their company. &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The moral? Like in golf, or any endeavor, the secret of being a good DBA is to be prepared. Learn your craft. Ask your caddy when you have questions. Practice when you’re able. Keep learning. And you too can win the DBA Open.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8640129079678255240?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8640129079678255240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8640129079678255240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8640129079678255240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8640129079678255240'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/07/winning-dba-open.html' title='Winning the DBA Open'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_TZ4zYEBSw1I/TETEWTd2wRI/AAAAAAAAM4Y/0ZWaDL072bI/s72-c/golf_Caddies_Baltusrol_2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4689578637899834201</id><published>2010-07-19T16:38:00.001-05:00</published><updated>2010-07-20T08:30:14.664-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What I Learned'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>What I learned today – importing mixed data types from Excel</title><content type='html'>&lt;p&gt;Recently a coworker came up with an issue I never ran into before. He’s importing a large number of Excel spreadsheets into a SQL 2005 instance. One of the columns contains mixed data; 1, 2, 3, x, y, z for example. What he found is that if the first 20 or so rows are strictly numeric then the connection treats the whole column as numeric, and alphanumeric values are returned as NULLs. He’s querying using OPENROWSET, but it looks like this happens in SSIS as well.&amp;#160; &lt;/p&gt;  &lt;p&gt;What his research found was that there’s a few registry keys that come into play. There’s also another property he needed to set in his connection string. When he adds “IMEX=1” it allows importing of mixed data types based on the the registry setting “ImportMixedTypes”. The default value is “text”. One drawback to text is that you’re limited to 255 characters. The only other available value is “Majority Type”. When you use Majority Type some of the values are scanned and the data type with the most values is used. &lt;/p&gt;  &lt;p&gt;The number of rows scanned is based on the “TypeGuessRow” registry setting. By default it’s set to 8, but valid values are 0 to 16. If you set it to 0 then all rows are sampled. Setting it to a value between 1 and 16 samples that number.&lt;/p&gt;  &lt;p&gt;Both keys can be found at HKEY_Local_Machine/Software/Microsoft/Jet/4.0/Engines/Excel/.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Here are a few articles that explain the issue better.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://jingyang.spaces.live.com/blog/cns!CC21A118B1B5250!318.entry?sa=781031802"&gt;http://jingyang.spaces.live.com/blog/cns!CC21A118B1B5250!318.entry?sa=781031802&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.instantpages.ltd.uk/ADODB_WP.htm"&gt;http://www.instantpages.ltd.uk/ADODB_WP.htm&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATED 7/20/2010:&lt;/strong&gt; You can read more about the actual issue &lt;a href="http://irwinj.blogspot.com/2010/07/sql-server-excel-import-and-mixed-data.html?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+HellocruelWorld+(Hello+(cruel)+World)" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4689578637899834201?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4689578637899834201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4689578637899834201' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4689578637899834201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4689578637899834201'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/07/what-i-learned-today-importing-mixed.html' title='What I learned today – importing mixed data types from Excel'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1656825437604070815</id><published>2010-07-14T07:22:00.001-05:00</published><updated>2010-07-14T07:22:43.189-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Changing the name of your SQL server</title><content type='html'>&lt;p&gt;My company recently changed their standard naming conventions for computers, so yesterday I had to rename my workstation. Usually this isn’t a big deal, except that I’m running locally a default instance of SQL 2005 and a named instance of SQL 2008.Again, not a big deal since this is just my local playground. But I wanted to sync up the names.&lt;/p&gt;  &lt;p&gt;Let’s say that my laptop was named “CHICAGO”. That makes the default instance also “CHICAGO'”, and my named instance “CHICAGO\KATMAI”. Now my laptop name changed to “NEWCHICAGO”. My SQL instances stay as “CHICAGO” and “CHICAGO\KATMAI”. How do you change them to match the new computer name?&lt;/p&gt;  &lt;p&gt;Couldn’t be simpler, just execute two procedures. For the default instance.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;USE&lt;/span&gt; master;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; sp_dropserver &lt;span class="str"&gt;'CHICAGO'&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; sp_addserver &lt;span class="str"&gt;'NEWCHICAGO'&lt;/span&gt;, &lt;span class="kwrd"&gt;local&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;It’s the same for a named instance. Just add the instance name. &lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;USE&lt;/span&gt; master;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; sp_dropserver &lt;span class="str"&gt;'CHICAGO\KATMAI'&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; sp_addserver &lt;span class="str"&gt;'NEWCHICAGO\KATMAI'&lt;/span&gt;, &lt;span class="kwrd"&gt;local&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;font face="Verdana"&gt;Then, just restart the SQL service and you should see the name change.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;Note, though, that this only changes the server name, not the instance name.  I haven’t had an opportunity to try that yet.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1656825437604070815?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1656825437604070815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1656825437604070815' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1656825437604070815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1656825437604070815'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/07/changing-name-of-your-sql-server.html' title='Changing the name of your SQL server'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8989635567858958448</id><published>2010-07-13T09:13:00.001-05:00</published><updated>2010-07-13T09:13:36.546-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='PowerShell'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Another use for PowerShell and SQL</title><content type='html'>&lt;p&gt;A few months ago I wrote a PowerShell script that looped through servers and databases&amp;#160; to save the properties inside an Excel spreadsheet (&lt;a href="http://sqlservings.blogspot.com/2010/03/powershell-and-sql.html" target="_blank"&gt;PowerShell and SQL&lt;/a&gt;). I thought it’s time to add another one.&lt;/p&gt;  &lt;p&gt;One of the daily tasks I set up for myself as a SQL DBA is to go through the error logs for anything that may be an indicator of a problem. This is especially true on Sunday afternoons or Monday mornings, after my weekly DBCC CHECKDB job runs. I’ve configured the jobs to email me the results, but since I’m monitoring 10 instances they can be time consuming to read through. I usually just cut to the bottom, where DBCC reports the number of errors it finds. If the number of errors is 0, all is well and good. Otherwise, of course, further investigation is needed.&lt;/p&gt;  &lt;p&gt;This seemed like a natural for a new PowerShell script. One of the great strengths of PowerShell is it’s ability to connect to as many remote servers as needed. And since I knew that the DBCC CHECKDB summary is written in the error log all I need to do is to read the logs. I had read this &lt;a href="http://sqlblog.com/blogs/buck_woody/archive/2010/03/29/open-the-sql-server-error-log-with-powershell.aspx" target="_blank"&gt;post&lt;/a&gt; by Buck Woody (&lt;a href="http://sqlblog.com/blogs/buck_woody/default.aspx" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="http://twitter.com/buckwoody" target="_blank"&gt;twitter&lt;/a&gt;) about doing almost exactly what I wanted to do. I merged his script with my earlier script and made a few other changes. My final code looks like this:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;[System.Reflection.Assembly]::LoadWithPartialName(&lt;span class="str"&gt;'Microsoft.SqlServer.SMO'&lt;/span&gt;) | out-null &lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;#Get SQL account information&lt;/span&gt;&lt;br /&gt;$credential = Get-Credential&lt;br /&gt;$loginName = $credential.UserName -replace(&lt;span class="str"&gt;&amp;quot;\\&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;)  &lt;br /&gt;$password = $credential.Password &lt;br /&gt;&lt;br /&gt;#Get variables&lt;br /&gt;$logDate = read-host(&amp;quot;&lt;/span&gt;Enter log date&lt;span class="str"&gt;&amp;quot;)&lt;br /&gt;$searchPhrase = &amp;quot;&lt;/span&gt;*&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$searchPhrase += read-host(&amp;quot;&lt;/span&gt;Enter search phrase&lt;span class="str"&gt;&amp;quot;)&lt;br /&gt;$searchPhrase  += &amp;quot;&lt;/span&gt;*&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$srvlist = @(get-content &amp;quot;&lt;/span&gt;C:\Power\SQL_Servers.txt&amp;quot;) &lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;#Loop through all instances &lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;foreach&lt;/span&gt; ($instance &lt;span class="kwrd"&gt;in&lt;/span&gt; $srvlist) &lt;br /&gt;{&lt;br /&gt;  $instance&lt;br /&gt;  $srv = New-Object (&lt;span class="str"&gt;'Microsoft.SqlServer.Management.Smo.Server'&lt;/span&gt;) $instance&lt;br /&gt;  $srv.ConnectionContext.LoginSecure = $false&lt;br /&gt;  $srv.ConnectionContext.set_Login($loginName)&lt;br /&gt;  $srv.ConnectionContext.set_SecurePassword($password)         &lt;br /&gt;  $srv.ReadErrorLog(0) | where {$_.LogDate &lt;span class="preproc"&gt;-gt&lt;/span&gt; $logDate -and $_.Text &lt;span class="preproc"&gt;-like&lt;/span&gt; $searchPhrase} &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;Since I don’t always access the servers from a computer on the domain, I added login credentials. You can remove these if you want to use Windows authentication. After that I read a date and search phrase I type in. I found that this can come in handy when I want to change what I’m searching for. For instance, I can enter the phrase “DBCC CHECKDB” and the script will return the summaries based on the date I entered. Or I can search for “BACKUP” or “ERROR”, whatever my heart desires.&lt;/font&gt;&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8989635567858958448?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8989635567858958448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8989635567858958448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8989635567858958448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8989635567858958448'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/07/another-use-for-powershell-and-sql.html' title='Another use for PowerShell and SQL'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1057283822530448215</id><published>2010-07-06T11:02:00.001-05:00</published><updated>2010-07-06T11:02:08.751-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Stop SQL Agent when enabling Service Broker on msdb</title><content type='html'>&lt;p&gt;I forget this every time I set up a new server. &lt;/p&gt;  &lt;p&gt;When I set up database mail on anew server I usually get the message “Service Broker is not enabled on msdb. Do you want to enable it?” Clicking OK gives me an unresponsive SQL server. Running the command “ALTER DATABASE msdb SET Enable_Broker” runs forever with no message returned.&lt;/p&gt;  &lt;p&gt;What I forget each and every time is that the SQL Agent is running. Checking the locks or running sp_who2 shows that my ALTER DATABASE is blocked by the process running the Agent. Simply stopping the Agent allows the statement to finish, whether from the query window or clicking OK in the dialog box mentioned earlier. Then I just restart the Agent and everything’s hunky-dory again.&lt;/p&gt;  &lt;p&gt;Maybe now I’ll remember it. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1057283822530448215?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1057283822530448215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1057283822530448215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1057283822530448215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1057283822530448215'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/07/stop-sql-agent-when-enabling-service.html' title='Stop SQL Agent when enabling Service Broker on msdb'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1148459775374796529</id><published>2010-07-05T10:35:00.001-05:00</published><updated>2010-07-05T10:35:18.169-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>My favorite SQL features</title><content type='html'>&lt;p&gt;Recently I ran across a contest sponsored by Microsoft SQL Server MVP Ken Simmons (&lt;a href="http://cybersql.blogspot.com" target="_blank"&gt;Blog&lt;/a&gt; | &lt;a href="http://twitter.com/kensimmons" target="_blank"&gt;Twitter&lt;/a&gt;). One of the ways to enter the contest was to create a blog post listing favorite SQL features. But how do you select a favorite? That’s like asking someone to choose a favorite song. Like most things the the SQL world, the correct answer is “it depends”, usually on what I’m trying to do at the time. &lt;/p&gt;  &lt;p&gt;So here’s my top 10 favorite SQL features and tips, in the order that they come to mind. I’m ignoring features I’m not currently using, like backup compression and data encryption, and limiting myself to those I use the most often.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Integration with PowerShell&lt;/strong&gt;. This is a great feature to administer multiple SQL instances easily. For those who haven’t been on the internet in the last few years, PowerShell is Microsoft’s new scripting language based on the .NET framework. And starting with SQL 2008, PowerShell became integrated with SQL. What does this mean to you as a DBA? Well, imagine yourself as the new head DBA for your company, and you’re now in charge of 100 SQL instances. Your boss tells you that your first task is to standardize all instances. How can you quickly view the properties of each server? With PowerShell and remoting, you can easily query each instance and save the results to an Excel spreadsheet for easy analysis. I gave an example of how I do it in an earlier blog post &lt;a href="http://sqlservings.blogspot.com/2010/03/powershell-and-sql.html" target="_blank"&gt;here&lt;/a&gt;.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Dynamic Management Views and Functions (DMV).&lt;/strong&gt; Introduced with SQL 2005, DMVs are a great way to see how your server is performing. I’m not going to go into them in depth here since they’ve been written about by many others much better than I can. If you’re not familiar with them, do yourself a favor and start reading about them. They’ll make your life much easier.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Storing queries in the toolbox&lt;/strong&gt;. Like all DBAs, I’ve got a number of queries that I run over and over again. There’s numerous ways to store these for easy access, but my favorite for short one-line queries is to store them on the toolbox. Simply open the toolbox (Ctrl + Alt + x) and drag your query over. To recall it, open the toolbox, copy the desired query, and paste it into a new query window.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Policies.&lt;/strong&gt; Introduced in SQL 2008, Policy Based Management allows DBAs to manage multiple servers from a central server. Policies can standardize server configurations and check them for compliance.&amp;#160;&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Report Services.&lt;/strong&gt; Built-in reporting capabilities for the same price as the database engine. ‘nuff said. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;IntelliSense.&lt;/strong&gt; This feature gives the same statement completion that you see in Visual Studio, not surprising since SQL Management Studio uses the same IDE and Visual Studio. Unfortunately it doesn’t work against 2005 servers or earlier. It did in the earlier betas but was removed in the final release. Hopefully Microsoft will put it back. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Object Explorer Details&lt;/strong&gt;. You can now see details of different database objects using the details view (F7). It’s also configurable. Just right click on the screen and choose what columns you want to see.&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://lh6.ggpht.com/_R-tbJU7CXwQ/TDH7sMjkiHI/AAAAAAAAAqs/xA1FM1BHdyk/s1600-h/image%5B17%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/TDH7s8WR0vI/AAAAAAAAAqw/dyr_Fll6Zy0/image_thumb%5B7%5D.png?imgmax=800" width="602" height="366" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Running queries against multiple instances.&lt;/strong&gt; If you set up Registered Groups and register SQL instances by groups, you can execute a query against all servers in the group. You can select all groups, but you can’t choose to ignore instances inside the group. It’s all or nothing. But still, a significant timesaver when you need to run multiple statements against multiple instances.&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Setting variable values.&lt;/strong&gt; One of the nice things in the .NET world is the ability to use easily change the value of a variable; i += 1 for instance. Now you can do that in SQL too. Instead of&amp;#160; &lt;/li&gt;    &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; @i = @i + 1&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;you can now do it like this&lt;/font&gt; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; @i += 1&lt;/pre&gt;&lt;br /&gt;  &lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;strong&gt;SQL Community.&lt;/strong&gt; Not technically part of SQL itself, but I feel it’s important nevertheless. I first began learning about SQL on my own and quickly found myself overwhelmed. There was no time to learn at work, and I needed to find the knowledge to do my job. I found the &lt;a href="http://chicago.sqlpass.org/" target="_blank"&gt;Chicago SQL User Group&lt;/a&gt; and found what I needed; experienced DBAs volunteering to talk about a subject they love. ChiSUG lead me to &lt;a href="http://www.sqlpass.org/" target="_blank"&gt;PASS&lt;/a&gt;, an international group with tons of free resources. I began following blogs written by the same people authoring the articles on PASS and presenting at the group meetings. Reading these blogs lead me to twitter, where I can follow SQL experts in real-time and ask for help with the #SQLhelp tag. Finally there’s &lt;a href="http://www.sqlsaturday.com/" target="_blank"&gt;SQL Saturdays&lt;/a&gt;, day-long events with SQL experts speaking on various topics. Notice the recurring theme about these resources; they are all free. I’m constantly amazed by the amount of content that SQL DBAs and developers make available for no cost, and the time they put in as volunteers at in-person events. To the entire SQL community, thank you. I wouldn’t be where I am today without your help.&amp;#160; &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1148459775374796529?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1148459775374796529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1148459775374796529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1148459775374796529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1148459775374796529'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/07/my-favorite-sql-features.html' title='My favorite SQL features'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_R-tbJU7CXwQ/TDH7s8WR0vI/AAAAAAAAAqw/dyr_Fll6Zy0/s72-c/image_thumb%5B7%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8357923625122248064</id><published>2010-06-29T14:35:00.001-05:00</published><updated>2010-06-29T14:35:52.874-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>PIVOT compared to CASE for a crosstab result</title><content type='html'>&lt;p&gt;Yesterday I was playing with a test query for a coworker using the PIVOT keyword when it dawned on me that I never compared it to using CASE statements. So, here’s the requirements.&lt;/p&gt;  &lt;p&gt;There is a table called lab_results, with a partial DDL statement below&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;strong&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;TABLE&lt;/span&gt; [dbo].[lab_results](&lt;br /&gt;    [lab_result_id] [&lt;span class="kwrd"&gt;char&lt;/span&gt;](12) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [patient_id] [&lt;span class="kwrd"&gt;char&lt;/span&gt;](8) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [test_code] [&lt;span class="kwrd"&gt;numeric&lt;/span&gt;](4, 0) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [sample_date] [datetime] &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    .............................&lt;br /&gt;    .............................&lt;br /&gt; &lt;span class="kwrd"&gt;CONSTRAINT&lt;/span&gt; [PK_lab_results] &lt;span class="kwrd"&gt;PRIMARY&lt;/span&gt; &lt;span class="kwrd"&gt;KEY&lt;/span&gt; &lt;span class="kwrd"&gt;CLUSTERED&lt;/span&gt; &lt;br /&gt;(&lt;br /&gt;    [lab_result_id] &lt;span class="kwrd"&gt;ASC&lt;/span&gt;&lt;br /&gt;) &lt;span class="kwrd"&gt;ON&lt;/span&gt; [&lt;span class="kwrd"&gt;PRIMARY&lt;/span&gt;]&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;NONCLUSTERED&lt;/span&gt; &lt;span class="kwrd"&gt;INDEX&lt;/span&gt; [IX_lab_results_3] &lt;span class="kwrd"&gt;ON&lt;/span&gt; [dbo].[lab_results] &lt;br /&gt;(&lt;br /&gt;    [test_code] &lt;span class="kwrd"&gt;ASC&lt;/span&gt;,&lt;br /&gt;    [sample_date] &lt;span class="kwrd"&gt;ASC&lt;/span&gt;&lt;br /&gt;) &lt;span class="kwrd"&gt;ON&lt;/span&gt; [Secondary]&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;This table has approximately 18 million rows, and you need to get a count of test codes during each year. Anything prior to 1/1/2006 would be counted together. The data would look something like this&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/TCpLC0PjFlI/AAAAAAAAAqU/kRMAKzOqLuY/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_R-tbJU7CXwQ/TCpLDgwwydI/AAAAAAAAAqY/SsOaRrjldak/image_thumb%5B2%5D.png?imgmax=800" width="430" height="366" /&gt;&lt;/a&gt; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;Prior to SQL 2005, I would use a series of CASE statements to perform a count of each test code&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;strong&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; test_code&lt;br /&gt;      , &lt;span class="kwrd"&gt;SUM&lt;/span&gt;(&lt;span class="kwrd"&gt;CASE&lt;/span&gt; &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; DATEPART(yy, sample_date) = 2010 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 1 &lt;span class="kwrd"&gt;END&lt;/span&gt;) &lt;span class="kwrd"&gt;AS&lt;/span&gt; [2010]&lt;br /&gt;      , &lt;span class="kwrd"&gt;SUM&lt;/span&gt;(&lt;span class="kwrd"&gt;CASE&lt;/span&gt; &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; DATEPART(yy, sample_date) = 2009 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 1 &lt;span class="kwrd"&gt;END&lt;/span&gt;) &lt;span class="kwrd"&gt;AS&lt;/span&gt; [2009]&lt;br /&gt;      , &lt;span class="kwrd"&gt;SUM&lt;/span&gt;(&lt;span class="kwrd"&gt;CASE&lt;/span&gt; &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; DATEPART(yy, sample_date) = 2008 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 1 &lt;span class="kwrd"&gt;END&lt;/span&gt;) &lt;span class="kwrd"&gt;AS&lt;/span&gt; [2008]&lt;br /&gt;      , &lt;span class="kwrd"&gt;SUM&lt;/span&gt;(&lt;span class="kwrd"&gt;CASE&lt;/span&gt; &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; DATEPART(yy, sample_date) = 2007 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 1 &lt;span class="kwrd"&gt;END&lt;/span&gt;) &lt;span class="kwrd"&gt;AS&lt;/span&gt; [2007]&lt;br /&gt;      , &lt;span class="kwrd"&gt;SUM&lt;/span&gt;(&lt;span class="kwrd"&gt;CASE&lt;/span&gt; &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; DATEPART(yy, sample_date) = 2006 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 1 &lt;span class="kwrd"&gt;END&lt;/span&gt;) &lt;span class="kwrd"&gt;AS&lt;/span&gt; [2006]&lt;br /&gt;      , &lt;span class="kwrd"&gt;SUM&lt;/span&gt;(&lt;span class="kwrd"&gt;CASE&lt;/span&gt; &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; DATEPART(yy, sample_date) &amp;lt; 2006 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 1 &lt;span class="kwrd"&gt;END&lt;/span&gt;) &lt;span class="kwrd"&gt;AS&lt;/span&gt; [Pre2006]&lt;br /&gt;&lt;span class="kwrd"&gt;FROM&lt;/span&gt; lab_results&lt;br /&gt;&lt;span class="kwrd"&gt;GROUP&lt;/span&gt; &lt;span class="kwrd"&gt;BY&lt;/span&gt; test_code&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;Using the new (to SQL 2005 anyway) PIVOT keyword, I could rewrite the query like this&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;strong&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; test_code, [2010], [2009], [2008], [2007], [2006], [2005] &lt;span class="kwrd"&gt;AS&lt;/span&gt; Pre2006&lt;br /&gt;&lt;span class="kwrd"&gt;FROM&lt;/span&gt; &lt;br /&gt;(&lt;br /&gt;      &lt;span class="kwrd"&gt;SELECT&lt;/span&gt; test_code, sample_date&lt;br /&gt;      , &lt;span class="kwrd"&gt;CASE&lt;/span&gt; &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; DATEPART(yy, sample_date) &amp;lt; 2006 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 2005&lt;br /&gt;             &lt;span class="kwrd"&gt;ELSE&lt;/span&gt; DATEPART(yy, sample_date) &lt;br /&gt;        &lt;span class="kwrd"&gt;END&lt;/span&gt; &lt;span class="kwrd"&gt;AS&lt;/span&gt; LabResultYear &lt;br /&gt;      &lt;span class="kwrd"&gt;FROM&lt;/span&gt; lab_results&lt;br /&gt;) &lt;span class="kwrd"&gt;AS&lt;/span&gt; tmp&lt;br /&gt;PIVOT (&lt;span class="kwrd"&gt;COUNT&lt;/span&gt;(sample_date) &lt;span class="kwrd"&gt;FOR&lt;/span&gt; LabResultYear &lt;span class="kwrd"&gt;IN&lt;/span&gt; ([2010], [2009], [2008], [2007], [2006], [2005])) &lt;span class="kwrd"&gt;AS&lt;/span&gt; p;&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;But I was never looked at the execution plan before yesterday to see how each was run. So I finally did, and here’s what I saw. First the plan for the CASE statement…&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;a href="http://lh6.ggpht.com/_R-tbJU7CXwQ/TCpLEObzjgI/AAAAAAAAAqc/MCN-r1suwRQ/s1600-h/image%5B10%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/TCpLE2tkF-I/AAAAAAAAAqg/CrSRpErL644/image_thumb%5B6%5D.png?imgmax=800" width="642" height="442" /&gt;&lt;/a&gt; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;…and then the plan for the PIVOT example.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt; &lt;a href="http://lh4.ggpht.com/_R-tbJU7CXwQ/TCpLFcwYm4I/AAAAAAAAAqk/Vw4ULVOjQvs/s1600-h/image%5B15%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/TCpLF5JQzLI/AAAAAAAAAqo/mZiSTyeC6eM/image_thumb%5B9%5D.png?imgmax=800" width="648" height="398" /&gt;&lt;/a&gt; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;At first glance they seem identical. Both are using the same operators and both are using an index seek on the non-clustered index. However there are small differences. The CASE statement completes 2 seconds faster than the PIVOT query, 45 seconds to 47. The index seek,while having an overall higher percentage of the whole, has the same operator costs as the PIVOT. The difference shows in the Stream Aggregate operator. The CASE operator is 10.8, which is 10% of the whole query. In the PIVOT example, the Stream Aggregate is 18% of the whole, and the operator cost is 19.8.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One other point about the PIVOT keyword. If you compare my code snippets to the screenshots of the executions, you’ll notice that I’m actually running against the master database and using a fully qualified name. If I ran it directly against the database where the table lives it would fail. Why? because that database, while running in on a SQL 2005 server, is still at compatibility level 7 (I know,I know). It doesn’t work unless you’re at level 9 or higher.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8357923625122248064?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8357923625122248064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8357923625122248064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8357923625122248064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8357923625122248064'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/06/pivot-compared-to-case-for-crosstab.html' title='PIVOT compared to CASE for a crosstab result'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_R-tbJU7CXwQ/TCpLDgwwydI/AAAAAAAAAqY/SsOaRrjldak/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4275616055010256131</id><published>2010-06-28T08:29:00.001-05:00</published><updated>2010-06-28T08:29:00.090-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Report Server issues</title><content type='html'>&lt;p&gt;I’ve had a lot of Report Server issues in the last few months. I thought we solved it once, only to see it come up again in a slightly different way. But I think I can put it all to bed now.&lt;/p&gt;  &lt;p&gt;The first time was a few months ago, right when I left on vacation (isn’t that always the way?). The C drive on one of our reporting servers began to run out of space, filling up 6 – 8 GB in a matter of hours.&lt;/p&gt;  &lt;p&gt;Before I get too far ahead of myself, let me describe our layout. We have four regional databases running SQL 2005 Standard Edition, each with data for that region. Two regions are in our corporate headquarters, the other two are in my office. We also have two SQL 2008 Standard Edition servers that run in a virtual environment, one in each datacenter. The reports hosted on each reporting center are identical except for their data sources; the corporate report server fetches data from the two corporate databases, and the local server does the same. The issue we had was on the server in the corporate datacenter.&lt;/p&gt;  &lt;p&gt;Our first step was to check the temp files. We noticed a few small files and one massive, 8 GB file that we couldn’t delete without stopping and restarting the report service. A few hours later the massive file reappeared. All of these temp files were prefixed “RSTemp_”.&lt;/p&gt;  &lt;p&gt;We moved the location of the temp files to a larger drive to give us more time before the largest temp file grew too large. By default the location is on C:\Program Files\Microsoft SQL Server\MSRS10.&amp;lt;&amp;lt;Instance Name&amp;gt;&amp;gt;\Reporting Services. You can change it by modifying the rsreportserver.config file and adding the entry to the &amp;lt;Service&amp;gt; tag:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Service&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;      ---&lt;br /&gt;        &lt;strong&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;span class="html"&gt;FileShareStorageLocation&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Path&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;I:\RSTempFiles&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Path&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;FileShareStorageLocation&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Service&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That gave us extra space, but it didn’t solve the issue. A little more digging showed that we had a long running report that was also getting bad data. The query for the report was looking for a scalar value but was returning multiples. The query was also a long running query. What we found was happening was that the report execution was timing out, but the query was still active. The user didn’t see the timeout and constantly tried to re-run the report. Consequently this report was continuously paged out to disk, and it never died. Once we cleaned up the data and fixed the reports query, the problem hasn’t reappeared.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The next issue was related to performance. We noticed at certain times of day the report server would get really sluggish. Reports that would complete in 10 seconds would now take 10 minutes. Looking at the server resources showed no increase in CPU, IO, or memory usage. We didn’t see a repeat of the super-big temp file, though there was an increase in the number of temp files.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;A little more investigation showed that, when the performance began to degrade, there were locks being held by one process clearing the sessions that blocked another process that was writing session data. We were finally able to track this to a third party application we use to monitor performance. It didn’t look like the software was configured properly.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In investigating both of these issues we looked at the data in the ExecutionLogStorage table in the ReportServer database. If you’re not familiar with this table, you should check out Robert Bruckner’s excellent post on &lt;a href="http://blogs.msdn.com/b/robertbruckner/archive/2009/01/05/executionlog2-view.aspx" target="_blank"&gt;ExecutionLog2 View - Analyzing and Optimizing Reports&lt;/a&gt;. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In the first issue, we were able to identify the report by seeing the pagination values in the additional information data. In the second, we could spot when the slowness would begin by seeing the TimeProcessing values rise.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4275616055010256131?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4275616055010256131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4275616055010256131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4275616055010256131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4275616055010256131'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/06/report-server-issues.html' title='Report Server issues'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1959129850139314814</id><published>2010-05-14T08:23:00.000-05:00</published><updated>2010-05-14T08:23:44.466-05:00</updated><title type='text'>Catching up</title><content type='html'>Nothing SQL related in this post, just clearing my mind and catching up.&lt;br /&gt;&lt;br /&gt;First, my laptop went kablooie a few weeks back. I've been using a Pavilion TX 2000 that I ordered custom from HP for the past few years. I chose this model because I wanted a computer that could run the old Tablet XP OS, and I loved the swivel top that let me use it as either a notepad or as a full blown laptop (Apple, you need to add the ability to write on the iPad). Anyway, a few weeks ago my pc wouldn't boot at all, just kept giving me a black screen. I couldn't even get to the BIOS screen or boot from a CD. Luckily I had also bought an extended warranty that was still in effect. So, after opening a ticket with HP, I shipped the unit back to them, and they had it back to me about 10 days later. I was without the laptop for about 2 1/2 weeks, of which 1 was vacation time anyway. And not counting the week between when the unit first went bad and I shipped it back, I hardly missed it.&lt;br /&gt;&lt;br /&gt;But I did miss it. I work mostly on my laptop at work and on my commute. This is my lab, where I can install my own programs and other beta apps. It's also the machine I blog from, mostly while on my commute. So it's good to have it back. I'm just finishing installing SQL 2008 R2, VS 2010, and Office 2010. I should be good to go by the time I go back to work on Monday.&lt;br /&gt;&lt;br /&gt;Speaking about work, I did mention that I'm just finishing up a two-week vacation. The first week my wife and I took a cruise to the Mexican Riviera. We had a wonderful time. Perfect weather, great scenery, wonderful people. I'd like to go back soon and see some of the sights we missed this time around. This second week is just relaxing, doing yard work, mostly taking it easy. &lt;br /&gt;&lt;br /&gt;Next week I'll write about an issue I ran across with our report server just before I left.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1959129850139314814?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1959129850139314814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1959129850139314814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1959129850139314814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1959129850139314814'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/05/catching-up.html' title='Catching up'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5890547123931153214</id><published>2010-04-15T21:36:00.001-05:00</published><updated>2010-04-15T21:36:13.631-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What I Learned'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>What I learned tonight – tempdb size when SQL starts</title><content type='html'>&lt;p&gt;I went to the April monthly meeting of the &lt;a href="http://chicago.sqlpass.org/" target="_blank"&gt;Chicago SQL Server User Group&lt;/a&gt; tonight to see Brad McGehee (&lt;a href="http://www.bradmcgehee.com/" target="_blank"&gt;Blog&lt;/a&gt; | &lt;a href="http://twitter.com/bradmcgehee" target="_blank"&gt;Twitter&lt;/a&gt;). Brad’s in town to present at &lt;a href="http://www.sqlsaturday.com/31/eventhome.aspx" target="_blank"&gt;SQLSaturday # 31&lt;/a&gt; in Chicago and he also gave a talk to us tonight on optimizing tempdb performance.&lt;/p&gt;  &lt;p&gt;It was a good session because it went over tempdb and best practices. Most of the information I already knew but it’s always good to hear it again, even as a refresher. And there’s usually something I took for granted but was wrong about. And tonight was no exception.&lt;/p&gt;  &lt;p&gt;I knew that the data and log files for tempdb are recreated when the SQL service starts. But I thought that tempdb got it’s db options from the model database. For instance, if the model database is set at 2 MB for the data and 1 MB for the log then tempdb would inherit those same settings. But i was wrong. As Brad mentioned tonight, tempdb starts out as 8 MB for the data and the log file is 1 MB. On my laptop its’s actually 512 KB but maybe I heard him wrong.&lt;/p&gt;  &lt;p&gt;Anyway, to properly resize tempdb you should run the ALTER DATABASE command…&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;USE&lt;/span&gt; master;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; tempdb &lt;br /&gt;&lt;span class="kwrd"&gt;MODIFY&lt;/span&gt; &lt;span class="kwrd"&gt;FILE&lt;/span&gt; ( NAME = &lt;span class="str"&gt;'tempdev'&lt;/span&gt;, &lt;span class="kwrd"&gt;SIZE&lt;/span&gt; = 25600KB , FILEGROWTH = 5120KB );&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; tempdb &lt;br /&gt;&lt;span class="kwrd"&gt;MODIFY&lt;/span&gt; &lt;span class="kwrd"&gt;FILE&lt;/span&gt; ( NAME = &lt;span class="str"&gt;'templog'&lt;/span&gt;, &lt;span class="kwrd"&gt;SIZE&lt;/span&gt; = 2048KB , FILEGROWTH = 1024KB );&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;…and tempdb will be correctly resized after every restart. And you’ve heard that you should create multiple tempdb files depending on the number of CPU’s you have? Well, just do that at the same time. Here I’m renaming, moving, resizing, and adding a file to tempdb;&amp;#160; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;USE&lt;/span&gt; master;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; tempdb &lt;br /&gt;&lt;span class="kwrd"&gt;MODIFY&lt;/span&gt; &lt;span class="kwrd"&gt;FILE&lt;/span&gt; (NAME = &lt;span class="str"&gt;'tempdev'&lt;/span&gt;, NEWNAME = &lt;span class="str"&gt;'tempdev1'&lt;/span&gt;, FILENAME = &lt;span class="str"&gt;'C:\SQL2008\DATA\tempdev1.mdf'&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; tempdb &lt;br /&gt;&lt;span class="kwrd"&gt;MODIFY&lt;/span&gt; &lt;span class="kwrd"&gt;FILE&lt;/span&gt; (NAME = &lt;span class="str"&gt;'templog'&lt;/span&gt;, FILENAME = &lt;span class="str"&gt;'C:\SQL2008\DATA\templog.ldf'&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; tempdb &lt;br /&gt;&lt;span class="kwrd"&gt;MODIFY&lt;/span&gt; &lt;span class="kwrd"&gt;FILE&lt;/span&gt; (NAME = &lt;span class="str"&gt;'tempdev1'&lt;/span&gt;, &lt;span class="kwrd"&gt;SIZE&lt;/span&gt; = 25600KB , FILEGROWTH = 5120KB);&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; tempdb &lt;br /&gt;&lt;span class="kwrd"&gt;MODIFY&lt;/span&gt; &lt;span class="kwrd"&gt;FILE&lt;/span&gt; (NAME = &lt;span class="str"&gt;'templog'&lt;/span&gt;, &lt;span class="kwrd"&gt;SIZE&lt;/span&gt; = 2048KB , FILEGROWTH = 1024KB);&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;DATABASE&lt;/span&gt; tempdb &lt;br /&gt;&lt;span class="kwrd"&gt;ADD&lt;/span&gt; &lt;span class="kwrd"&gt;FILE&lt;/span&gt; (NAME = &lt;span class="str"&gt;'tempdev2'&lt;/span&gt;, &lt;br /&gt;          FILENAME = &lt;span class="str"&gt;'C:\SQL2008\DATA\tempdev2.ndf'&lt;/span&gt;, &lt;br /&gt;          &lt;span class="kwrd"&gt;SIZE&lt;/span&gt; = 25600KB , FILEGROWTH = 5120KB);&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The usual disclaimers go here. Don’t use this script without understanding it as it can screw up your server. Don’t use it in production until you’ve testes it.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And I’ll leave the discussion of multiple tempdb files for now.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5890547123931153214?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5890547123931153214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5890547123931153214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5890547123931153214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5890547123931153214'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/04/what-i-learned-tonight-tempdb-size-when.html' title='What I learned tonight – tempdb size when SQL starts'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8144457751763810186</id><published>2010-04-13T09:11:00.001-05:00</published><updated>2010-04-13T09:11:10.539-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL error log finds all copies of resource db after moving db</title><content type='html'>&lt;p&gt;Just a short post about something interesting I saw in the SQL error log a while back.&lt;/p&gt;  &lt;p&gt;A while ago, I moved the system databases off the C drive’s of our servers to another drive on the SAN. That included moving the resource database. You can read Microsoft’s recommendations on moving system db’s on &lt;a href="http://msdn.microsoft.com/en-us/library/ms345408.aspx" target="_blank"&gt;MSDN&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Anyway, I copied the mssqlsystemresource.mdf and mssqlsystemresource.ldf files to a backup location in case of an emergency. But only one database was attached.&amp;#160; &lt;/p&gt;  &lt;p&gt;This interesting entry in the SQL error log was after I restarted the server:   &lt;br /&gt;    &lt;br /&gt;&lt;em&gt;&lt;strong&gt;The resource database has been detected in two different locations. Attaching the resource database in the same directory as the master database at 'O:\SQL2005\DATA\master.mdf' instead of the currently attached resource database at 'O:\SQL2005\Data\mssqlsystemresource.mdf'.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;So, SQL saw both the attached db and the unattached backup copy when I restarted the service. The only time I saw the message was the first reboot, not any subsequent restarts. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8144457751763810186?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8144457751763810186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8144457751763810186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8144457751763810186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8144457751763810186'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/04/sql-error-log-finds-all-copies-of.html' title='SQL error log finds all copies of resource db after moving db'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7018413271816402305</id><published>2010-03-24T18:17:00.001-05:00</published><updated>2010-03-24T18:17:46.547-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Using the Inserted and Deleted tables outside of a trigger</title><content type='html'>&lt;p&gt;Just a simple little post about a conversation about triggers I had earlier today with a developer, specifically using them to audit update and delete statements against a table. During our talk I mentioned that, starting in SQL 2005, the inserted and deleted tables were available outside of a trigger. He wasn’t aware of that until I mentioned it. So, for anyone else who’s not familiar with the inserted and deleted tables, here’s a little summary.&lt;/p&gt;  &lt;p&gt;Briefly, when you insert, update, or delete records from a table, SQL stores those records in a virtual table; inserted for inserts and deleted for updates and deletes. These tables are available inside of table triggers. Microsoft SQL &lt;a href="http://msdn.microsoft.com/en-us/library/ms191300(SQL.90).aspx" target="_blank"&gt;Books Online&lt;/a&gt; has an article explaining the use of the inserted and deleted tables inside of triggers; read that first as a refresher. In our shop we use them for monitoring who is updating and deleting certain critical tables, and we can roll back changes if necessary.&amp;#160; &lt;/p&gt;  &lt;p&gt;Starting with SQL 2005, you can use the OUTPUT clause to access the inserted and deleted tables outside of DML triggers. You can read the article in &lt;a href="http://msdn.microsoft.com/en-us/library/ms177564(SQL.90).aspx" target="_blank"&gt;Books On Line&lt;/a&gt;.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Here’s a simple demo script to run. I added a primary key and a non nullable column to show what happens in error conditions.&amp;#160; &lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;USE&lt;/span&gt; tempdb;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; NOCOUNT &lt;span class="kwrd"&gt;ON&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;-- Create a testing table&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;USE&lt;/span&gt; [tempdb]&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;IF&lt;/span&gt;  &lt;span class="kwrd"&gt;EXISTS&lt;/span&gt; (&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; sys.objects &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; object_id = OBJECT_ID(N&lt;span class="str"&gt;'[dbo].[TestOutput]'&lt;/span&gt;) &lt;span class="kwrd"&gt;AND&lt;/span&gt; type &lt;span class="kwrd"&gt;in&lt;/span&gt; (N&lt;span class="str"&gt;'U'&lt;/span&gt;))&lt;br /&gt;&lt;span class="kwrd"&gt;DROP&lt;/span&gt; &lt;span class="kwrd"&gt;TABLE&lt;/span&gt; [dbo].[TestOutput]&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;USE&lt;/span&gt; [tempdb]&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;TABLE&lt;/span&gt; [dbo].[TestOutput](&lt;br /&gt;    [Field1] [&lt;span class="kwrd"&gt;int&lt;/span&gt;] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [Field2] [&lt;span class="kwrd"&gt;char&lt;/span&gt;](1) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    &lt;span class="kwrd"&gt;CONSTRAINT&lt;/span&gt; [PK_TestOutput] &lt;span class="kwrd"&gt;PRIMARY&lt;/span&gt; &lt;span class="kwrd"&gt;KEY&lt;/span&gt; &lt;span class="kwrd"&gt;CLUSTERED&lt;/span&gt; &lt;br /&gt;    (&lt;br /&gt;       [Field1] &lt;span class="kwrd"&gt;ASC&lt;/span&gt;&lt;br /&gt;    )&lt;span class="kwrd"&gt;ON&lt;/span&gt; [&lt;span class="kwrd"&gt;PRIMARY&lt;/span&gt;]&lt;br /&gt;) &lt;span class="kwrd"&gt;ON&lt;/span&gt; [&lt;span class="kwrd"&gt;PRIMARY&lt;/span&gt;]&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;--Testing &lt;span class="kwrd"&gt;of&lt;/span&gt; Outupt &lt;span class="kwrd"&gt;statement&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;DECLARE&lt;/span&gt; @TestOutput_Audit &lt;span class="kwrd"&gt;TABLE&lt;/span&gt;&lt;br /&gt;(&lt;br /&gt;      Field1        &lt;span class="kwrd"&gt;INT&lt;/span&gt;,&lt;br /&gt;      Field2        &lt;span class="kwrd"&gt;CHAR&lt;/span&gt;(1),&lt;br /&gt;      [&lt;span class="kwrd"&gt;Action&lt;/span&gt;]        &lt;span class="kwrd"&gt;CHAR&lt;/span&gt;(1),&lt;br /&gt;      Action_by        &lt;span class="kwrd"&gt;VARCHAR&lt;/span&gt;(25),&lt;br /&gt;      Action_Date    DATETIME&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;-- Testing Insert&lt;/span&gt;&lt;br /&gt;INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; TestOutput (Field1, Field2)&lt;br /&gt;&lt;span class="kwrd"&gt;OUTPUT&lt;/span&gt; inserted.Field1, inserted.Field2, &lt;span class="str"&gt;'I'&lt;/span&gt;, SUSER_NAME(), GETDATE()&lt;br /&gt;&lt;span class="kwrd"&gt;INTO&lt;/span&gt; @TestOutput_Audit (Field1, Field2, [&lt;span class="kwrd"&gt;Action&lt;/span&gt;],Action_by, Action_Date)&lt;br /&gt;&lt;span class="kwrd"&gt;VALUES&lt;/span&gt; (1, &lt;span class="str"&gt;'A'&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;INSERT &lt;span class="kwrd"&gt;INTO&lt;/span&gt; TestOutput (Field1, Field2)&lt;br /&gt;&lt;span class="kwrd"&gt;OUTPUT&lt;/span&gt; inserted.Field1, inserted.Field2, &lt;span class="str"&gt;'I'&lt;/span&gt;, SUSER_NAME(), GETDATE()&lt;br /&gt;&lt;span class="kwrd"&gt;INTO&lt;/span&gt; @TestOutput_Audit (Field1, Field2, [&lt;span class="kwrd"&gt;Action&lt;/span&gt;],Action_by, Action_Date)&lt;br /&gt;&lt;span class="kwrd"&gt;VALUES&lt;/span&gt; (1, &lt;span class="str"&gt;'A'&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; TestOutput&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; @TestOutput_Audit&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;-- Testing Update&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;UPDATE&lt;/span&gt; TestOutput&lt;br /&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; Field2 = &lt;span class="str"&gt;'B'&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;OUTPUT&lt;/span&gt; deleted.Field1, deleted.Field2, &lt;span class="str"&gt;'U'&lt;/span&gt;, SUSER_NAME(), GETDATE()&lt;br /&gt;&lt;span class="kwrd"&gt;INTO&lt;/span&gt; @TestOutput_Audit (Field1, Field2, [&lt;span class="kwrd"&gt;Action&lt;/span&gt;],Action_by, Action_Date)&lt;br /&gt;&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; Field1 = 1&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;UPDATE&lt;/span&gt; TestOutput&lt;br /&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; Field2 = &lt;span class="kwrd"&gt;NULL&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;OUTPUT&lt;/span&gt; deleted.Field1, deleted.Field2, &lt;span class="str"&gt;'U'&lt;/span&gt;, SUSER_NAME(), GETDATE()&lt;br /&gt;&lt;span class="kwrd"&gt;INTO&lt;/span&gt; @TestOutput_Audit (Field1, Field2, [&lt;span class="kwrd"&gt;Action&lt;/span&gt;],Action_by, Action_Date)&lt;br /&gt;&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; Field1 = 1&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; TestOutput&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; @TestOutput_Audit&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;-- Testing Delete&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;DELETE&lt;/span&gt; TestOutput&lt;br /&gt;&lt;span class="kwrd"&gt;OUTPUT&lt;/span&gt; deleted.Field1, deleted.Field2, &lt;span class="str"&gt;'D'&lt;/span&gt;, SUSER_NAME(), GETDATE()&lt;br /&gt;&lt;span class="kwrd"&gt;INTO&lt;/span&gt; @TestOutput_Audit (Field1, Field2, [&lt;span class="kwrd"&gt;Action&lt;/span&gt;],Action_by, Action_Date)&lt;br /&gt;&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; Field1 = 1&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; TestOutput&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; * &lt;span class="kwrd"&gt;FROM&lt;/span&gt; @TestOutput_Audit&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;The INSERT statement simply inserts a single record into my table. Afterwards you can see the same record in the table as well as my audit table. The second record wasn’t added to either table because it’s a primary key violation.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Msg 2627, Level 14, State 1, Line 18 &lt;br /&gt;      &lt;br /&gt;Violation of PRIMARY KEY constraint 'PK_TestOutput'. Cannot insert duplicate key in object 'dbo.TestOutput'. &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;The statement has been terminated.&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Field1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Field2 &lt;br /&gt;    &lt;br /&gt;----------- ------ &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A &lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Field1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Field2 Action Action_by&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Action_Date &lt;br /&gt;    &lt;br /&gt;----------- ------ ------ ------------------------- ----------------------- &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; I&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; PERTELLT3\John&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2010-03-24 17:58:03.407&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I make a simple UPDATE. Now the table shows the update and the audit shows the value before the update took place. The second update fails because Field2 doesn’t allow NULL values; the main record isn’t updated nor added to the audit table. &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Msg 515, Level 16, State 2, Line 33 &lt;br /&gt;      &lt;br /&gt;Cannot insert the value NULL into column 'Field2', table 'tempdb.dbo.TestOutput'; column does not allow nulls. UPDATE fails. &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;The statement has been terminated.&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Field1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Field2 &lt;br /&gt;    &lt;br /&gt;----------- ------ &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; B &lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Field1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Field2 Action Action_by&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Action_Date &lt;br /&gt;    &lt;br /&gt;----------- ------ ------ ------------------------- ----------------------- &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; I&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; PERTELLT3\John&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2010-03-24 17:58:03.407 &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; U&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; PERTELLT3\John&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2010-03-24 17:58:03.413&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Finally, when I delete the record I can see the record is gone from the main table but stored in the audit table.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Field1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Field2 &lt;br /&gt;    &lt;br /&gt;----------- ------ &lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Field1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Field2 Action Action_by&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Action_Date &lt;br /&gt;    &lt;br /&gt;----------- ------ ------ ------------------------- ----------------------- &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; I&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; PERTELLT3\John&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2010-03-24 17:58:03.407 &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; U&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; PERTELLT3\John&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2010-03-24 17:58:03.413 &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; B&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; D&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; PERTELLT3\John&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 2010-03-24 17:58:03.413&lt;/strong&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7018413271816402305?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7018413271816402305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7018413271816402305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7018413271816402305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7018413271816402305'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/03/using-inserted-and-deleted-tables.html' title='Using the Inserted and Deleted tables outside of a trigger'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5051430962155235547</id><published>2010-03-22T09:10:00.001-05:00</published><updated>2010-03-22T09:10:30.644-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Training'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><category scheme='http://www.blogger.com/atom/ns#' term='70-448'/><title type='text'>Taking 70-448 SQL BI Exam</title><content type='html'>&lt;p&gt;One of my goals has been to learn Microsoft’s SQL Business Intelligence stack. I’ve been reading different books, blogs and whitepapers to learn as much as I can, but I wasn’t very structured in my approach. While I picked up lots of new information and tips, I felt I was spinning my wheels. And I keep getting sidetracked with work projects and learning the basics of other new technologies.&lt;/p&gt;  &lt;p&gt;I’ve been successful in the past with Microsoft certifications. Beginning way back in the SQL 7 days, I took and passed exams to achieve MCP, MCDBA, and MCSD status. I also took and passed SQL 2005 Database Administrator and Database Developer exams a few years back. &lt;/p&gt;  &lt;p&gt;I’ve been pretty involved with Reporting Services since it first came out as an add on to SQL 2000. But I’ve only played around briefly with the old DTS and newer Integration Services. And I’ve never even opened an Analysis Services database. So overall I have a long way to go.&lt;/p&gt;  &lt;p&gt;So I’ve settled on a method that I believe will help me. I’ve decided to take the 70-448 exam, Microsoft SQL Server 2008 – Business Intelligence Development and Maintenance. I feel by studying for this specific exam I’ll get a head start on learning BI. I know I’m not going to learn everything there is about BI with one exam, but it should give me enough background to go ahead and finish up on my own. And setting a goal of passing 70-448 will, hopefully, keep me on track. &lt;/p&gt;  &lt;p&gt;Now when I took other exams I also struggled to keep to my studies. It was only when I actually scheduled the exam that I really sat down and concentrated. I’m not going to do that just yet. For the SQL 2005 exams I passed I knew enough that I could get by with using only the Microsoft Press Training Kits. I don’t feel anywhere near that comfortable with 70-448. But I’m still going to set a date. Today is Monday, March 22, 2010. I’m going to give myself just over 6 months to take and pass this exam. I’ll schedule the test on August 22nd, and I will pass the test by October 1st. That will also give me a little leeway if I fail the first time.&lt;/p&gt;  &lt;p&gt;I plan on blogging on my progress for 3 reasons. First, if I write about it, it will help me understand the concept better. As someone once said, you don’t understand a concept until you can explain it to your mother. Second, it should keep me on schedule. I don’t want to get to October 1st and admit publically that I didn’t take the test. And third, it will act as a study group for others who also want to take 70-448. The more the merrier. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I’ve only got a few resources so far. I’ll add to this list as I go.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.com/Knights-24-Hour-Trainer-Integration-Programmer/dp/0470496924/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1269266393&amp;amp;sr=1-1" target="_blank"&gt;&lt;img alt="MCTS Self-Paced Training Kit (Exam 70-448): Microsoft SQL Server 2008-Business Intelligence Development and Maintenance: MCTS Exam 70-448 (Self-Paced Training Kits)" src="http://ecx.images-amazon.com/images/I/51jpFQ%2BwbGL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The first is the Microsoft Press 70-448 Training Kit, written by Eric Veerman, Teo Lachev, and Dejan Sarka of Solid Quality Mentors. I’ve always liked the MS Press TK’s. They come with practice exams, as well as a coupon for 15% your test.&lt;/p&gt;  &lt;p&gt;&lt;img alt="Knight&amp;#39;s 24-Hour Trainer: Microsoft SQL Server 2008 Integration Services (Wrox Programmer to Programmer)" src="http://ecx.images-amazon.com/images/I/51yYrPAZe%2BL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;The second book I’ll be using is Knight’s 24-Hour Trainer, published by Wrox and written by Brian Knight, Devin Knight, and Mike Davis. I chose this book because it includes a CD that contains videos of the lessons.&lt;/p&gt;  &lt;p&gt;There will be more resources listed later, as I progress towards my personal D-Day. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5051430962155235547?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5051430962155235547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5051430962155235547' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5051430962155235547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5051430962155235547'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/03/taking-70-448-sql-bi-exam.html' title='Taking 70-448 SQL BI Exam'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-2494442037463226534</id><published>2010-03-16T14:10:00.003-05:00</published><updated>2010-03-17T07:02:45.542-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='PowerShell'/><title type='text'>PowerShell and SQL</title><content type='html'>&lt;p&gt;When PowerShell was first released a few years back I wasn’t too excited. I didn’t use scripting very much, mainly for cleaning out old backup files from our archived storage. I thought that using VBScript would suffice for my limited means. But I started reading up on PowerShell V1, even tinkering around with it a bit. However learning PowerShell soon dropped down on my “Must Learn” technologies. There was just too many other things being introduced.&lt;/p&gt;&lt;p&gt;My mind didn’t change much when PowerShell V2 was in beta. Then Microsoft told us how PowerShell was going to be integrated into SQL Server 2008 (among other products) and PowerShell began moving back up my list. I’d read articled on MSDN and blogs by SQL experts, but my thinking never really changed. I figured that PowerShell was just one more way of doing things I already did in other ways.&lt;/p&gt;&lt;p&gt;One of the items on my “To Do” list has always been to document the servers I’m responsible for. I toyed with different methods of gathering the information, from running SSIS packages to a central repository to executing T-SQL queries in a Reporting Service report to manually (and tediously) typing the data into Word docs.&lt;/p&gt;&lt;p&gt;Then I read an article by Edwin Sarmiento on &lt;a href="http://www.mssqltips.com/author.asp?authorid=18" target="_blank"&gt;MSSQL Tips&lt;/a&gt;. In his article, he gave an example of using SMO inside PowerShell to write the information to an Excel spreadsheet. Finally the light bulb went on; I could use PowerShell to create my Run Book!&lt;/p&gt;&lt;p&gt;Now I’m not going to go into an in-depth explanation on PowerShell, or SMO. There’s ton’s of information available, and they explain much clearer than I can. I’m still learning myself. Check out Allen White (&lt;a href="http://sqlblog.com/blogs/allen_white/default.aspx" target="_blank"&gt;blog&lt;/a&gt;), Buck Woody (&lt;a href="http://blogs.msdn.com/buckwoody/default.aspx" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="http://twitter.com/buckwoody" target="_blank"&gt;twitter&lt;/a&gt;), Aaron Nelson (&lt;a href="http://sqlvariant.com/wordpress/" target="_blank"&gt;blog&lt;/a&gt; | &lt;a href="http://twitter.com/SQLvariant" target="_blank"&gt;twitter&lt;/a&gt;) and many others that I’m not mentioning here. I just wanted to share the method I’m beginning to use. It’s still evolving as I learn new tricks.&lt;/p&gt;&lt;p&gt;The basis of my script was the one used by Edwin Sarmiento in this &lt;a href="http://www.mssqltips.com/tip.asp?tip=1759" target="_blank"&gt;article&lt;/a&gt;. I’ve added a few things of my own to make it more like what I want. For instance I add server information as well as database information. And I put each server onto a different worksheet.&amp;#160; &lt;/p&gt;&lt;p&gt;The first thing my script does is to load the SMO namespace. After that I use the Get-Credential cmdlet to get an account to connect to the servers (I won’t always be connecting with Windows Authentication), create an Excel object and get a list of servers from a text file. After that I make sure that there’s enough worksheets in the workbook for all servers listed. Since a new Excel workbook has 3 worksheets by default I start my loop at 4. &lt;/p&gt;&lt;pre class="csharpcode"&gt;#Get list of servers &lt;br /&gt;$srvlist = @(get-content &lt;span class="str"&gt;&amp;quot;.\SQL_Servers.txt&amp;quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;#Counter variable &lt;span class="kwrd"&gt;for&lt;/span&gt; rows&lt;br /&gt;$c = $srvlist.Count &lt;br /&gt;$intRow = 1&lt;br /&gt;&lt;br /&gt;#Verify there's a sheet &lt;span class="kwrd"&gt;in&lt;/span&gt; the workbook &lt;span class="kwrd"&gt;for&lt;/span&gt; each server &lt;br /&gt;&lt;span class="kwrd"&gt;for&lt;/span&gt; ($i = 4; $i -le $c; $i++) &lt;br /&gt;{&lt;br /&gt;$Workbook.Sheets.Add() &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Then it’s just a matter of looping through the servers and databases, writing the values to the workbooks and applying formatting. My final step is to rename each sheet.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;$name = $instance -replace(&lt;span class="str"&gt;&amp;quot;\\&amp;quot;, &amp;quot;&lt;/span&gt;-&amp;quot;)&lt;br /&gt;$Sheet.Name = $name&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Here’s an example of what one of my sheets looks like…&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/S5_Xt9vuDZI/AAAAAAAAAqI/Jv0EkRmZnEA/s1600-h/image4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/S5_XvuIsTgI/AAAAAAAAAqM/ufJq4sQA1NY/image_thumb2.png?imgmax=800" width="708" height="436" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;…and here’s the whole script. For this example I stopped at 7 columns so it would all show on the screen without scrolling. But my final script will show more information about both the servers and the databases.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="preproc"&gt;#region&lt;/span&gt; LoadAssemblies&lt;br /&gt;[System.Reflection.Assembly]::LoadWithPartialName(&lt;span class="str"&gt;'Microsoft.SqlServer.SMO'&lt;/span&gt;) | &lt;span class="kwrd"&gt;out&lt;/span&gt;-&lt;span class="kwrd"&gt;null&lt;/span&gt;&lt;br /&gt;&lt;span class="preproc"&gt;#endregion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#Get SQL account information&lt;br /&gt;$credential = Get-Credential&lt;br /&gt;$loginName = $credential.UserName -replace(&lt;span class="str"&gt;&amp;quot;\\&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class="str"&gt;&amp;quot;)&amp;#160;&amp;#160; $password = $credential.Password&lt;br /&gt;&lt;br /&gt;$Excel = New-Object -ComObject Excel.Application&lt;br /&gt;$Excel.visible = $False&lt;br /&gt;$Workbook = $Excel.Workbooks.Add()&lt;br /&gt;&lt;br /&gt;#Get list of servers &lt;br /&gt;$srvlist = @(get-content &amp;quot;&lt;/span&gt;.\SQL_Servers.txt&lt;span class="str"&gt;&amp;quot;)&lt;br /&gt;&lt;br /&gt;#Counter variable for rows&lt;br /&gt;$c = $srvlist.Count &lt;br /&gt;$intRow = 1&lt;br /&gt;&lt;br /&gt;#Verify there's a sheet in the workbook for each server &lt;br /&gt;for ($i = 4; $i -le $c; $i++) &lt;br /&gt;{&lt;br /&gt;$Workbook.Sheets.Add() &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$a = 1&lt;br /&gt;#Read thru the contents of the SQL_Servers.txt file&lt;br /&gt;foreach ($instance in $srvlist) &lt;br /&gt;{&lt;br /&gt;$Sheet = $Workbook.Worksheets.Item($a) &lt;br /&gt;$srv = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $instance&lt;br /&gt;$srv.ConnectionContext.LoginSecure = $false&lt;br /&gt;$srv.ConnectionContext.set_Login($loginName)&lt;br /&gt;$srv.ConnectionContext.set_SecurePassword($password)    &lt;br /&gt;#set headers&lt;br /&gt;$Sheet.Cells.Item($intRow,1) = &amp;quot;&lt;/span&gt;INSTANCE NAME:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,1).Font.Bold = $True&lt;br /&gt;$Sheet.Cells.Item($intRow,2) = $instance&lt;br /&gt;$Sheet.Cells.Item($intRow,2).Font.Bold = $True&lt;br /&gt;$intRow += 1&lt;br /&gt;$Sheet.Cells.Item($intRow,1) = &amp;quot;&lt;/span&gt;VERSION:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,2) = &amp;quot;&lt;/span&gt;EDITION:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,3) = &amp;quot;&lt;/span&gt;COLLATION:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,4) = &amp;quot;&lt;/span&gt;OS VERSION:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,5) = &amp;quot;&lt;/span&gt;PLATFORM:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,6) = &amp;quot;&lt;/span&gt;PHYS MEM:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,7) = &amp;quot;&lt;/span&gt;NUM CPU:&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;for ($col = 1; $col –le 7; $col++)&lt;br /&gt;{&lt;br /&gt;$Sheet.Cells.Item($intRow,$col).Font.Bold = $True&lt;br /&gt;$Sheet.Cells.Item($intRow,$col).Interior.ColorIndex = 48&lt;br /&gt;$Sheet.Cells.Item($intRow,$col).Font.ColorIndex = 34&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#get values&lt;br /&gt;$intRow += 1&lt;br /&gt;&lt;br /&gt;$Sheet.Cells.Item($intRow,1) = $srv.Information.Version &lt;br /&gt;$Sheet.Cells.Item($intRow,2) = $srv.Information.Edition&lt;br /&gt;$Sheet.Cells.Item($intRow,3) = $srv.Information.Collation&lt;br /&gt;$Sheet.Cells.Item($intRow,4) = $srv.Information.OSVersion&lt;br /&gt;$Sheet.Cells.Item($intRow,5) = $srv.Information.Platform&lt;br /&gt;$Sheet.Cells.Item($intRow,6) = $srv.Information.PhysicalMemory&lt;br /&gt;$Sheet.Cells.Item($intRow,7) = $srv.Information.Processors&lt;br /&gt;&lt;br /&gt;$intRow += 2&lt;br /&gt;&lt;br /&gt;$Sheet.Cells.Item($intRow,1) = &amp;quot;&lt;/span&gt;DATABASES&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,1).Font.Bold = $True&lt;br /&gt;&lt;br /&gt;$intRow += 1&lt;br /&gt;&lt;br /&gt;$Sheet.Cells.Item($intRow,1) = &amp;quot;&lt;/span&gt;DATABASE NAME&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,2) = &amp;quot;&lt;/span&gt;COLLATION&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,3) = &amp;quot;&lt;/span&gt;COMPATIBILITY LEVEL&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,4) = &amp;quot;&lt;/span&gt;AUTOSHRINK&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,5) = &amp;quot;&lt;/span&gt;RECOVERY MODEL&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,6) = &amp;quot;&lt;/span&gt;SIZE (MB)&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;$Sheet.Cells.Item($intRow,7) = &amp;quot;&lt;/span&gt;SPACE AVAILABLE (MB)&lt;span class="str"&gt;&amp;quot;&lt;br /&gt;for ($col = 1; $col –le 7; $col++)&lt;br /&gt;{&lt;br /&gt;$Sheet.Cells.Item($intRow,$col).Font.Bold = $True&lt;br /&gt;$Sheet.Cells.Item($intRow,$col).Interior.ColorIndex = 48&lt;br /&gt;$Sheet.Cells.Item($intRow,$col).Font.ColorIndex = 34&lt;br /&gt;}&lt;br /&gt;$intRow += 1&lt;br /&gt;&lt;br /&gt;$dbs = $srv.Databases&lt;br /&gt;ForEach ($db in $dbs) &lt;br /&gt;{&lt;br /&gt;#Divide the value of SpaceAvailable by 1KB &lt;br /&gt;$dbSpaceAvailable = $db.SpaceAvailable/1KB &lt;br /&gt;#Format the results to a number with three decimal places &lt;br /&gt;$dbSpaceAvailable = &amp;quot;&lt;/span&gt;{0:N3}&lt;span class="str"&gt;&amp;quot; -f $dbSpaceAvailable&lt;br /&gt;$Sheet.Cells.Item($intRow, 1) = $db.Name&lt;br /&gt;$Sheet.Cells.Item($intRow, 2) = $db.Collation&lt;br /&gt;$Sheet.Cells.Item($intRow, 3) = $db.CompatibilityLevel&lt;br /&gt;#Change the background color of the Cell depending on the AutoShrink property value &lt;br /&gt;if ($db.AutoShrink -eq &amp;quot;&lt;/span&gt;True&lt;span class="str"&gt;&amp;quot;)&lt;br /&gt;{&lt;br /&gt;$fgColor = 3&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;$fgColor = 0&lt;br /&gt;}&lt;br /&gt;$Sheet.Cells.Item($intRow, 4) = $db.AutoShrink &lt;br /&gt;$Sheet.Cells.item($intRow, 4).Interior.ColorIndex = $fgColor&lt;br /&gt;$Sheet.Cells.Item($intRow, 5) = $db.RecoveryModel&lt;br /&gt;$Sheet.Cells.Item($intRow, 6) = &amp;quot;&lt;/span&gt;{0:N3}&lt;span class="str"&gt;&amp;quot; -f $db.Size&lt;br /&gt;#Change the background color of the Cell depending on the SpaceAvailable property value &lt;br /&gt;if ($dbSpaceAvailable -lt 1.00)&lt;br /&gt;{&lt;br /&gt;$fgColor = 3&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;$fgColor = 0&lt;br /&gt;}&lt;br /&gt;$Sheet.Cells.Item($intRow, 7) = $dbSpaceAvailable &lt;br /&gt;$Sheet.Cells.item($intRow, 7).Interior.ColorIndex = $fgColor&lt;br /&gt;&lt;br /&gt;$intRow += 1&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;$Sheet.UsedRange.EntireColumn.AutoFit()&lt;br /&gt;$name = $instance -replace(&amp;quot;&lt;/span&gt;\\&lt;span class="str"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;-&amp;quot;)&lt;br /&gt;$Sheet.Name = $name&lt;br /&gt;$intRow = 1&lt;br /&gt;$a += 1&lt;br /&gt;}&lt;br /&gt;#Save file and close Excel. &lt;br /&gt;$xlExcel8 = 56&lt;br /&gt;$timeStamp = Get-Date -Format "yyyyMMdd_HH_mm"&lt;br /&gt;$fileName = ".\ServerInfo_" + $timeStamp + ".xls"&lt;br /&gt;$Workbook.SaveAs($fileName, $xlExcel8)&lt;br /&gt;$Excel.Quit&lt;br /&gt;[System.Runtime.Interopservices.Marshal]::ReleaseComObject($Excel)&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre{font-size: small;color: black;font-family: consolas, "Courier New", courier, monospace;background-color: #ffffff;/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {background-color: #f4f4f4;width: 100%;margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I’ve run this script using PowerShell V2 and Excel 2007 and the Excel 2010 beta with no problems. I don’t believe there’s anything specific to V2 in the script. But I do have a warning, though. If, while you run the script, you get impatient and click somewhere inside Excel, you’ll get an error and the script will stop (NOTE TO SELF: Add error handling!). The error is &lt;font size="2"&gt;HRESULT 800ac472 and it’s an Excel error, not PowerShell.&lt;/font&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-2494442037463226534?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/2494442037463226534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=2494442037463226534' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2494442037463226534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2494442037463226534'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/03/powershell-and-sql.html' title='PowerShell and SQL'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_R-tbJU7CXwQ/S5_XvuIsTgI/AAAAAAAAAqM/ufJq4sQA1NY/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-772820511535119159</id><published>2010-03-01T13:12:00.001-06:00</published><updated>2010-03-01T13:12:46.122-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SP3'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Issues installing SQL 2005 SP3</title><content type='html'>&lt;p&gt;Before I get to the details, I’d like to ask a few questions. I’d be interested in hearing from anyone who’s had problems installing SQL service packs or hotfixes. Has anyone else had the errors I’m mentioning below, or anything similar? What procedures or best practices do you follow when installing patches?&amp;#160; &lt;/p&gt;  &lt;p&gt;Last week I finally was able to install SQL 2005 SP3 on our production servers. I’ve installed countless service packs and hotfixes in the past on numerous servers both physical and virtual, development and production. And I’ve never run into the problems I had last week.&lt;/p&gt;  &lt;p&gt;In this case, I’m upgrading four production sites from SQL 2005 SP2 with the CU7 hotfix installed, build 3239 (see &lt;a href="http://www.sqlservercentral.com/articles/Administration/2960/" target="_blank"&gt;this article from SQLServerCentral&lt;/a&gt; that matches build numbers to service packs). When I installed SP3 on our dev and test servers I received the usual warning about running software. So last week I tried to stop the SQL services on the first 2 servers. This brought up Error #1: The services were telling me that I lacked the proper permissions to stop the SQL service. Now my account is an administrative account on the servers so it has plenty of rights, certainly enough to stop the service. ISP3.&lt;/p&gt;  &lt;p&gt;Now comes Error #2: The system databases on a SAN drive were read only, and again I didn’t have proper permissions to rewrite them! Again, I’m an administrator and should have been able to do this with no problems. Reading the install logs just gave me the same information. And again, this error only occurred on the first 2 servers, not the final 2.&lt;/p&gt;  &lt;p&gt;Next I logged off the servers and logged back in using the same account that the SQL services run under. I continued to get the same 2 errors on Server 1, but Server 2 let me complete the installation. Still no errors at all on Servers 3 or Server 4. Now I’m getting concerned. &lt;/p&gt;  &lt;p&gt;My next step was to restart Server 1. After the server came back up, I could finally install the service pack. When I finished I checked the Windows and SQL error logs for any clues that would explain why my permissions were being denied. I must admit my Windows admin skills aren’t the greatest so I probably missed the cause. I did notice that the anti-virus program we run had similar issues at the same time, but the anti-virus doesn’t hit the database files and I wasn’t trying to do anything with the anti-virus service. My guess is that somehow Server 1 and Server 2 somehow couldn’t validate my account after I logged in.&lt;/p&gt;  &lt;p&gt;Anyway, I thought I was finished. Not quite. My final step was to verify the new version. So I ran SELECT SERVERPROPERTY('ProductLevel') and all four servers returned SP3. The build number now showed as 9.00.4035. All looks good, right? A few days later I ran EXEC sp_server_info.&lt;/p&gt;  &lt;p&gt;Finally we get to Error #3. On Server 2, remember that I had problems at first with permissions but I thought the SP installed correctly on the 2nd try. But now looking at the value for DBMS_VER and SYS_SPROC_VERSION I’m seeing the build is still showing 9.00.3239! Why? I’m not sure. I think it’s due to 1 of 2 reasons.&lt;/p&gt;  &lt;p&gt;First, even though the SP3 install looked to be successful the second time it somehow skipped a component. During the reinstall I thought I selected all components, but it’s possible that I only thought I did, skipping something. NOTE TO SELF: for future installs document what components you’re installing. At least take a screenshot of what I’ve checked.&lt;/p&gt;  &lt;p&gt;The second possibility is because of Analysis Services. SSAS was installed on Server 2 but the service is disabled. That makes sense since we’re not using SSAS currently, but the reason it was installed on just one server is lost to the mists of time. In any case the SP3 install logs show that SSAS was disabled and it’s at build 3239. But by that logic it would only be as 3239 if it was running during other patches. Again, I can’t be sure.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-772820511535119159?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/772820511535119159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=772820511535119159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/772820511535119159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/772820511535119159'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/03/issues-installing-sql-2005-sp3.html' title='Issues installing SQL 2005 SP3'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7818506596329061045</id><published>2010-02-16T11:43:00.003-06:00</published><updated>2010-02-16T12:34:10.308-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>How I save table sizes for all databases</title><content type='html'>&lt;p&gt;Back when I first started monitoring our production servers, I wanted a way to track the size and growth of all tables in our databases. At the time, we were really only worried about 1 legacy database, and all the objects in that database were in the dbo schema. So tracking size growth was pretty easy; I ran the following script against that database weekly and compared results. &lt;/p&gt;&lt;div class="csharpcode"&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;declare&lt;/span&gt; @TableName    sysname&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;declare&lt;/span&gt; mySpace &lt;span class="kwrd"&gt;cursor&lt;/span&gt; &lt;span class="kwrd"&gt;for&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;select&lt;/span&gt; name &lt;span class="kwrd"&gt;from&lt;/span&gt; sys.sysobjects &lt;span class="kwrd"&gt;where&lt;/span&gt; xtype = &lt;span class="str"&gt;'U'&lt;/span&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;order&lt;/span&gt; &lt;span class="kwrd"&gt;by&lt;/span&gt; name&lt;br /&gt;&lt;span class="kwrd"&gt;open&lt;/span&gt; mySpace&lt;br /&gt;&lt;span class="kwrd"&gt;fetch&lt;/span&gt; &lt;span class="kwrd"&gt;next&lt;/span&gt; &lt;span class="kwrd"&gt;from&lt;/span&gt; mySpace &lt;span class="kwrd"&gt;into&lt;/span&gt; @TableName&lt;br /&gt;&lt;span class="kwrd"&gt;while&lt;/span&gt; &lt;span class="preproc"&gt;@@fetch_status&lt;/span&gt; = 0&lt;br /&gt;&lt;span class="kwrd"&gt;begin&lt;/span&gt;&lt;br /&gt;insert &lt;span class="kwrd"&gt;into&lt;/span&gt; PerfDB.dbo.TableSpace(TableName, NumRows, Reserved, DataUsed, IndexUsed, Unused)&lt;br /&gt;&lt;span class="kwrd"&gt;exec&lt;/span&gt; sp_spaceused @TableName&lt;br /&gt;&lt;span class="kwrd"&gt;fetch&lt;/span&gt; &lt;span class="kwrd"&gt;next&lt;/span&gt; &lt;span class="kwrd"&gt;from&lt;/span&gt; mySpace &lt;span class="kwrd"&gt;into&lt;/span&gt; @TableName&lt;br /&gt;&lt;span class="kwrd"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;close&lt;/span&gt; mySpace &lt;br /&gt;&lt;span class="kwrd"&gt;deallocate&lt;/span&gt; mySpace&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After a while, we began to create new projects that required new databases. And these databases had objects that were created into separate schemas. So now, if I wanted to track changes to all tables in all databases, I’d have to run the above code against all databases. Do-able, certainly, but not exactly what I wanted to maintain. I’d have to add the code to each new database we added to the server. And sp_spaceused only returns the name of the table, not the schema name. I wanted to separate the tables by database as well as schema.&lt;/p&gt;&lt;p&gt;So I played around with using two well known undocumented procedures, sp_MSForEachDB and sp_MS_ForEachTable. I’ve used them before, but I never nested foreachtable inside foreachdb. And I still needed a way to separate the schema from the table name. And I wanted to get away from using a cursor.&lt;/p&gt;&lt;p&gt;I found the following script on a &lt;a href="http://www.sqlservercentral.com/Forums/Topic476475-8-1.aspx" target="_blank"&gt;SQLServerCentral&lt;/a&gt; forum that gave me an idea. Running this script showed that the value of ‘?’ when running sp_MSForEachTable showed the schema name as well as the table name.&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;declare&lt;/span&gt; @command1 &lt;span class="kwrd"&gt;varchar&lt;/span&gt;(8000)&lt;br /&gt;&lt;span class="kwrd"&gt;select&lt;/span&gt; @command1 = &lt;br /&gt;&lt;span class="str"&gt;'&lt;br /&gt;IF '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'master'&lt;/span&gt;&lt;span class="str"&gt;' AND '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'model'&lt;/span&gt;&lt;span class="str"&gt;' AND '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'msdb'&lt;/span&gt;&lt;span class="str"&gt;' AND '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'tempdb'&lt;/span&gt;&lt;span class="str"&gt;' &lt;br /&gt;begin&lt;br /&gt;use [@] execute sp_MSForEachTable '&lt;/span&gt;&lt;span class="str"&gt;'print '&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;'?'&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;' '&lt;/span&gt;&lt;span class="str"&gt;' &lt;br /&gt;end    &lt;br /&gt;'&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;exec&lt;/span&gt; sp_MSforeachdb @command1, &lt;span class="str"&gt;'@'&lt;/span&gt;&lt;/pre&gt;&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;font face="Verdana"&gt;So now I can just run sp_spaceused inside the sp_MSForEachTable block and strip out the schema into a separate column.&lt;/font&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="csharpcode"&gt;&lt;p&gt;&lt;font face="Verdana"&gt;Here’s the code I use now&lt;/font&gt;&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;TABLE&lt;/span&gt;  #TableSpace (&lt;br /&gt;DatabaseName    nvarchar(128) &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;SchemaName        nvarchar(128) &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;TableName        nvarchar(128) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;&lt;span class="kwrd"&gt;rows&lt;/span&gt;            &lt;span class="kwrd"&gt;int&lt;/span&gt; &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;reserved        &lt;span class="kwrd"&gt;varchar&lt;/span&gt;(15) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;&lt;span class="kwrd"&gt;data&lt;/span&gt;            &lt;span class="kwrd"&gt;varchar&lt;/span&gt;(15) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;index_size        &lt;span class="kwrd"&gt;varchar&lt;/span&gt;(15) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;unused            &lt;span class="kwrd"&gt;varchar&lt;/span&gt;(15) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;)&lt;br /&gt;&lt;span class="kwrd"&gt;DECLARE&lt;/span&gt; @&lt;span class="kwrd"&gt;SQL&lt;/span&gt; &lt;span class="kwrd"&gt;varchar&lt;/span&gt;(8000)&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; @&lt;span class="kwrd"&gt;SQL&lt;/span&gt; = &lt;br /&gt;&lt;span class="str"&gt;'&lt;br /&gt;IF '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'master'&lt;/span&gt;&lt;span class="str"&gt;' AND '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'model'&lt;/span&gt;&lt;span class="str"&gt;' AND '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'msdb'&lt;/span&gt;&lt;span class="str"&gt;' AND '&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;' &amp;lt;&amp;gt; '&lt;/span&gt;&lt;span class="str"&gt;'tempdb'&lt;/span&gt;&lt;span class="str"&gt;' &lt;br /&gt;BEGIN&lt;br /&gt;USE [@] EXECUTE sp_MSForEachTable '&lt;/span&gt;&lt;span class="str"&gt;'INSERT INTO #TableSpace (TableName, rows, reserved, data, index_size, unused) EXEC sp_spaceused '&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;'?'&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;'; &lt;br /&gt;UPDATE #TableSpace SET SchemaName = LEFT('&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;'?'&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;', CHARINDEX('&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;'.'&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;', '&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;'?'&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;', 1) - 2) WHERE SchemaName IS NULL;&lt;br /&gt;UPDATE #TableSpace SET DatabaseName = '&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;'@'&lt;/span&gt;&lt;span class="str"&gt;''&lt;/span&gt;&lt;span class="str"&gt;' WHERE DatabaseName IS NULL; '&lt;/span&gt;&lt;span class="str"&gt;'&lt;br /&gt;END    &lt;br /&gt;'&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; sp_MSforeachdb @&lt;span class="kwrd"&gt;SQL&lt;/span&gt;, &lt;span class="str"&gt;'@'&lt;/span&gt;&lt;/pre&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre{font-size: small;color: black;font-family: consolas, "Courier New", courier, monospace;background-color: #ffffff;/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {background-color: #f4f4f4;width: 100%;margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/div&gt;&lt;p&gt;In my example I’m creating a temporary table, but in practice I use a permanent table.&amp;#160; Line 16 is obvious, it skips the system databases. Line 18 calls the sp_spaceused procedure for each table inside each database.&lt;/p&gt;&lt;p&gt;Line 19 is where I strip out the schema name. I just use CHARINDEX function to return the position of the dot separator, then I use the LEFT function to return the characters before it. Since ‘?’ returns the table name as [Schema].[TableName] I also want to skip the brackets, so I move the position one more place to the left to take care of the ] character. I could have been even fancier and did even more string manipulation to take care of the [ character, but it was just as easy to use the REPLACE function on the whole column.&lt;/p&gt;&lt;p&gt;And Line 20 stores the database name. Running the script on my laptop running SQL 2008 gives me results like these&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/S3rZWWL3YxI/AAAAAAAAAp8/HjboRWresBs/s1600-h/image%5B6%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_R-tbJU7CXwQ/S3rZXGnyqMI/AAAAAAAAAqA/GBAZoShoOeg/image_thumb%5B7%5D.png?imgmax=800" width="687" height="482" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;I’ve run this against SQL 2005 and SQL 2008 servers. I haven’t tested it against SQL 2000. As with any code you find on the internet, please test it and become familiar with it before you put it into production.&amp;#160;&amp;#160; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7818506596329061045?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7818506596329061045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7818506596329061045' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7818506596329061045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7818506596329061045'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/02/how-i-save-table-sizes-for-all.html' title='How I save table sizes for all databases'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_R-tbJU7CXwQ/S3rZXGnyqMI/AAAAAAAAAqA/GBAZoShoOeg/s72-c/image_thumb%5B7%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-3922481566428959238</id><published>2010-02-09T14:06:00.001-06:00</published><updated>2010-02-09T14:06:23.333-06:00</updated><title type='text'>My Review of Windows PowerShell™ 2.0 Best Practices</title><content type='html'>&lt;div class="hreview"&gt;&lt;div class="item"&gt;&lt;p&gt;&lt;a href="http://oreilly.com/catalog/9780735626461"&gt;Originally submitted at O'Reilly&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;img src="http://images.powerreviews.com/images_products/08/33/6736642_100.jpg" class="photo" align="left" style="margin: 0 0.5em 0 0"&gt;&lt;p style="margin-top:0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;Learn field-tested solutions, best practices, and proven techniques for Windows PowerShell 2.0—including expert tips and lessons learned from the insiders on the Windows PowerShell Team at Microsoft.&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;/div&gt;&lt;a href="http://oreilly.com/catalog/9780735626461" style="display: none;" class="url fn"&gt;&lt;span class="fn"&gt;Windows PowerShell&amp;trade; 2.0 Best Practices&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;br clear="left"&gt;&lt;p&gt;&lt;strong class="summary"&gt;First impressions&lt;/strong&gt;&lt;/p&gt;&lt;div&gt;By &lt;strong&gt;jaype&lt;/strong&gt; from &lt;strong&gt;Chicago IL&lt;/strong&gt; on &lt;strong&gt;&lt;abbr title="201029T1200-0800" class="dtreviewed" style="border: none; text-decoration: none;"&gt;2/9/2010&lt;/abbr&gt;&lt;/strong&gt;&lt;/div&gt;&lt;p&gt;&lt;div style="margin: 0.5em 0; height: 15px; width: 83px; background-image: url(http://images.powerreviews.com/images/stars_small.gif); background-position: 0px -180px;" class="prStars prStarsSmall"&gt;&amp;nbsp;&lt;/div&gt;&lt;/p&gt;&lt;div style="display: none"&gt;&lt;span class="rating"&gt;5&lt;/span&gt;out of 5&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Pros: &lt;/strong&gt;Easy to understand, Accurate, Well-written, Concise, Helpful examples&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Best Uses: &lt;/strong&gt;Expert, Intermediate&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Describe Yourself: &lt;/strong&gt;Developer, Sys Admin&lt;/p&gt;&lt;p style="margin-top:1em" class="description"&gt;I'm just beginning to read this book and I thought I'd add my first impressions. I'm a SQL Server DBA and I'm looking to learn Powershell as a means of remotely administering my servers. I've only used Powershell briefly so I'm far from an expert. I'm hopeful this book will help my understanding. &lt;br xmlns:pr="xalan://com.pufferfish.core.beans.xmlbuilders.xsl.Functions"&gt;&lt;br&gt;First off, this book is not a book for beginners. A background in Powershell is helpful. I'm having to look up some of the concepts. But that's not the fault of the book, and the authors say as much in the Introduction. My only suggestion for other Powershell beginners is to read Chapter 6, on configuring the environment, first. &lt;br&gt;&lt;br&gt;I've finished the first two chapters so far and I find the book is well written and informative. Chapter 1 is about Version 2, what's new, and how to deploy it on different OS's. It also shows how to use a version tag for backwards compatibility with version 1. Chapter 2 shows how to use WMI functionality and how remoting works. Remoting is also new to Version 2.&lt;br&gt;&lt;br&gt;There's 2 things that make this book invaluable as a reference. First, the appendices are full of great information. For example, Appendix A lists all the cmdlets in Version 2 with a short description. Second, on the companion CD, there's a Quick Reference Guide pdf file that summarizes the points of each chapter.&lt;br&gt;&lt;br&gt;I'll update my review after I finish the book.&lt;/p&gt;&lt;p style="margin-top:0.5em"&gt;(&lt;a href="http://www.powerreviews.com/legal/terms_of_use.html" rel="license"&gt;legalese&lt;/a&gt;)&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-3922481566428959238?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/3922481566428959238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=3922481566428959238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3922481566428959238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3922481566428959238'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/02/my-review-of-windows-powershell-20-best.html' title='My Review of Windows PowerShell™ 2.0 Best Practices'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6840566067700033686</id><published>2010-01-18T19:10:00.001-06:00</published><updated>2010-01-18T19:10:28.188-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Using the RELOG utility – Part 2</title><content type='html'>&lt;p&gt;In my previous post (&lt;a href="http://sqlservings.blogspot.com/2010/01/what-i-learned-today-relog-utility.html" target="_blank"&gt;What I Learned Today - the RELOG utility&lt;/a&gt;) I discussed what I discovered the first time I learned about the RELOG utility. In this post I’ll continue with my education. Again, I’ve used &lt;a href="http://blogs.technet.com/askperf/archive/2008/05/20/two-minute-drill-relog-exe.aspx"&gt;Ask The Performance Team&lt;/a&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/bb490958.aspx"&gt;Microsoft TechNet&lt;/a&gt;, and this blog post at &lt;a href="http://www.resquel.com/ssb/2009/02/26/RelogSyntaxExamplesForSQLServer.aspx"&gt;My Torn Data Pages&lt;/a&gt; as my references.&lt;/p&gt;  &lt;p&gt;I found that I could output a list of counters from a perfmon counter log using RELOG (&lt;strong&gt;RELOG counterfilename –q –o counterfilename&lt;/strong&gt;). But you can take that a step further. Simply edit your counter file and delete the counters you don’t want. Then rerun RELOG and use the –cf switch to import a list of counters to filter for. My examples use the same counter log file as before: &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RELOG SQL1_20100106.csv – q –o counters.txt&lt;/strong&gt; -- to get my list of counters&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RELOG SQL1_20100106.csv –cf counters.txt –c csv –o filtered1.csv&lt;/strong&gt; --&amp;#160; to filter by those counters after editing the counters.txt file. &lt;/p&gt;  &lt;p&gt;And of course I can still filter by time with the –b and –e switches:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RELOG SQL1_20100106.csv –cf counters.txt -b &amp;quot;1/5/2010 9:00:00AM&amp;quot; -e &amp;quot;1/5/2010 10:00:00 AM&amp;quot; –f csv -o filtered2.csv&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You can save your settings in a config file…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;[cf]      &lt;br /&gt;counters.txt       &lt;br /&gt;[b]       &lt;br /&gt;1/5/2010 9:00:00AM       &lt;br /&gt;[e]       &lt;br /&gt;1/5/2010 10:00:00AM       &lt;br /&gt;[f]       &lt;br /&gt;csv       &lt;br /&gt;[o]       &lt;br /&gt;configresults.csv&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;…and use just the –config switch    &lt;br /&gt;&lt;strong&gt;RELOG SQL1_20100106.csv –config relogconfig.txt&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/S1TT-98VZ3I/AAAAAAAAApM/jq0FQSJRgvA/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_R-tbJU7CXwQ/S1UGe_8izPI/AAAAAAAAApQ/bkSnjgdX3uQ/image_thumb1.png?imgmax=800" width="652" height="341" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now there’s plenty of ways to filter your perfmon files. The last way is to save the results in a SQL database.&lt;/p&gt;  &lt;h4&gt;Inserting into a SQL database&lt;/h4&gt;  &lt;p&gt;The –o switch specifies where to output the results of a perfmon counter log file. You have the option to export to a flat file, which I’ve been doing so far, or directly to a database. And that’s simple. First, create a DSN pointing to the server and database of your choice. Stan Segers, whose blog I’ve been referencing at &lt;a href="http://www.resquel.com/ssb/2009/02/26/RelogSyntaxExamplesForSQLServer.aspx"&gt;My Torn Data Pages&lt;/a&gt;, is correct in noting that you need to use the SQL Driver. Like Stan, I wasn’t able to connect if I chose the SQL Native Client. Then, when you use the –o switch, specify SQL: and the name of your DSN. In the example my counter name is Counters.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RELOG SQL1_20100106.csv –cf counters.txt –o:SQL:Counters&lt;/strong&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;RELOG will create these 3 tables:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/S1UGfb_4k3I/AAAAAAAAApU/Gq0F7tZvGKc/s1600-h/clip_image0015.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://lh5.ggpht.com/_R-tbJU7CXwQ/S1UGf4asD4I/AAAAAAAAApY/bylR4fX2WEc/clip_image001_thumb2.jpg?imgmax=800" width="353" height="371" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The tables are created the first time you run RELOG to that database. The utility generates a GUID for each run. Each time you run it it will insert records into the CounterDetails and CounterData tables. But it won’t insert into or update the DisplayToID table. So to keep a record of each time you run the utility, specify a different DisplayString. Everything after the exclamation point (!) is the string.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RELOG SQL1_20100106.csv –cf counters.txt –o:SQL:Counters!DCICHISQL1&lt;/strong&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now that all my performance counters are in the database, I can easily query against them.&lt;a href="http://lh4.ggpht.com/_R-tbJU7CXwQ/S1UGgdOVXuI/AAAAAAAAApc/V2IfM3sczEk/s1600-h/clip_image0028.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh3.ggpht.com/_R-tbJU7CXwQ/S1UGg2nuLEI/AAAAAAAAApg/EqmQkN7vF3Q/clip_image002_thumb8.jpg?imgmax=800" width="724" height="276" /&gt;&lt;/a&gt;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;I hope I’ve shown you ways to use the RELOG utility. As you can see, it’s pretty powerful.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6840566067700033686?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6840566067700033686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6840566067700033686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6840566067700033686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6840566067700033686'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/01/using-relog-utility-part-2.html' title='Using the RELOG utility – Part 2'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_R-tbJU7CXwQ/S1UGe_8izPI/AAAAAAAAApQ/bkSnjgdX3uQ/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4549825478599325051</id><published>2010-01-18T08:52:00.001-06:00</published><updated>2010-01-18T09:07:42.138-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='What I Learned'/><category scheme='http://www.blogger.com/atom/ns#' term='Utilities'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>What I learned today – the RELOG utility</title><content type='html'>&lt;p&gt;At the &lt;a href="http://chicago.sqlpass.org/" target="_blank"&gt;Chicago SQL User group&lt;/a&gt; meeting on 1/14/2010 John Jones of NetApp gave a talk on storage performance. it was an informative meeting. For instance, did you know that the latency of a 15K Fibre Channel drive is the same as a 15K SAS drive? But SAS drives are smaller; NetApp is able to put 24 drives in a 4 U rack.&lt;/p&gt;  &lt;p&gt;During the presentation, John mentioned the RELOG utility and how it can convert a perfmon counter log from the default .blg extension to a .csv file. I’d never heard of RELOG before so I did a little reading up on it. I googled RELOG and found lots of information. The sources I used for this article were &lt;a href="http://blogs.technet.com/askperf/archive/2008/05/20/two-minute-drill-relog-exe.aspx" target="_blank"&gt;Ask The Performance Team&lt;/a&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/bb490958.aspx" target="_blank"&gt;Microsoft TechNet&lt;/a&gt;, and this blog post at &lt;a href="http://www.resquel.com/ssb/2009/02/26/RelogSyntaxExamplesForSQLServer.aspx" target="_blank"&gt;My Torn Data Pages&lt;/a&gt;. And I found that RELOG can do much more than just reformat a file. It can also filter the original counter log to show data from a sample time slice or only pull out certain counters. &lt;/p&gt;  &lt;p&gt;RELOG is a command line utility. It’s available in Windows XP or higher machines, and it’s located in the \system32 directory. If you don’t have it you can get from &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=f043c2f5-2a48-41ed-951b-ba7f62cf51d6" target="_blank"&gt;Microsoft downloads&lt;/a&gt;. Also the utility isn’t just for SQL counters. you can run it against any perfmon counter file.&lt;/p&gt;  &lt;p&gt;Here’s a list of the switches that RELOG uses:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_R-tbJU7CXwQ/S1R1j6r8wiI/AAAAAAAAAok/LMDB51AaHYU/s1600-h/image4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_R-tbJU7CXwQ/S1R1kub9LFI/AAAAAAAAAoo/88LJ1hQQWI8/image_thumb2.png?imgmax=800" width="608" height="487" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In my examples I’m using a benchmark counter log I capture from our production servers. It’s already saved as a .csv file so I don’t need to convert it but I certainly could if I needed to. Also I’m typing RELOG in caps, though it’s not necessary.&lt;/p&gt;  &lt;p&gt;Using RELOG with just the filename of the counter log will give you the start and end time of the capture plus the number of samples in the file…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/S1R1lSUhkKI/AAAAAAAAAos/Kzpqi1hOyWE/s1600-h/image9.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_R-tbJU7CXwQ/S1R1mL4jScI/AAAAAAAAAow/ADYrpR0J_uo/image_thumb5.png?imgmax=800" width="618" height="234" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;…and using the –q switch will list the counters used in the file. &lt;a href="http://lh4.ggpht.com/_R-tbJU7CXwQ/S1R1mzso70I/AAAAAAAAAo0/ueHqGDFJac0/s1600-h/image13.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/S1R1nUvwsUI/AAAAAAAAAo4/5f-TZdpxTU0/image_thumb7.png?imgmax=800" width="628" height="339" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Adding the –o switch and specifying a file name will output the counter names to a separate file (&lt;strong&gt;RELOG SQL1_20100106.csv –q –o counters.txt&lt;/strong&gt;). &lt;/p&gt;  &lt;p&gt;So now that I know the times and the counters in my baseline, I can filter for the counters between 9 and 10 AM on 1/5(&lt;strong&gt;RELOG SQL1_20100106.csv -b &amp;quot;1/5/2010 9:00:00AM&amp;quot; -e &amp;quot;1/5/2010 10:00:00 AM&amp;quot; –f csv -o SQL1_filtered.csv&lt;/strong&gt;). I can see that I’ve filtered out most of the sampling and now I’ve got the 237 samples I took between 9 and 10.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/S1R1oB46wnI/AAAAAAAAAo8/PnACBjKEm3E/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/S1R1pD21nHI/AAAAAAAAApA/0FX21Xd-rFs/image_thumb%5B3%5D.png?imgmax=800" width="635" height="342" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And I can also filter by individual counters.Let’s say I want to see the transactions per second against a specific database between 9 and 10 AM: &lt;strong&gt;RELOG SQL1_20100106.csv -b &amp;quot;1/5/2010 9:00:00AM&amp;quot; -e &amp;quot;1/5/2010 10:00:00 AM&amp;quot; -c &amp;quot;\MSSQL$MISDB:Databases(tempdb)\Transactions/sec&amp;quot; –f csv -o SQL1_filtered2.csv. &lt;/strong&gt;Running this, I see the same 237 samples returned, but if I open the file, I’ll just see the counters I asked for:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/S1R1p3cx7MI/AAAAAAAAApE/bknzLvBTvHk/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/S1R1quaT6yI/AAAAAAAAApI/kCQ2YAJYTfk/image_thumb%5B5%5D.png?imgmax=800" width="620" height="377" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I can also use a wild card to see the transactions/sec counters against all databases: &lt;strong&gt;RELOG SQL1_20100106.csv -b &amp;quot;1/5/2010 9:00:00AM&amp;quot; -e &amp;quot;1/5/2010 10:00:00 AM&amp;quot; -c &amp;quot;\MSSQL$MISDB:Databases(*)\Transactions/sec&amp;quot; –f csv -o SQL1_filtered3.csv&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I haven’t tried to save the results to a database yet. According to &lt;a href="http://www.resquel.com/ssb/2009/02/26/RelogSyntaxExamplesForSQLServer.aspx" target="_blank"&gt;My Torn Data Pages&lt;/a&gt;, there’s a problem with the syntax cited by &lt;a href="http://technet.microsoft.com/en-us/library/bb490958.aspx" target="_blank"&gt;Microsoft TechNet&lt;/a&gt;. I want to test both scenarios, using a DSN and the Native Client. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4549825478599325051?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4549825478599325051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4549825478599325051' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4549825478599325051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4549825478599325051'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/01/what-i-learned-today-relog-utility.html' title='What I learned today – the RELOG utility'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_R-tbJU7CXwQ/S1R1kub9LFI/AAAAAAAAAoo/88LJ1hQQWI8/s72-c/image_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5567071509538349791</id><published>2010-01-12T07:18:00.001-06:00</published><updated>2010-01-12T07:18:47.296-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Quick access to your common scripts</title><content type='html'>&lt;p&gt;Everyone has their own library of SQL scripts they run often, and everyone has their own methods for storing them. These a a few ways you may not be aware of.&lt;/p&gt;  &lt;p&gt;My first method is pretty well documented. Have you every just clicked Ctrl + F1 and see the results of sp_who? Well, you can add your own procedure calls here. In Management Studio simply open Tools &amp;gt; Options and select Keyboard. Here you’ll see 12 slots with shortcuts of Alt + F1, Ctrl + F1, and Ctrl + 1 through 0. Three of these are already defined; sp_who, sp_help, and sp_lock. You can leave these or replace them with your own, and you can add your own in any available slot. So now you have a way of calling 12 procedures with just a keyboard shortcut.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_R-tbJU7CXwQ/S0x2dA79Y8I/AAAAAAAAAoM/M2FTmzI6PF4/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_R-tbJU7CXwQ/S0x2evaGQ2I/AAAAAAAAAoQ/yCSEBYW2XgE/image_thumb%5B1%5D.png?imgmax=800" width="615" height="366" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The second way I ran across by accident and works best for small queries. In Visual Studio you have the ability to store snippets of code in the Toolbox. One day I thought I’d try it in SSMS, since it’s similar to the VS IDE. And it worked. What you need to do is open the Toolbox ( Ctrl + Alt + X). You’ll most likely only see the General tab with no controls; that’s fine since there aren’t any. Right click in the Toolbox, select Add Tab, and give it a name; mine is simply Scripts. Next, open or write your script in a query window. Then highlight the script and drag it onto the Toolbox. You probably won’t see it yet; right click the Toolbox again and make sure both List All and Show All are selected. And voila! There’s your script! To run it just right click the snippet, copy the code, and paste in a new query window.&lt;/p&gt;  &lt;p&gt;If you hover the mouse over the snippet you just added you’ll see the entire code. Notice this is added with Text: appended to the start. you can change this by right clicking the snippet and choosing rename, then just replace the word “Text’ with something more meaningful.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_R-tbJU7CXwQ/S0x2jXQKmGI/AAAAAAAAAoU/POz4Dtlg46U/s1600-h/image%5B14%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/S0x2oaSgIuI/AAAAAAAAAoY/fClB0oPoawU/image_thumb%5B11%5D.png?imgmax=800" width="610" height="544" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The third way is even better. Most people know that there are templates with SQL scripts you can use. Again, you can add your own and have them available anytime you open SSMS.&lt;/p&gt;  &lt;p&gt;If you open the Template Explorer (Ctrl + Alt + T) you’ll see the templates that Microsoft gives. There’s two ways to add your own templates. Right click SQL Server Template and choose New &amp;gt; Template. You can also choose Folder to categorize your scripts, otherwise the new template will be in the root. Give your new template or folder a descriptive name. Then right click the template, choose edit, write your code and save it. Now just double click the template to open it in a new query window.&lt;/p&gt;  &lt;p&gt;The other way to add your script to the Template Explorer is to add it to folder where the other templates are. On an XP or a Windows 2003 Server that’s at Documents And Settings\your account\Application Data\Microsoft\Microsoft SQL Server\100 (for SQL 2008) or 90 (for SQL 2005)\Tools\Shell\Templates\Sql. On a Vista or Windows 7 box you can find it in Users\your account\AppData\Roaming\Microsoft\Microsoft SQL Server\100 (for SQL 2008) or 90 (for SQL 2005)\Tools\Shell\Templates\SQL. &lt;/p&gt;  &lt;p&gt;One word of warning. If you do save your scripts as templates, remember to back them up occasionally. It would be easy to overlook them if you ever rebuild your computer and need to restore them. But of course you already knew that. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/S0x2qFykOyI/AAAAAAAAAoc/w_WrC8m3KVg/s1600-h/image%5B19%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/S0x2tU30XWI/AAAAAAAAAog/gRDN2dXUoTk/image_thumb%5B18%5D.png?imgmax=800" width="364" height="646" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5567071509538349791?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5567071509538349791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5567071509538349791' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5567071509538349791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5567071509538349791'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/01/quick-access-to-your-common-scripts.html' title='Quick access to your common scripts'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_R-tbJU7CXwQ/S0x2evaGQ2I/AAAAAAAAAoQ/yCSEBYW2XgE/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-2793289229429457077</id><published>2010-01-11T06:14:00.001-06:00</published><updated>2010-01-11T06:14:28.093-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='DBA'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>How I track database size</title><content type='html'>&lt;p&gt; One of my DBA tasks is to track the space used on our database servers. I want to know how big the database file sizes are, how big the tables are, and how much free space is available on each server. This is a common task for DBAs, and there’s probably a different method for each DBA. This is mine.&lt;/p&gt;  &lt;p&gt;When I first started, I created a database on each production server to store all stored procedures, tables, and views that I use as a DBA. The tables are mostly repositories of server state at the time I run a query or procedure. In the case of database sizes I created the procedure GetDBFileStats to get the filesize, total space, free space, and space used for each file in each database:&amp;#160; &lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;PROCEDURE&lt;/span&gt; [dbo].[GetDBFileStats]&lt;br /&gt;&lt;span class="kwrd"&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;EXEC&lt;/span&gt; sp_msforeachdb &lt;span class="str"&gt;'USE [?]&lt;br /&gt;&lt;br /&gt;CREATE TABLE #tmpspc (Fileid int, FileGroup int, TotalExtents int, UsedExtents int, Name sysname, FileName nchar(520))&lt;br /&gt;                  &lt;br /&gt;INSERT #tmpspc EXEC ('&lt;/span&gt;&lt;span class="str"&gt;'DBCC SHOWFILESTATS'&lt;/span&gt;&lt;span class="str"&gt;')&lt;br /&gt; &lt;br /&gt;INSERT INTO PerfDB.dbo.dbStats            &lt;br /&gt;SELECT GETDATE() AS RunDate,&lt;br /&gt;    '&lt;/span&gt;&lt;span class="str"&gt;'?'&lt;/span&gt;&lt;span class="str"&gt;', &lt;br /&gt;    s.name AS [Name],&lt;br /&gt;    s.physical_name AS [FileName],&lt;br /&gt;    s.size * CONVERT(float,8) AS [Size],&lt;br /&gt;    CAST(tspc.UsedExtents * CONVERT(float,64) AS float) AS [UsedSpace],&lt;br /&gt;    (s.size * CONVERT(float,8) - CAST(tspc.UsedExtents*convert(float,64) AS float)) AS FreeSpace,&lt;br /&gt;    s.file_id AS [ID]&lt;br /&gt;FROM sys.filegroups AS g&lt;br /&gt;    INNER JOIN sys.master_files AS s ON (s.type = 0 AND s.database_id = db_id() AND (s.drop_lsn IS NULL)) AND (s.data_space_id=g.data_space_id)&lt;br /&gt;    LEFT OUTER JOIN #tmpspc tspc ON tspc.Fileid = s.file_id&lt;br /&gt;ORDER BY [ID] ASC&lt;br /&gt;&lt;br /&gt;DROP TABLE #tmpspc&lt;br /&gt;&lt;br /&gt;INSERT INTO PerfDB.dbo.dbStats            &lt;br /&gt;SELECT GETDATE() AS RunDate,&lt;br /&gt;    '&lt;/span&gt;&lt;span class="str"&gt;'?'&lt;/span&gt;&lt;span class="str"&gt;', &lt;br /&gt;    s.name AS [Name],&lt;br /&gt;    s.physical_name AS [FileName],&lt;br /&gt;    s.size * CONVERT(float,8) AS [Size],&lt;br /&gt;    CAST(FILEPROPERTY(s.name, '&lt;/span&gt;&lt;span class="str"&gt;'SpaceUsed'&lt;/span&gt;&lt;span class="str"&gt;') AS float) * CONVERT(float,8) AS [UsedSpace],&lt;br /&gt;    (s.size * CONVERT(float,8) - CAST(FILEPROPERTY(s.name, '&lt;/span&gt;&lt;span class="str"&gt;'SpaceUsed'&lt;/span&gt;&lt;span class="str"&gt;') AS float)* CONVERT(float,8)) AS FreeSpace,&lt;br /&gt;    s.file_id AS [ID]&lt;br /&gt;FROM sys.master_files AS s&lt;br /&gt;WHERE (s.type = 1 AND s.database_id = db_id())&lt;br /&gt;ORDER BY [ID] ASC'&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;This was as far as I went until a few months ago. At that time I started to think of using SSIS for some of my daily tasks. So I created this simple package that gets the results from my procedure and puts them into a central database repository. I also truncate the tables and change the default date to just the date; &lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt; &lt;a href="http://lh6.ggpht.com/_R-tbJU7CXwQ/S0sWHkh0QKI/AAAAAAAAAoE/HCXU8KwQkeQ/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_R-tbJU7CXwQ/S0sWIuPZyUI/AAAAAAAAAoI/_0nPCoIYSlk/image_thumb%5B2%5D.png?imgmax=800" width="655" height="409" /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;Finally I created a report that got the data back. I send 2 parameters; a from date and a to date. Now when I run the report I can view what the database size was for the two dates and easily see how much the files have grown. I also created a sub report that, when I click on the database in the main report, opens to show the growth history of that database on a week to week basis.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font face="Verdana"&gt;Here’s the table I use to store the data and the procedure I use to populate the summary report. I also run it as an ad-hoc query;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;TABLE&lt;/span&gt; [dbo].[dbStats](&lt;br /&gt;    [Servername] [sysname] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [RunDate] [datetime] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [DBName] [sysname] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [Name] [sysname] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [FileName] [&lt;span class="kwrd"&gt;nchar&lt;/span&gt;](520) &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [TotalSize] [&lt;span class="kwrd"&gt;float&lt;/span&gt;] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [UsedSpace] [&lt;span class="kwrd"&gt;float&lt;/span&gt;] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [FreeSpace] [&lt;span class="kwrd"&gt;float&lt;/span&gt;] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;,&lt;br /&gt;    [FileID] [&lt;span class="kwrd"&gt;int&lt;/span&gt;] &lt;span class="kwrd"&gt;NOT&lt;/span&gt; &lt;span class="kwrd"&gt;NULL&lt;/span&gt;&lt;br /&gt;) &lt;span class="kwrd"&gt;ON&lt;/span&gt; [&lt;span class="kwrd"&gt;PRIMARY&lt;/span&gt;]&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;PROCEDURE&lt;/span&gt; [dbo].[prc_DBSizeCompare] (&lt;br /&gt;    @minDate    DATETIME,&lt;br /&gt;    @maxDate    DATETIME)&lt;br /&gt;    &lt;br /&gt;&lt;span class="kwrd"&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; NOCOUNT &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;;&lt;span class="kwrd"&gt;WITH&lt;/span&gt; DBCTE(ServerName, DBName, Name, MaxRunDate, MinRunDate) &lt;span class="kwrd"&gt;AS&lt;/span&gt;&lt;br /&gt;(&lt;br /&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt; ServerName, DBName, Name, &lt;br /&gt;        &lt;span class="kwrd"&gt;MAX&lt;/span&gt;(RunDate) &lt;span class="kwrd"&gt;AS&lt;/span&gt; MaxRunDate,&lt;br /&gt;        &lt;span class="kwrd"&gt;MIN&lt;/span&gt;(RunDate) &lt;span class="kwrd"&gt;AS&lt;/span&gt; MinRunDate&lt;br /&gt;    &lt;span class="kwrd"&gt;FROM&lt;/span&gt; dbo.dbStats&lt;br /&gt;    &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; RunDate &lt;span class="kwrd"&gt;BETWEEN&lt;/span&gt; @minDate &lt;span class="kwrd"&gt;AND&lt;/span&gt; @maxDate&lt;br /&gt;        &lt;span class="kwrd"&gt;AND&lt;/span&gt; DBName &amp;lt;&amp;gt; &lt;span class="str"&gt;'tempdb'&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;GROUP&lt;/span&gt; &lt;span class="kwrd"&gt;BY&lt;/span&gt; ServerName, DBName, Name&lt;br /&gt;)&lt;br /&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; db.Servername, db.DBName, db.Name, db.RunDate, db.TotalSize, db.UsedSpace, db.FreeSpace &lt;br /&gt;&lt;span class="kwrd"&gt;FROM&lt;/span&gt; dbo.dbStats db&lt;br /&gt;    &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; DBCTE CTE &lt;span class="kwrd"&gt;ON&lt;/span&gt; db.Servername = CTE.ServerName&lt;br /&gt;        &lt;span class="kwrd"&gt;AND&lt;/span&gt; db.Name = CTE.Name&lt;br /&gt;&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; db.RunDate = CTE.MinRunDate &lt;span class="kwrd"&gt;OR&lt;/span&gt; db.RunDate = CTE.MaxRunDate&lt;br /&gt;&lt;span class="kwrd"&gt;ORDER&lt;/span&gt; &lt;span class="kwrd"&gt;BY&lt;/span&gt; db.Servername, db.DBName, db.FileID, db.RunDate&lt;br /&gt;&lt;br /&gt;GO&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-2793289229429457077?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/2793289229429457077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=2793289229429457077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2793289229429457077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2793289229429457077'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2010/01/how-i-track-database-size.html' title='How I track database size'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_R-tbJU7CXwQ/S0sWIuPZyUI/AAAAAAAAAoI/_0nPCoIYSlk/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-781801367914399012</id><published>2009-12-29T09:59:00.001-06:00</published><updated>2009-12-29T09:59:29.852-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Booting to a VHD in Windows 7</title><content type='html'>&lt;p&gt;This is something I tried before but didn’t complete for some reason. Now that I’m on vacation this week and I’ve got some extra time to play, I went back to finish it.&lt;/p&gt;  &lt;p&gt;As you probably know by now, Windows 7 has the ability to boot into a .vhd file. This is awesome, as you can create a virtual testing environment that you can run directly against you hardware.&lt;/p&gt;  &lt;p&gt;There are a few gotchas, though. You’re limited in the OS’s you can run on the virtual side to Windows 7 and Windows 2008. I’ve seen post of people getting other OS’s to run but I haven’t tried. And I’ve seen warnings not to do this on a laptop, though I’ll try it, once I install my new bigger laptop hard drive next week.&lt;/p&gt;  &lt;p&gt;Anyway, this is how I did it. I had created a Windows 7 virtual machine in Virtual PC 2007. I used the vhd from that VM instead of creating a new one, though you certainly could if you wanted to.&lt;/p&gt;  &lt;p&gt;The first thing I did was to run sysprep inside my VM. I’m not an expert on sysprep, I just followed instructions I found on the web. Briefly, sysprep is a GUI tool that prepares the image to be configured to use the hardware on the new server. You’ll find it in C:\Windows\system32\sysprep. Run it as an admin. Choose the default target of out of the box experience and also choose to generalize. Also choose to shut down. After sysprep is finished it will power down your VM. &lt;/p&gt;  &lt;p&gt;I didn’t do this, but it’s probably a good idea to make a copy of the vhd at this point.&lt;/p&gt;  &lt;p&gt;The next thing I did was to set up Windows bootloader to see the vhd file. I opened a admin command prompt and ran the following: &lt;strong&gt;bcdedit /copy {current} /d “Win 7 VHD”&lt;/strong&gt;. This returns a GUID I saved to notepad. “Win 7 VHD” is the description I wanted to see on the boot menu. After that I ran these three commands:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;bcdedit /set {guid} device vhd=[C:]\VM\Win7\Win7.vhd &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;bcdedit /set {guid} osdevice vhd=[C:]\VM\Win7\Win7.vhd &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;bcdedit /set {guid} detecthal on&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In my example I replaced guid with the guid I saved earlier. VM\Win7\ is the path to my vhd file, and Win7.vhd is the file I’m using. Note that the drive letter is in square brackets: [C].&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;And that’s just about it. Once I restarted my computer I could see both my original Windows 7 installation and my new vhd boot option. When I chose the vhd, Windows started and applied the hardware changes. After that I just logged in and ran my Windows vhd. Once in the virtual environment, I can see all the drives on the computer, including those for my “real” Windows 7. Notice Disk 1 is a blue icon; this shows that it’s a vhd file. It also shows the reserved system partition. I can also see the files on the other physical drives. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/SzonWUaFn2I/AAAAAAAAAn0/pEv6CDT94zU/s1600-h/VMSetup%5B5%5D.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="VMSetup" border="0" alt="VMSetup" src="http://lh3.ggpht.com/_R-tbJU7CXwQ/SzonXNe8TTI/AAAAAAAAAn4/ZF8ABTHCZx0/VMSetup_thumb%5B3%5D.jpg?imgmax=800" width="1072" height="619" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I don’t get this if I’m running my physical Windows 7. I can mount the vhd file (on the menu go to Action &amp;gt; Attach VHD). But it doesn’t stay mounted between reboots. I haven’t tried mounting it with DISKPART yet, I’ll try that when I create my laptop VM.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_R-tbJU7CXwQ/SzonXn5FOJI/AAAAAAAAAn8/2Pf9wzmSBik/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_R-tbJU7CXwQ/SzonYWCZvII/AAAAAAAAAoA/emudVMnD1Jc/image_thumb%5B3%5D.png?imgmax=800" width="1081" height="611" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;The only drawback is the vhd is not portable, and I can’t run it in Virtual PC 2007 anymore. I can probably run sysprep again to get it back, but I think I’ll keep it as it is for now. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-781801367914399012?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/781801367914399012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=781801367914399012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/781801367914399012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/781801367914399012'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/12/booting-to-vhd-in-windows-7.html' title='Booting to a VHD in Windows 7'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_R-tbJU7CXwQ/SzonXNe8TTI/AAAAAAAAAn4/ZF8ABTHCZx0/s72-c/VMSetup_thumb%5B3%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-3250975761933973953</id><published>2009-12-27T15:34:00.001-06:00</published><updated>2009-12-27T15:34:48.723-06:00</updated><title type='text'>Year End Wrap-up</title><content type='html'>&lt;p&gt;This is my wrap-up for 2009 and a preview for 2010.&lt;/p&gt;  &lt;p&gt;A big chunk of my year was testing virtualizing our production servers with different configurations. After months of testing we learned that our workload wasn’t conducive to virtualization. &lt;/p&gt;  &lt;p&gt;During the last few months I began testing SnapManager from IBM for use as a backup tool. While SnapManager is a great tool for bringing a server online quickly, I can’t see a way of restoring individual objects. Unfortunately in our shop it’s far more likely to have a table accidentally updated or deleted than have a whole database go corrupt. I’d like to find a way for both to work, having the best of both worlds.&lt;/p&gt;  &lt;p&gt;I started to learn Microsoft’s BI stack. I’m already pretty familiar with Reporting Services, but I’ve only played around with Integration Services and I’ve done nothing with Analysis Services. So far I’ve just scheduled a simple package to collect database sizes so I can track growth. I’ve got a long way to go.&lt;/p&gt;  &lt;p&gt;I’m on vacation this week, not going back to work until January 4th. I’m using my downtime to create a virtual Win 7 pc to run all the 2010 betas coming down. I also want to set it so I can boot directly to it, using the new functionality in Windows 7.&lt;/p&gt;  &lt;p&gt;So what’s coming up next year?&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;I’ll finish my testing of SnapManager and I’ll post my results.&lt;/li&gt;    &lt;li&gt;I’m going to attend the first SQL Saturday in the Chicago area in April. I’ll post info about this early next month.&lt;/li&gt;    &lt;li&gt;Continue my education into BI using the SQL tools.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;One of my resolutions for next is to continue studying new technologies – new to me that is. I want to become more proficient in Powershell and Silverlight, among others.&lt;/p&gt;  &lt;p&gt;Happy holidays to all, and I’ll see you next year.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-3250975761933973953?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/3250975761933973953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=3250975761933973953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3250975761933973953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3250975761933973953'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/12/year-end-wrap-up.html' title='Year End Wrap-up'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-127256013330290803</id><published>2009-12-15T11:08:00.001-06:00</published><updated>2009-12-15T11:08:31.861-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Virtualization – final wrapup</title><content type='html'>&lt;p&gt;This is another topic I want to wrap up before the end of the year. &lt;/p&gt;  &lt;p&gt;A quick overview. earlier this year, I did some testing of virtualizing our production servers hosted on VMWare servers. I captured a typical workload from our busiest server and replayed it on servers set up for testing; a 32-bit physical server with 16 CPU set up as a production server, the same server with hyper threading turned off, a 32-bit and a 64-bit virtual server with 4 CPUs,and a 32-bit and a 64-bit virtual server using vSphere and 8 CPUs. All servers had 16 GB of RAM.&lt;/p&gt;  &lt;p&gt;After running the workload multiple times on each server configuration we compared results. What we saw was understandable – neither the 4 CPU or 8 CPU servers matched the 16 core baseline. Even the physical server with HT off fell short. &lt;/p&gt;  &lt;p&gt;What I didn’t show in earlier posts was the counter for latches. Latches are the #1 wait type on our servers, and this held true on all testing servers. Our servers aren’t running optimized and this is being magnified in a virtual environment. Having 16 cores lessens the performance hit from all those latches in production.&lt;/p&gt;  &lt;p&gt;So we’re not going to virtualize,at least the production servers. While virtualization is useful and can be used for SQL, it’s not a good idea to try and virtualize servers with performance problems. We’re currently using VMWare to run our development and testing environments as well as a few smaller, less used SQL servers, and we’re not seeing any issues with them.&lt;/p&gt;  &lt;p&gt;I’m not going to published a summary of all my counters, but I’ll make them available on request if anyone is interested. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-127256013330290803?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/127256013330290803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=127256013330290803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/127256013330290803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/127256013330290803'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/12/virtualization-final-wrapup.html' title='Virtualization – final wrapup'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8114335679471584916</id><published>2009-12-15T08:47:00.002-06:00</published><updated>2009-12-15T08:47:35.732-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Testing Google feeds - ignore</title><content type='html'>Testing Google cross-posting&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8114335679471584916?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8114335679471584916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8114335679471584916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8114335679471584916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8114335679471584916'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/12/testing-google-feeds-ignore.html' title='Testing Google feeds - ignore'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-607187252676719695</id><published>2009-11-24T13:34:00.001-06:00</published><updated>2009-11-24T13:34:07.623-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trace replay'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>What I learned today – temp file created when reading from multiple trace files</title><content type='html'>&lt;p&gt;I’m going to do some updating on past posts before moving forward on my BI learning. Today I want to close the book on using Profiler.&lt;/p&gt;  &lt;p&gt;First, there’s an excellent series of three webcasts on Profiler on the &lt;a href="http://www.msdev.com/" target="_blank"&gt;MSDEV&lt;/a&gt; website. MSDEV is a great resource for anyone looking for webcasts on Microsoft developer products. Check out the site even if you’re familiar with Profiler, chances are you’ll find something you didn’t know before in one of the other webcast series.&lt;/p&gt;  &lt;p&gt;Second, Profiler will create a temporary file when you read from multiple trace files. Like a lot of things, I found this out by accident. I had created a trace for replay on one of our production servers. It wasn’t until the trace had been running for a while that I noticed that I had forgotten to change the maximum size of the trace files. I let the trace complete, knowing I could read them all later. My trace ended up creating 369 .trc files totaling about 1.89 GB. &lt;/p&gt;  &lt;p&gt;So I began reading all of the .trc files, meaning to save the results into one .trc file. While the trace was running, I noticed that the amount of free space on the C drive of my test server was dropping. It eventually bottomed out when the trace finished reading the files. And when I investigated, I found a file in my Local Settings\Temp folder that was the same size as the total size of the 369 .trc files. The temp file was deleted automatically when I closed the Profiler session. Finally I opened the single large .trc file I saved when reading the multiple smaller .trc files. This time no temporary files at all were created. &lt;/p&gt;  &lt;p&gt;I wasn’t expecting the temp file to be created. Luckily this happened on my test server where i had enough free space. But it’s something to consider anyway. You may easily run out of space on your C drive without knowing why. I don’t know what would happen if I read the same trace with fewer, larger .trc files, that’s something I’ll need to look at for sure.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-607187252676719695?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/607187252676719695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=607187252676719695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/607187252676719695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/607187252676719695'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/11/what-i-learned-today-temp-file-created.html' title='What I learned today – temp file created when reading from multiple trace files'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-2780993527155934908</id><published>2009-11-12T09:22:00.001-06:00</published><updated>2009-11-12T09:22:49.028-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What I Learned'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>What I learned today – GID in sysusers table</title><content type='html'>&lt;p&gt;I had a question from a colleague yesterday about the GID field in the sysusers table. He had a SQL 2000 database that he had moved to a SQL 2005 instance. When he did this, his third party application stopped working. When he investigated, he noticed that the app was using the GID field in sysusers to validate logins and set roles. After he restored the database on the new server the GID field was 0 for everyone. At this point no one could connect to the database through the app.&lt;/p&gt;  &lt;p&gt;In SQL 2000, when you add a user to a database, the GID is 0 for the public role. If you add them to a database role, the GID becomes the UID of the role. I’m not sure what happens if you add a user to more than one database roles, that’s something I’ll have to check out. In SQL 2005 this has changed. The GID for all database users is 0. This is not a field that you can update.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;This is a good example of why you should never depend on the system tables being static. Microsoft always warns that they may be updated when you apply patches or when you upgrade.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-2780993527155934908?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/2780993527155934908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=2780993527155934908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2780993527155934908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2780993527155934908'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/11/what-i-learned-today-gid-in-sysusers.html' title='What I learned today – GID in sysusers table'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5012622961436840512</id><published>2009-11-09T10:07:00.002-06:00</published><updated>2009-11-09T10:13:56.380-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Business Intelligence'/><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>SSIS Expressions Cheatsheet</title><content type='html'>&lt;p&gt;Maybe you’re new to SSIS, like I am, or maybe you just need a little refresher on expressions in SSIS. I just ran across the &lt;a href="http://www.pragmaticworks.com/cheatsheet/" target="_blank"&gt;SSIS Expressions Cheatsheet&lt;/a&gt;. This is a page on the &lt;a href="http://www.pragmaticworks.com/" target="_blank"&gt;PragmaticWorks&lt;/a&gt; website. It’s also available as a downloadable .pdf file. For me, anyway, it’s a great one-page reference. I’ve got it printed and pinned to my cube wall.&lt;/p&gt;&lt;br /&gt;I learned about this resource from &lt;a href="http://dougbert.com/blogs/dougbert/default.aspx" target="_blank"&gt;Dougbert.com &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5012622961436840512?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5012622961436840512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5012622961436840512' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5012622961436840512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5012622961436840512'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/11/ssis-expressions-cheatsheet.html' title='SSIS Expressions Cheatsheet'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-169857033556775130</id><published>2009-11-03T12:57:00.002-06:00</published><updated>2009-11-03T12:58:48.925-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Warehouse'/><category scheme='http://www.blogger.com/atom/ns#' term='Business Intelligence'/><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>My first data warehouse – Part 1</title><content type='html'>&lt;p&gt;I’m going to lay a little ground work for future posts here. My plan to learn BI, and also to create a useful data warehouse from scratch, is to build one based on reporting server performance for my company’s eventual use. I want to be able to drill down to an individual report to view performance data, as well as summarize report performance by locations, by dates, by users,by date ranges, as well as other factors that I don’t envision right now.&lt;/p&gt;&lt;p&gt;Today I’m going to discus the download I found on the &lt;a href="http://www.codeplex.com/MSFTRSProdSamples" target="_blank"&gt;CodePlex&lt;/a&gt; site, thanks to &lt;a href="http://www.sqlmag.com/articles/index.cfm?articleid=102645" target="_blank"&gt;Tyler Chessman&lt;/a&gt; from SQL Magazine. This package and the accompanying reports will be incorporated in my data warehouse project.&lt;/p&gt;&lt;p&gt;To use the downloaded code you’ll need to create a database. The examples use RSExecutionLog as the database so I kept the same name. The download includes a script to create the necessary tables and relations. The tables it creates are used to store data extracted from the ExecutionLogStorage table in your SQL 2008 report server database. Mine has the default name of ReportServer, created when I configured Report Server for the first time. This database stores the report catalog and also useful information pertaining to when reports are run.&lt;/p&gt;&lt;p&gt;There are two Visual Studio solutions in the download; one SSIS solution called RSExecutionLog with a single package called RSExecutionLog_Update.dtsx, the other is a reporting solution with three sample reports to use against the extracted report server data and two to view schema and table information. I’m going to concentrate on the first two.&amp;#160; &lt;/p&gt;&lt;p&gt;I had some original issues with the package and reports. They were written using SQL 2005; I’m using SQL 2008. After converting the reports (basically just opening the report solution in VS 2008) I still had issues with the package and it’s connections. There were places where the connection to the source or destination seemed to be hard-coded inside different components of the package, even after I changed the source and destination connections. I ended up building a new package based on the original.&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;&lt;p&gt;The package is pretty sweet. Not only does it populate tables for users and reports, it also creates one for the report parameters. When the parameters is stored in the report server catalog, it’s something like “PARAM1=123&amp;amp;PARAM2=456”. The package shreds the report server string into individual values, so now I can easily search by parameters. I was thinking of doing the same thing, only storing the values as one record as opposed to one or more.&lt;/p&gt;&lt;p&gt;So I can use this package with very little customization. My next step is to pull data into my dw that is dependent on each report execution. This package should be fairly straight forward.&lt;/p&gt;&lt;p&gt;My next post will show my database design.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-169857033556775130?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/169857033556775130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=169857033556775130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/169857033556775130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/169857033556775130'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/11/my-first-data-warehouse-part-1.html' title='My first data warehouse – Part 1'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5880269713299914269</id><published>2009-10-27T06:33:00.001-05:00</published><updated>2009-10-27T06:33:25.758-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What I Learned'/><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>What I learned today – Report Server Execution log package</title><content type='html'>&lt;p&gt;My first attempt at a data warehouse is going to be collecting data from our report servers. In our environment we have two SQL 2008 instances that host the reports themselves, and they connect to four data centers for the report data. In the data centers we have a table that’s populated with parameters needed for each report; dates, locations, etc. The reports themselves only have two parameters; the datacenter where the data for the report is (we’re using dynamic connection strings) and a guid that identifies the other needed parameters in the data center. &lt;/p&gt;  &lt;p&gt;My goal was to build my warehouse from the four data center report parameter tables and the Execution Log tables on the report servers. The report server logs information from each time a report is run; if it was successful, the parameters for the report, the user, and more that would be helpful in debugging a report performance. I wanted to be able to view summaries for each report; for instance how often each report was run for each location during a specified date range, average report durations, or the number of aborted reports. &lt;/p&gt;  &lt;p&gt;I was going to build an SSIS package to gather the data for me. Then I read an article in the November 2009 issue of SQL Server Magazine by Tyler Chessman that defined about half of what I want to do. In his article &lt;a href="http://www.sqlmag.com/articles/index.cfm?articleid=102645" target="_blank"&gt;SQL Server Reporting Services Questions Answered&lt;/a&gt;, Mr Chessman describes sample reports from Microsoft that you can find on &lt;a href="http://www.codeplex.com/MSFTRSProdSamples" target="_blank"&gt;CodePlex&lt;/a&gt;. The reports will be interesting enough and I’ll be able to use them, but the best part is Microsoft has already created a package to extract the data from the report server execution log! &lt;/p&gt; This post is meant to be an overview. I’ll post a review of the CodePlex samples soon, and I’ll start laying out my data warehouse design.    &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5880269713299914269?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5880269713299914269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5880269713299914269' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5880269713299914269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5880269713299914269'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/10/what-i-learned-today-report-server.html' title='What I learned today – Report Server Execution log package'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7190561720570032136</id><published>2009-10-21T08:10:00.001-05:00</published><updated>2009-10-21T08:10:28.071-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='What I Learned'/><category scheme='http://www.blogger.com/atom/ns#' term='SSIS'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>What I learned today – auto generate create table DDL in SSIS</title><content type='html'>&lt;p&gt;I’m pretty new to SSIS, only having played around with it to see how things work. This is probably well known to SSIS developers but I just ran across it accidentally. I’m learning SSIS and I’m currently working through Brian Knight’s book “Knight’s 24 – Hour Trainer Microsoft SQL Server 2008 Integration Service”(I’ll review the book when I’m finished). Lesson 15 is walking me through loading the contents of a flat file into a new table in a SQL database with the OLE DB Destination. &lt;/p&gt;  &lt;p&gt;When I’ve done this before, I’ve always written a DDL statement to create the table. This time, I connected the Flat File Source, which has my sample data, to the OLE DB Destination.This time, when I clicked to create a new table, SSIS generated the CREATE TABLE script based on the definition of the flat file! The only thing I had to change was the table name, and even this would probably have been handled if I had renamed my destination first.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_R-tbJU7CXwQ/St8IPwYH68I/AAAAAAAAAnI/Mp29S9pGgkE/s1600-h/image5.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_R-tbJU7CXwQ/St8IQMZnP8I/AAAAAAAAAnQ/5kvu0W37KAw/image_thumb1.png?imgmax=800" width="244" height="220" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/St8IQhEVDLI/AAAAAAAAAnU/0qv-vMsWsBs/s1600-h/image2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_R-tbJU7CXwQ/St8IQ2BVtbI/AAAAAAAAAnY/4yy4HonKTpw/image_thumb.png?imgmax=800" width="244" height="212" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I didn’t think the table would be created until the task was run. But after clicking OK, the table was listed in my test database. I hadn’t even finished defining the destination! &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7190561720570032136?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7190561720570032136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7190561720570032136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7190561720570032136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7190561720570032136'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/10/what-i-learned-today-auto-generate.html' title='What I learned today – auto generate create table DDL in SSIS'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_R-tbJU7CXwQ/St8IQMZnP8I/AAAAAAAAAnQ/5kvu0W37KAw/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8293109854114805211</id><published>2009-10-19T06:33:00.001-05:00</published><updated>2009-10-19T06:33:36.206-05:00</updated><title type='text'>SQL Saturday in Iowa</title><content type='html'>&lt;p&gt;SQL Saturday in Iowa has come and gone. It was a great conference, and it’s a shame that we can’t get a day like this somewhere in the Chicago – Milwaukee – Madison region. Hopefully soon. &lt;/p&gt;  &lt;p&gt;But back to the SQL Saturday. Thanks to the East Iowa SQL User Group for putting this all together, bringing in the speakers, finding the venue, lining up the sponsors, and doing all the little things that make an event like this possible. There were only a few minor glitches with equipment (projectors mostly). Registration was probably the easiest I’ve ever seen for any event. Food and beverages were both tasty and plentiful all day long. And the sponsors were only there for the event, not to sell products.&lt;/p&gt;  &lt;p&gt;But the best part of the event was the content. I can only comment on the sessions I attended but I’m sure that the rest were equally as good. I have a list of the sessions offered in an earlier post.&lt;/p&gt;  &lt;p&gt;I didn’t go to Alex Kuznetsov’s sessions since I’ve seen them. The first session I went to was Janis Griffin’s Tuna Helper. She went over a process that Confio uses to spot issues on servers using wait types and DMVs. Next up were the three BI sessions that Jessica Moss presented. The session on reports was basic, probably because that’s the part of the BI stack I’m most familiar with. And her session on Database Dimensions in SSAS had a glitch with an overheated projector and became more of an overview of SSAS itself, which was fine with me as I know very little about SSAS. The session on SSIS was great. I may finally be getting a handle on data warehousing dimensions and facts thanks to her.&lt;/p&gt;  &lt;p&gt;Tim Ford also had an issue with a bulky projector so his session wasn’t as informative as it would have been. But I have the links to his blogs where he’ll have his scripts. They’ll come in handy. And finally Louis Davidson gave his second session of the day, on database design patterns. This was my first chance to see Louis present live. He’s a great speaker.&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8293109854114805211?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8293109854114805211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8293109854114805211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8293109854114805211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8293109854114805211'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/10/sql-saturday-in-iowa.html' title='SQL Saturday in Iowa'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-25722428798472879</id><published>2009-10-12T12:51:00.001-05:00</published><updated>2009-10-12T12:51:31.044-05:00</updated><title type='text'>Sidekick data loss should never have happened</title><content type='html'>&lt;p&gt;It was just a coincidence that I posted earlier on cloud computing. I took a long time writing a simple summary of the TechNet and MSDN events I went to on the Azure services. I was (and still am) impressed by the potential of cloud services. &lt;/p&gt;  &lt;p&gt;Over the last few days some details are coming out about what happened with T-Mobile’s Sidekick. T-Mobile was using Microsoft’s cloud computing to handle Sidekick data. At some point Microsoft performed a SAN upgrade and outsourced the job to Hitachi. What is completely baffling is that there was no backups taken prior to the upgrade (you can read a better summary at &lt;a href="http://www.hiptop3.com/archives/what-caused-the-sidekick-fail/" target="_blank"&gt;HipTop3.com&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;How in the world could Microsoft and/or Hitachi have neglected the backup step?&amp;#160; This should have been caught by the most junior member of the team running the upgrade. It’s going to be interesting to hear how they try to spin this; all parties are equally to blame.&lt;/p&gt;  &lt;p&gt;And how does Microsoft try to sell their cloud now? &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-25722428798472879?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/25722428798472879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=25722428798472879' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/25722428798472879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/25722428798472879'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/10/sidekick-data-loss-should-never-have.html' title='Sidekick data loss should never have happened'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1276565686547720792</id><published>2009-10-12T08:19:00.001-05:00</published><updated>2009-10-12T08:19:07.776-05:00</updated><title type='text'>Microsoft Azure event summary</title><content type='html'>&lt;p&gt;On October 1st I went to the Technet and MSDN events on Azure. I’ve never really read much into what Azure was all about so I wanted to learn more about it; what it was, and most important what it could do for me.&lt;/p&gt;  &lt;p&gt;There are a few data centers that Microsoft built for their Azure services. They just finished one here in Chicago, there’s one in Dublin, and I believe the third is in Quincy, Washington. It’s pretty cool how they set it up. Dell loads up semi trucks with the components needed. The trucks are shipped to the data centers where they are plugged into the network. I don’t think they use USB cables. Each data center can hold, I believe, 350,000 nodes.&lt;/p&gt;  &lt;p&gt;Azure is actually three parts. The first is Windows Azure. This is exactly what it sounds like, running on a Windows Server platform. &lt;/p&gt;  &lt;p&gt;The second part is SQL Azure, again no surprises. There wasn’t much talk about SQL Azure other than to mention that it was available. However the costs seemed to me to be fairly high; 1 GB for $9.99 per month, or 10 GB at $99.99 per month. You would probably be better off finding a different hoster, there are cheaper options available.&lt;/p&gt;  &lt;p&gt;The third part of Azure is .NET services. This would be your messaging services. Again, there are probably cheaper options. Microsoft wants $.15 per 100K per message. &lt;/p&gt;  &lt;p&gt;On top of all this there are the bandwidth costs; $.10/GB inbound and $.15/GB outbound &lt;/p&gt;  &lt;p&gt;West Monroe Partners also gave a demo at the end of the TechNet event. They build the website the City of Chicago used for the Taste of Chicago last summer. It was impressive, especially since this was 3 months ago on a CTP build.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1276565686547720792?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1276565686547720792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1276565686547720792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1276565686547720792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1276565686547720792'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/10/microsoft-azure-event-summary.html' title='Microsoft Azure event summary'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5648922066377515037</id><published>2009-10-01T09:28:00.001-05:00</published><updated>2009-10-01T09:28:53.211-05:00</updated><title type='text'>At Microsoft today</title><content type='html'>&lt;p&gt;I’m attending the TechNet and MSDN events on using Azure, cloud computing. Some cool stuff on tap. I’ll post about the individual sessions later.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5648922066377515037?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5648922066377515037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5648922066377515037' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5648922066377515037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5648922066377515037'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/10/at-microsoft-today.html' title='At Microsoft today'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6245583474774843488</id><published>2009-09-28T11:00:00.001-05:00</published><updated>2009-09-28T11:00:14.457-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Lessens learned – Report Server administration</title><content type='html'>&lt;p&gt;It’s a long commute in the morning, so I thought I’d use this time to compile a few things I learned and noticed about administering a server hosting SQL 2005 or 2008 Report Services. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Check the recovery model of the databases you create on your report server, including the ReportServerTempdb (or whatever you named the SSRS temp database). By default they will be in full recovery mode unless you’ve changed your model database. If they are still in full, the log files will grow and may cause you space problems later. Consider using simple mode. If you use full remember to schedule log backups. &lt;/li&gt;    &lt;li&gt;Backup the SSRS tempdb as well as the database holding your catalog. You’ll need this database if you need to restore the server, it’s not recreated when SQL starts up like tempdb. I’ve seen a few maintenance plans that skip this. &lt;/li&gt;    &lt;li&gt;Speaking of backups, remember to backup the SSRS encryption key. You’ll need that key if you ever want to restore the catalog database and you don’t want to re-enter all encrypted content, like data source credentials. I’ve successfully moved catalogs from production to a testing server using the key to restore the connections. You can backup the key from the Report Server Configuration Manager. I suggest that you also copy the backup somewhere safe in case you can’t get to the server.&lt;/li&gt;    &lt;li&gt;If you don’t want your reports exported in a specific format then disable that format. For instance, not a lot of reports look good if you export them in a comma delimited format. Just remove or comment out the entry in the rsreportserver.config file. You’ll find this file in the path for your&amp;lt;instance path&amp;gt;\Reporting Services\ReportServer. Be careful removing the image format – this could cause some problems, especially if you open the report in the report viewer control available in Visual Studio. &lt;/li&gt;    &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Render&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;XML&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;NULL&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;           &amp;lt;!-- &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;CSV&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt; --&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;PDF&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;RGDI&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;HTML4.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MHTML&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;EXCEL&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;RPL&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.RPLRendering.RPLRenderer,Microsoft.ReportingServices.RPLRendering&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Visible&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;LogAllExecutionRequests&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;IMAGE&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Extension&lt;/span&gt; &lt;span class="attr"&gt;Name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;WORD&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;Type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Render&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;You’ll find some good information in the ExecutionLogStorage (SQL 2008) or ExecutionLog (SQL 2005) tables. These tables can help you troubleshoot problems with the report as it shows the name of the person running the report, the time it took for retrieving data or rendering the report, the rendering format, and any parameters used. It will also show if the report was opened successfully or if it couldn’t open because of a rendering issue.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Another place to look at during troubleshooting is the logs. You’ll find these at &amp;lt;instance path&amp;gt;\Reporting Services\LogFiles. You may need to clean these files up on occasion since some report errors will generate dump files.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6245583474774843488?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6245583474774843488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6245583474774843488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6245583474774843488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6245583474774843488'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/lessens-learned-report-server.html' title='Lessens learned – Report Server administration'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7380371884313530641</id><published>2009-09-24T12:05:00.001-05:00</published><updated>2009-09-24T12:05:25.624-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>What’s the best practice for starting SQL services?</title><content type='html'>&lt;p&gt;An incident that occurred to us this morning causes me to rethink how I have SQL services set to start when the server is started or rebooted. &lt;/p&gt;  &lt;p&gt;Early this morning we had a power failure at one of our data centers. It caused one SQL server to be rebooted and left another server online. But it caused the SAN controllers to reboot also. Server 1, which didn’t reboot, began reporting error 823 when it couldn’t see the databases, even after the SAN came back online. Restarting the SQL services cleared that up. Server 2, which did reboot, came up reporting no problems. Consistency checks on all databases showed no problems so luckily we were good to go.&lt;/p&gt;  &lt;p&gt;I have the SQL services set to restart automatically when the server starts. But now I’m wondering if that is a good idea.What if the SAN wasn’t available when SQL first restarts? What if there is data corruption? Would it be better to always start the services manually so I could check the logs first, before I restart SQL?&lt;/p&gt;  &lt;p&gt;I’m interested in hearing how you handle SQL service startups.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7380371884313530641?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7380371884313530641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7380371884313530641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7380371884313530641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7380371884313530641'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/whats-best-practice-for-starting-sql.html' title='What’s the best practice for starting SQL services?'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1883914213132413500</id><published>2009-09-18T09:27:00.001-05:00</published><updated>2009-09-18T09:27:49.314-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='User Groups'/><title type='text'>SQL Saturday in Iowa Oct 17th</title><content type='html'>&lt;p&gt;The East Iowa SQL User Group just listed the sessions for the SQL Saturday event in Iowa City on October 17th. There’s some good stuff scheduled. Go to &lt;a href="http://www.sqlsaturday.com/"&gt;SQLSaturday.com&lt;/a&gt; to register or email &lt;a href="mailto:sqlsaturday#19@sqlsaturday.com"&gt;sqlsaturday#19@sqlsaturday.com&lt;/a&gt; for more information. They can always use more sponsors, too. &lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;&lt;b&gt;Track&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;&lt;b&gt;Start Time&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;&lt;b&gt;Session&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;&lt;b&gt;Speaker&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;Admin / Platform&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;9:00 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;High-Availability Options for Microsoft SQL Server&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Tim Plas&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev I&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;9:00 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Tuna Helper - A Proven Process for Tuning SQL&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Janis Griffin&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev II&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;9:00 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Defensive database programming&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Alex Kuznetsov&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;Admin / Platform&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;10:00 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;The Benefits of SQL Azure&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Aaron King&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev I&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;10:00 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;ABCs of CTEs&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Jason Strate&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev II&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;10:00 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;SQL Server 2008: The New and Cool...&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Zakir Durumeric&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;BI / Relational Theory&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;10:00 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Building Reports in SQL Server Reporting Services&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Jessica Moss&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev I&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;11:10 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Extended Events, Work Smarter Not Harder&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Jason Strate&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev II&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;11:10 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;2 Years of Database Unit Testing: Lessons Learned&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Alex Kuznetsov&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;BI / Relational Theory&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;11:10 AM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Extract, Transform, and Load your Data Warehouse&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Jessica Moss&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;Admin / Platform&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;1:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Service Broker: A Brief Introduction&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Zakir Durumeric&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev I&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;1:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Introduction to PowerShell&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Keith Dahlby&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev II&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;1:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;SQL Server 2008 - Practical Uses for New Features&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Chuck Heinzelman&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;BI / Relational Theory&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;1:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Introduction to SSAS Dimensions&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Jessica Moss&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;Admin / Platform&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;2:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Tips Tricks For Administering SQL Server&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Timothy Ford&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev I&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;2:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Drive Your Way to the DMV&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Jason Strate&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev II&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;2:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;SQL Server 2008 R2 - Moving to the Next Level&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Chuck Heinzelman&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;BI / Relational Theory&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;2:00 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Database Design&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Louis Davidson&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev I&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;3:10 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Improving Daily Imports with Partitioned Tables&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Jason Strate&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;App Dev II&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;3:10 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;An Introduction to &lt;a href="http://asp.net/"&gt;ASP.NET&lt;/a&gt; MVC&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Chris Sutton&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="183"&gt;         &lt;p&gt;BI / Relational Theory&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;3:10 PM&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Database Design Patterns&lt;/p&gt;       &lt;/td&gt;        &lt;td width="183"&gt;         &lt;p&gt;Louis Davidson&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1883914213132413500?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1883914213132413500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1883914213132413500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1883914213132413500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1883914213132413500'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/sql-saturday-in-iowa-oct-17th.html' title='SQL Saturday in Iowa Oct 17th'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5657125751756592209</id><published>2009-09-17T06:19:00.000-05:00</published><updated>2009-09-17T06:19:22.175-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Report Service error</title><content type='html'>Yesterday I helped a developer troubleshoot an issue he was experiencing with a report. The report is hosted on a SQL 2008 instance used for testing and was being viewed in a Win Form application using the Report Viewer control. We congigured the viewer control opens the reports as an image since this would be what the client sees when they print it. He couldn't tell me the exact error message but it referred to not being able to find the stream. He also stated that the report worked fine if he ran it with less data.&lt;br /&gt;&lt;br /&gt;I first checked the execution log table in the report database and I saw he was getting a rendering error. Next I had him rerun the report in the viewer. This time he received a generic error saying that there was a problem. But if he clicked the page layout button to render the report in HTML the report ran fine.&lt;br /&gt;&lt;br /&gt;My next step was to check the logs on the report server instance. Sure enough I found the error. It was an IO issue; not enough space on the drive. Luckily this was on a testing server and not production.&lt;br /&gt;&lt;br /&gt;Now the testing server is not set up the same as a production server. This box is a jumble of programs and databases, running multiple SQL instances for 2000, 2005, and 2008. The report server temp database is on the same drive as the report server database and the error logs and dumps. At the time I saw this the drive had about 100 MB free. And while 100 MB isn't a lot of space nowadays, I would have thought it would have been enough to run the report (it had over 800 pages when we freed up space for it).&lt;br /&gt;&lt;br /&gt;At this point I'm not sure where that image is being produced, in the reports database or the report temp database. I've never dug into the report temp db before. I'd like to head from anyone who has had similar problems, or can show me where else I should be looking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5657125751756592209?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5657125751756592209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5657125751756592209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5657125751756592209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5657125751756592209'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/report-service-error.html' title='Report Service error'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7220545628704670847</id><published>2009-09-14T08:32:00.001-05:00</published><updated>2009-09-14T08:32:10.414-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trace replay'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Updates to previous posts</title><content type='html'>&lt;p&gt;In my posts on virtualization I forgot to mention something. While I did say I was running with the multi-thread option instead of the replay in order option, I left the number of threads at the default of 4. I ran it with 64 threads earlier, but with the replay in order option. Those replays took well over 5 hours, as opposed to 2 1/2 – 3 hours with multi-thread at 4. But if I compare multi-threading at 4 with multi-threading at 64, then the times are much better – 3 1/2 hours compared to 2 3/4 hours on the same virtual server. I’ll summarize all my tests in a few weeks when I’ve completed all my tests.&lt;/p&gt;  &lt;p&gt;The second post I need to update regards repeating data in a page header using SSRS. I solution was to use a shared variable. This had potential problems which I neglected to mention. If you use a shared variable then anyone running the report at the same time could overwrite each other values. I knew this at the time I put the report into production, but I thought the odds of that happening would be slim. Later I found I could produce that exact behavior in testing; when I ran the report simultaneously with another tester we did indeed cross values.&lt;/p&gt;  &lt;p&gt;I changed the report to use a hashtable instead. The value in each record would be unique since it will depend on the user id of whoever is running the report. As an example of repeating a customer name on each page I&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Added a hidden row to the top of the table control on the report. The table was already there and the grouping was already set on the customer name. &lt;/li&gt;    &lt;li&gt;Added the customer name field from the table’s dataset to the hidden row. &lt;/li&gt;    &lt;li&gt;In the report code section I added a shared hashtable – DIM htCustomer AS system.collections.hashtable = NEW system.collections.hashtable. The hashtable still needs to be shared. &lt;/li&gt;    &lt;li&gt;Still in the code section, I added a new function to add a record to the hastable if it didn’t exist or update it if it did. The function takes three parameters; the value from the hidden field, a group name, and the user id. It returns the customer name for the current user &lt;/li&gt; &lt;/ol&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;DIM&lt;/span&gt; key &lt;span class="kwrd"&gt;AS&lt;/span&gt; &lt;span class="kwrd"&gt;STRING&lt;/span&gt; = groupName &amp;amp; UserID&lt;br /&gt;&lt;span class="kwrd"&gt;IF&lt;/span&gt; &lt;span class="kwrd"&gt;NOT&lt;/span&gt; group &lt;span class="kwrd"&gt;IS&lt;/span&gt; &lt;span class="kwrd"&gt;NOTHING&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;DIM&lt;/span&gt; g  &lt;span class="kwrd"&gt;AS&lt;/span&gt; &lt;span class="kwrd"&gt;STRING&lt;/span&gt;= &lt;span class="kwrd"&gt;CTYPE&lt;/span&gt;(group, &lt;span class="kwrd"&gt;STRING&lt;/span&gt;)&lt;br /&gt;      &lt;span class="kwrd"&gt;IF&lt;/span&gt; &lt;span class="kwrd"&gt;NOT&lt;/span&gt; (htCustomer.ContainsKey(key) &lt;span class="kwrd"&gt;THEN&lt;/span&gt;&lt;br /&gt;          htCustomer.Add(key, g)&lt;br /&gt;      &lt;span class="kwrd"&gt;ELSE&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;IF&lt;/span&gt; &lt;span class="kwrd"&gt;NOT&lt;/span&gt; (htCustomer(key).Equals(g)) &lt;span class="kwrd"&gt;THEN&lt;/span&gt;&lt;br /&gt;              htCustomer(key) = g)&lt;br /&gt;          &lt;span class="kwrd"&gt;END&lt;/span&gt; &lt;span class="kwrd"&gt;IF&lt;/span&gt; &lt;br /&gt;      &lt;span class="kwrd"&gt;END&lt;/span&gt; &lt;span class="kwrd"&gt;IF&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;END&lt;/span&gt; &lt;span class="kwrd"&gt;IF&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;RETURN&lt;/span&gt; htCustomer(key)&lt;/pre&gt;&lt;br /&gt;  &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;5. Add a page header to the report. Add a new text box that uses an expression to call the function and pass in the parameters&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;=Code.SetCustomerName(ReportItems!txtCustomer.Value, “Customer”, User!UserID)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;ReportItems!txtCustomer is the hidden field; Customer is my group name, and User!ID is a global parameter available to the report.&amp;#160;&amp;#160; &lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7220545628704670847?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7220545628704670847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7220545628704670847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7220545628704670847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7220545628704670847'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/updates-to-previous-posts.html' title='Updates to previous posts'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-3009499018371625691</id><published>2009-09-11T18:27:00.002-05:00</published><updated>2009-09-11T18:27:04.652-05:00</updated><title type='text'>Job Scheduled for Sunday</title><content type='html'>It's scheduled to run about 7:30PM&lt;br /&gt;&lt;br /&gt;DBCC GoBears&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-3009499018371625691?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/3009499018371625691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=3009499018371625691' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3009499018371625691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3009499018371625691'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/job-scheduled-for-sunday.html' title='Job Scheduled for Sunday'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5403602477991806078</id><published>2009-09-11T09:19:00.000-05:00</published><updated>2009-09-11T09:19:51.200-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DBA'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Documenting servers</title><content type='html'>I'm starting to create a Run Book (not my term, but I don't remember where I heard it) to store all documents relating to the databases and their servers I'm responsible for. That list is growing, and before it gets out of hand I'd like to create a template of what needs to be included. I'm trying to determine just what needs to be included. Drafting the template should help me not to go back and redo what I've already done.&lt;br /&gt;&lt;br /&gt;At this point I'm only documenting the servers, not any processes like database backups and restores. Those are important and I've already done most of those, just not formally. I'll do that also.&lt;br /&gt;&lt;br /&gt;I'll start with the server itself. What I'm adding is the server name, ip address, if the server is physical or virtual (if virtual the name/location of the host server), the OS and any SPs of patches installed, number of CPUs, amount of memory, size/location of the page file, and the drives and total space. If the drives are on a SAN then I should include a mapping of the SAN.&lt;br /&gt;&lt;br /&gt;For the SQL installation, the edition and any SPs or hot fixes, the instance name (we only run one instance per server), any non-default options that were configured, accounts used to run services, configured alerts, jobs and their schedules, if components like SSRS are installed and info about their configurations if they are.&lt;br /&gt;&lt;br /&gt;For the databases, the db names (including the virtual name and physical path), compatibility level, recovery model, auto growth and size restrictions, and any db options.&lt;br /&gt;&lt;br /&gt;For database backups, the type of backup, where it backs up to, and when it backs up. This info may be duplicated since our backups are handled by jobs.&lt;br /&gt;&lt;br /&gt;Is there anything else I'm missing?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5403602477991806078?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5403602477991806078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5403602477991806078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5403602477991806078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5403602477991806078'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/documenting-servers.html' title='Documenting servers'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5006049809128382497</id><published>2009-09-09T16:41:00.003-05:00</published><updated>2009-09-10T08:54:32.456-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Alas, no booting to a .VHD for me</title><content type='html'>&lt;p&gt;I’ve been reading quite a bit lately about attaching a virtual drive to a computer in Windows 7 and Windows 2008 Server R2. It would be nice to have the ability to boot directly into a virtual server. But I’m not seeing a way I can achieve it, at least right now.&lt;/p&gt;&lt;p&gt;My hardware would be my current laptop, an HP Pavilion TX 2000 (I wanted the tablet capabilities) running a 64 bit version of Windows 7 Ultimate. It has 2 CPUs, 4 GB of RAM and a 250 GB hard drive, certainly enough to run one virtual machine. I wanted to run a virtual 64 bit Windows 2008 Server R2 as my BI sandbox. Unfortunately, neither Virtual Server or Virtual PC support running 64 bit guests, only 32 bit. So I built my VM using VMWare’s Workstation. But those virtual disks can’t be mounted. &lt;/p&gt;&lt;p&gt;So I created another VM, this time a 32 bit version of Windows 2008. I created a fixed disk, installed the OS, and followed the directions on &lt;a href="http://blogs.msdn.com/charlie/default.aspx" target="_blank"&gt;Charlie Calvert's&lt;/a&gt; blog. Mounting the .vhd file was simple, as was using bcdboot. When I rebooted both servers showed in the boot launcher. Everything good to go, right?&lt;/p&gt;&lt;p&gt;Wrong. When I tried to boot into the .vhd, I'd get an error message that the computer was not correct because of hardware changes. And the computer manager no longer showed the .vhd drive as mounted. That’s when I went back and reread the fine print.&lt;/p&gt;&lt;p&gt;Windows 7 only supports mounting Windows 7 or Windows 2008 Server R2. My VM was only 2008. At this point my options are to restore my VMWare VM (backed up luckily) or to try to install R2 directly into a vhd. But I don’t think that will work, either; it wouldn’t be compatible with Virtual PC.&lt;/p&gt;&lt;p&gt;Well, VMWare Workstation is still a great option. It’s just disappointing I haven’t figured out a way to do this yet.&amp;#160;&amp;#160; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5006049809128382497?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5006049809128382497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5006049809128382497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5006049809128382497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5006049809128382497'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/alas-no-booting-to-vhd-for-me.html' title='Alas, no booting to a .VHD for me'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-2347254654150903223</id><published>2009-09-09T06:40:00.003-05:00</published><updated>2009-09-10T10:08:20.555-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='User Groups'/><title type='text'>East Iowa SQL User Group meeting</title><content type='html'>&lt;p&gt;This may be one of the nuttiest things I’ve ever done, at least from a technical side.Yesterday I drove to Cedar Rapids to attend the monthly meeting of the &lt;a href="http://eastiowa.sqlpass.org/" target="_blank"&gt;I380 Corridor (East Iowa) SQL User Group&lt;/a&gt;. That’s a 9 hour round trip drive for a 2 hour meeting, not a very efficient use of my time. But I was glad I did.&lt;/p&gt;&lt;p&gt;The East Iowa group is headed by Michelle Ufford, writer of the &lt;a href="http://sqlfool.com" target="_blank"&gt;SQL Fool&lt;/a&gt; blog and Ed Leighton-Dick. Last night’s meeting included a tip of the month by Michelle on using Adam Machanic’s latest version of his &lt;a href="http://sqlblog.com/blogs/adam_machanic/archive/2009/03/30/who-is-active-v8-40-now-with-delta-power.aspx" target="_blank"&gt;who is active&lt;/a&gt; script. This was followed by a Live Meeting with Jessica Moss who gave an introduction to data warehousing. That’s what I came for. Ed taped the meeting and hopefully it will come out clean enough so they can post it. I’d love to see it again.&lt;/p&gt;&lt;p&gt;Jessica discussed just what data warehousing is. She went into the design and life cycle of a dw, the definitions of fact and dimension tables, the types of dimensions, the differences between a star and snowflake schema, and how SSIS, SSAS, and SSRS fit into all this. She also discussed the different methodologies, Kimball and Inmon. Finally she gave a demo of a dw, from ETL to reporting, using the AdventureWorksDW2008 database. There was only one question, from Michelle, about using procedures to load data as opposed to a Slowly Changing control in SSIS. Jessica recommended using the SSIS approach. &lt;/p&gt;&lt;p&gt;Jessica’s presentation was exactly what I was looking for, a beginning point for how to build a data warehouse. There’s a lot of information and discussions out there but most of it assumes some knowledge already. And classes usually focus on the tools, not the methods. I need to learn both if I’m to create a good design. &lt;/p&gt;&lt;p&gt;Everyone at the user group was friendly. It was a small gathering, maybe 15 people total. The only difference between them and the Chicago group is they cut their pizza in wedges rather than squares.&amp;#160;&amp;#160; &lt;/p&gt;&lt;p&gt;There was one piece of bad news, however. The Iowa group is sponsoring a SQL Saturday on October 17th in Iowa City. But they are far behind what they need as far as registered attendees. They need to hit a certain level for funding from their sponsors to kick in. I think they are running into an issue where there’s another SQL Saturday scheduled the same day in Orlando and others in October. That’s a shame, because I really want to go to this one. Jessica is supposed to come and expand on last night’s presentation. They’ll make the decision Friday if they need to cancel.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-2347254654150903223?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/2347254654150903223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=2347254654150903223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2347254654150903223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2347254654150903223'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/east-iowa-sql-user-group-meeting.html' title='East Iowa SQL User Group meeting'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4605195806220049605</id><published>2009-09-04T10:07:00.003-05:00</published><updated>2009-09-10T10:08:47.882-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trace replay'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Replaying Traces – What I’ve Learned</title><content type='html'>&lt;p&gt;So I’ve been running these replays for a while now, with mixed results. There are a number of&amp;#160; lessons I’ve learned along the way.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Check what’s running inside the workload you’re replaying. There may be something that will affect the replay. In my case there was a collection trace that was started by the third party software I use for monitoring the production servers for performance. Since this trace had no corresponding stop, it kept running after the rest of my workload was completed, making me think there was a different issue. The only thing I don’t understand is why it stopped on it’s own in half the replays.&lt;/li&gt;&lt;li&gt;After you load the workload, you can apply a filter and reload the workload. This is how I eliminated any call for sp_trace_setstatus.&lt;/li&gt;&lt;li&gt;Restore the master database to eliminate any replay errors due to mismatched database id’s. This comes directly from BOL. I was ignoring it because at first I wasn’t seeing any errors. But later, especially after I started on the virtual servers, I was seeing more and more errors where SQL wasn’t running against the right database. So when I started the last round of replays I restored the master db first. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I’m in the process of replaying all scenarios again so the data is consistent. So far I’ve completed the 4 physical tests. Coming next are the 3 32-bit virtual, 2 64-bit virtual, and 1 final with VMWare’s 8 CPU server. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4605195806220049605?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4605195806220049605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4605195806220049605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4605195806220049605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4605195806220049605'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/09/replaying-traces-what-ive-learned.html' title='Replaying Traces – What I’ve Learned'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5726381268126262421</id><published>2009-08-25T17:21:00.002-05:00</published><updated>2009-09-10T10:09:10.452-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Training'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>24 Hours of PASS</title><content type='html'>If you haven't already heard, PASS is hosting 24 hours of PASS on September 2nd. These are a series of free, one hour long webcasts on a variety of SQL 2008 subjects. You can check out the schedule on the &lt;a href="http://24hours.sqlpass.org/"&gt;PASS website&lt;/a&gt;. The first webcast is actually at 7 PM on September 1st Central Time. It's not too late to register.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5726381268126262421?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5726381268126262421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5726381268126262421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5726381268126262421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5726381268126262421'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/08/24-hours-of-pass.html' title='24 Hours of PASS'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-3302414356692385118</id><published>2009-08-21T15:42:00.002-05:00</published><updated>2009-09-10T10:10:35.011-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>First look at SQL 2008 R2</title><content type='html'>&lt;p&gt;I’ve started to install the CTP of SQL Server 2008 R2. The first change I ran across was this screen during installation. I don’t have a copy of SharePoint Fourteen(?) so I chose the more familiar SQL Server Feature Installation. I’m installing this on a virtual server so I can always change options later.&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/So8GzYeQOeI/AAAAAAAAAnA/92lsSZ3xSVo/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_R-tbJU7CXwQ/So8G0Cu4FSI/AAAAAAAAAnE/Q3ykbbiKBns/image_thumb%5B9%5D.png?imgmax=800" width="523" height="400" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-3302414356692385118?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/3302414356692385118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=3302414356692385118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3302414356692385118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3302414356692385118'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/08/first-look-at-sql-2008-r2.html' title='First look at SQL 2008 R2'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_R-tbJU7CXwQ/So8G0Cu4FSI/AAAAAAAAAnE/Q3ykbbiKBns/s72-c/image_thumb%5B9%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6866529330325741789</id><published>2009-08-20T17:13:00.003-05:00</published><updated>2009-09-10T10:11:04.301-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trace replay'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Replaying traces, Part 5</title><content type='html'>&lt;p&gt;So I’m now testing my workload on a virtual 64 bit server, again hosted by VMWare, again with only 4 CPUs. And again I find more issues.&lt;/p&gt;&lt;p&gt;I ran this replay 3 times so far. All three times the replay appeared to have hung at the 99% mark, similar to the 8 CPU physical test. The only difference was that, for the final test, I didn’t save the results to disk. I did this because on the second test there appeared to be SQL activity that was suspended by the TRACEWRITE wait type. The drive it was writing to was the only virtual drive; all databases are on SAN storage.&lt;/p&gt;&lt;p&gt;While all three hung at the 99% mark after about 3 hours, each test had different results. The first test was showing transactions against the database throughout the trace (the black line. The blue line is % Processor Time, the yellow line is % Privilege Time, the red line is transactions/sec against tempdb). The Processor time showed activity from the Profiler after the 99% mark .&lt;a href="http://lh5.ggpht.com/_R-tbJU7CXwQ/So3KlAi7o5I/AAAAAAAAAmo/ZgLgMl6vRI0/s1600-h/Test7_1%5B5%5D.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Test 1" border="0" alt="Test 1" src="http://lh5.ggpht.com/_R-tbJU7CXwQ/So3Klw0YjjI/AAAAAAAAAms/-yKDZdTg0AU/Test7_1_thumb%5B8%5D.gif?imgmax=800" width="524" height="288" /&gt;&lt;/a&gt;     &lt;br /&gt;The second trace showed no transactions after the 99% mark. This is the one that showed the TRACEWRITE wait type. Notice that there are no transactions against the db after the 3 hour mark this time.&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/So3KmoffH-I/AAAAAAAAAmw/tCFpevnCyrM/s1600-h/Test7_2%5B5%5D.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Test 2" border="0" alt="Test 2" src="http://lh6.ggpht.com/_R-tbJU7CXwQ/So3Knm5uefI/AAAAAAAAAm0/-N9XYMv6_QE/Test7_2_thumb%5B9%5D.gif?imgmax=800" width="527" height="272" /&gt;&lt;/a&gt;&amp;#160;&amp;#160; &lt;br /&gt;Test 3 shows the same pattern as test 1. There were no wait times for tests 1 and 3.&lt;a href="http://lh3.ggpht.com/_R-tbJU7CXwQ/So3Kog4L6DI/AAAAAAAAAm4/10GDsGMUmUY/s1600-h/Test7_3%5B5%5D.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Test 3" border="0" alt="Test 3" src="http://lh4.ggpht.com/_R-tbJU7CXwQ/So3KpVtBGBI/AAAAAAAAAm8/rvNNgsnwljw/Test7_3_thumb%5B7%5D.gif?imgmax=800" width="530" height="279" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;There is one more issue with these three tests. After stopping the replays, I had to manually kill the Profiler process because profiler became unresponsive. The third test stayed alive and was stopping the process and I let it go. However the next morning I checked and it was still “stopping” after 13 hours. And the Profiler was still responding.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The more I run these replays the more confused I get. I’m going to try one more time. This run will be from a remote machine, I’m only going to capture the counters on the virtual server.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6866529330325741789?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6866529330325741789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6866529330325741789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6866529330325741789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6866529330325741789'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/08/replaying-traces-part-5.html' title='Replaying traces, Part 5'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_R-tbJU7CXwQ/So3Klw0YjjI/AAAAAAAAAms/-yKDZdTg0AU/s72-c/Test7_1_thumb%5B8%5D.gif?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8543884999596856956</id><published>2009-08-14T08:41:00.002-05:00</published><updated>2009-09-10T10:16:21.577-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>(Mostly) disappointing meeting</title><content type='html'>&lt;p&gt;Last night I went to the monthly meeting of the Chicago SQL User group, held on the second Thursday of the month. You can check them out and register for meeting notifications &lt;a href="http://chicago.sqlpass.org/" target="_blank"&gt;here&lt;/a&gt;. This is a good resource for anyone wishing to attend. Anyway,there were two topics last night. The first was on SQL and Powershell, the second on clustering with SQL 2008 and Windows Server 2008. &lt;/p&gt;&lt;p&gt;I don’t have any experience with clustering since we don’t use it at work but it’s one of those topics I feel I should know more about. But last night I was really looking forward to the discussion on Powershell. I’m looking for reasons why I should use Powershell over other methods like SMO or WMI to monitor servers I’m responsible for. I wanted to see some amazing Powershell cmdlets in action.&lt;/p&gt;&lt;p&gt;Unfortunately the presenters of the Powershell segment were not prepared very well. It started with having problems connecting a laptop to the projector and went downhill from there. The demos were filled with errors; most flatly didn’t work. The first presenter dwelled too long on the basics of Powershell itself, the second barely did more than read from the slide deck. Their presentation ate into the second segment on clustering. I wonder if their book was written better.&lt;/p&gt;&lt;p&gt;The second presenter did a much better job. He knows his topic extremely well, being a Microsoft MVP on clustering, and you can tell he is passionate about the subject. And he’s an effective speaker. But since he didn’t have much time he had to cut his demos short.&lt;/p&gt;&lt;p&gt;Don’t get me wrong, I appreciate everyone who presents at these meetings. It’s not easy getting up in front of a room of 80 strangers and talking about a deep subject in a short period of time. I just wish they could have presented their material in a more effective manner.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8543884999596856956?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8543884999596856956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8543884999596856956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8543884999596856956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8543884999596856956'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/08/mostly-disappointing-meeting.html' title='(Mostly) disappointing meeting'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1156924940203010416</id><published>2009-08-12T06:57:00.003-05:00</published><updated>2009-09-10T10:16:44.281-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 R2'/><category scheme='http://www.blogger.com/atom/ns#' term='CTP'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server 2008 R2 CTP is now available</title><content type='html'>&lt;p&gt;Earlier this week Microsoft announced that the first CTP for SQL Server 2008 R2 is available for download. You can get a copy through TechNet or MSDN, or on the site page &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/r2.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;According to &lt;a href="http://blogs.zdnet.com/microsoft/?p=3678" target="_blank"&gt;Mary Jo Foley&lt;/a&gt;, R2 is tied tightly in with the upcoming Office 2010 release. Both can be expected in the first half of 2010, around May or June.Personally I’m hoping for April, before my TechNet subscription runs out.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:18d5edc5-d5aa-469d-9a7b-810e96060259" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL+2008+R2" rel="tag"&gt;SQL 2008 R2&lt;/a&gt;,&lt;a href="http://technorati.com/tags/CTP" rel="tag"&gt;CTP&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SQL" rel="tag"&gt;SQL&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1156924940203010416?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1156924940203010416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1156924940203010416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1156924940203010416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1156924940203010416'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/08/sql-server-2008-r2-ctp-is-now-available.html' title='SQL Server 2008 R2 CTP is now available'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-725922509115164902</id><published>2009-08-12T06:39:00.004-05:00</published><updated>2009-09-10T10:17:08.393-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='Replays'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Replaying traces, Part 4</title><content type='html'>&lt;p&gt;So far we’ve replayed the same workload on 3 virtual servers, each with 4 CPUs, and 3 physical servers, 2 with 4 CPUs and 1 with 16 CPUs. We also ran one with 8 CPUs but that replay appeared to hang at 99%.&lt;/p&gt;&lt;p&gt;All the physical replays showed the same trends. A 16 CPU server performed better than 4 CPUs, Hyper-threading off performed better than hyper-threading on. The average for IO and transactions/sec followed the same curve; the longer the replay time the lower the average.&lt;/p&gt;&lt;p&gt;But the virtual server replays showed a different trend. All of these completed in less time &lt;/p&gt;&lt;p&gt;than the 4 CPU tests on a physical server. And the averages for IO and transactions/sec were noticeably less. Since the workload was the same in each case we expected the averages to be consistent with the trend set by the physical since the total number of transactions and IO should have bee the same across the board.&lt;/p&gt;&lt;p&gt;I’m guessing that there were more deadlocks on the virtual than the physical. In all cases the CPU usage was the same, averaging higher than 80%. If deadlock victims are rolled back it would explain the decrease in total IO. But I don’t know if a rolled back transaction is still considered a transaction by the Windows counters. This is going to take some research.&lt;/p&gt;&lt;p&gt;We have some more tests scheduled using a 64 bit virtual server and one test using VMWare’s newest host that supports virtual servers running 8 CPUs.&amp;#160; &lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:31af5b20-3872-4847-b909-cc4341deff6a" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL" rel="tag"&gt;SQL&lt;/a&gt;,&lt;a href="http://technorati.com/tags/replays" rel="tag"&gt;replays&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-725922509115164902?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/725922509115164902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=725922509115164902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/725922509115164902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/725922509115164902'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/08/replaying-traces-part-4.html' title='Replaying traces, Part 4'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6651494898773491536</id><published>2009-08-05T12:25:00.003-05:00</published><updated>2009-09-10T10:17:41.465-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>SQL Server 2008 Training Kit is available</title><content type='html'>&lt;p&gt;One of the things I like about Microsoft is the wealth of training they make available for their products. There was a training kit for ASP.NET, one for Visual Basic 2008, and now there’s one for SQL Server 2008. You can get yours at &lt;a title="http://www.microsoft.com/downloadS/details.aspx?familyid=E9C68E1B-1E0E-4299-B498-6AB3CA72A6D7&amp;amp;displaylang=en" href="http://www.microsoft.com/downloadS/details.aspx?familyid=E9C68E1B-1E0E-4299-B498-6AB3CA72A6D7&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloadS/details.aspx?familyid=E9C68E1B-1E0E-4299-B498-6AB3CA72A6D7&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6651494898773491536?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6651494898773491536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6651494898773491536' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6651494898773491536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6651494898773491536'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/08/sql-server-2008-training-kit-is.html' title='SQL Server 2008 Training Kit is available'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6279150336867617589</id><published>2009-07-24T09:15:00.003-05:00</published><updated>2009-09-10T10:18:09.467-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='trace replay'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Replaying traces, Part 3</title><content type='html'>I had a few surprises when I began replaying a production workload on a virtual server. I'm using the same workload I captured from a production server and replayed on a physical server in different scenarios. The first virtual test was on a 32 bit server hosted on a VMWare box with CPU affinity turned on. A limitation of virtual servers (at least for now) is that they are limited to 4 CPUs.&lt;br /&gt;&lt;br /&gt;The first surprise was that the replay was faster than the 4 CPU test on a physical server, 3:07 virtual compared to 3:40 physical. The second surprise is that the total number of transactions appeared to have dropped.  &lt;br /&gt;&lt;br /&gt;I'll be looking into this to see what I'm missing, and I'll post more details soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6279150336867617589?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6279150336867617589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6279150336867617589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6279150336867617589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6279150336867617589'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/07/replaying-traces-part-3.html' title='Replaying traces, Part 3'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8510760694693515993</id><published>2009-07-22T13:28:00.002-05:00</published><updated>2009-09-10T10:21:59.519-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='trace replay'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Replaying traces, Part 2</title><content type='html'>&lt;p&gt;When I left off, I was discussing using SQL Profiler to replay a trace taken on a production server on different test boxes with different configurations. The end result is to see if we can virtualize our production OLTP database servers.&lt;/p&gt;&lt;p&gt;Our next step in testing was to test replaying a trace on the same server it was captured on. We couldn’t do this on a production server so we used our testing server and assigned our developers to hit the database with our application for one hour. Afterwards we restored the databases to the same state they were in and replayed the trace using the same options we use on the other server tests; using multi-threading, not displaying results, and not replaying server SPIDs. The replay of the trace took only 45 minutes. We probably didn’t capture a large enough workload. But we did rule out the overhead of running the replay when comparing to performance of the production server when the workload was captured.&lt;/p&gt;&lt;p&gt;Back to testing. Since we can’t exactly duplicate the replay of the workload to match the production server, we decided that running the replay on the test server would be our new baseline since we could duplicate that for every test. Testing on the physical box showed the following:&lt;/p&gt;&lt;table border="0" cellspacing="0" cellpadding="2" width="500"&gt;&lt;tbody&gt;&lt;tr&gt;       &lt;td valign="top" width="89"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="85"&gt;Production&lt;/td&gt;        &lt;td valign="top" width="102"&gt;16 CPU (new baseline)&lt;/td&gt;        &lt;td valign="top" width="112"&gt; 4 CPU, HT ON&lt;/td&gt;        &lt;td valign="top" width="110"&gt;4 CPU, HT OFF&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;       &lt;td valign="top" width="89"&gt;Time&lt;/td&gt;        &lt;td valign="top" width="85"&gt;         &lt;p align="center"&gt;1:07&lt;/p&gt;&lt;/td&gt;        &lt;td valign="top" width="102"&gt;         &lt;p align="center"&gt;2:37&lt;/p&gt;&lt;/td&gt;        &lt;td valign="top" width="112"&gt;         &lt;p align="center"&gt;3:40&lt;/p&gt;&lt;/td&gt;        &lt;td valign="top" width="110"&gt;         &lt;p align="center"&gt;2:44&lt;/p&gt;&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;       &lt;td valign="top" width="89"&gt;Avg CPU&lt;/td&gt;        &lt;td valign="top" width="85"&gt;         &lt;p align="center"&gt;17%&lt;/p&gt;&lt;/td&gt;        &lt;td valign="top" width="102"&gt;         &lt;p align="center"&gt;24%&lt;/p&gt;&lt;/td&gt;        &lt;td valign="top" width="112"&gt;         &lt;p align="center"&gt;83%&lt;/p&gt;&lt;/td&gt;        &lt;td valign="top" width="110"&gt;         &lt;p align="center"&gt;77%&lt;/p&gt;&lt;/td&gt;     &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;We expected the 4 CPU tests to take longer and use more CPU. We were surprised that the 4 CPU test with hyper-threading turned off performed better than with hyper-threading on. So we ran one more test, using all physical processors and turning ht off. This gave us 8 physical processors to work with. This test, though, was incomplete. We ran it twice and both time the replay appeared to hang after completing 99%. Both times we needed to kill the replay after 5 hours. The counters we captured weren’t valid.&lt;/p&gt;&lt;p&gt;I’ll post on testing on a virtual server in a future post.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f69a880a-156c-4038-8309-87a05c53a470" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL" rel="tag"&gt;SQL&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Trace+replay" rel="tag"&gt;Trace replay&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8510760694693515993?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8510760694693515993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8510760694693515993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8510760694693515993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8510760694693515993'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/07/replaying-traces-part-2.html' title='Replaying traces, Part 2'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8453116037686940680</id><published>2009-06-30T12:49:00.001-05:00</published><updated>2009-06-30T12:49:58.171-05:00</updated><title type='text'>Testing posting with Live Writer and a proxy</title><content type='html'>&lt;p&gt;I’m seeing if I can get through the firewall.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8453116037686940680?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8453116037686940680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8453116037686940680' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8453116037686940680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8453116037686940680'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/06/testing-posting-with-live-writer-and.html' title='Testing posting with Live Writer and a proxy'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1011194354260453886</id><published>2009-06-30T06:39:00.001-05:00</published><updated>2009-06-30T06:39:26.126-05:00</updated><title type='text'>Using Live Writer</title><content type='html'>&lt;p&gt;I’ve seen quite a few blogs about Windows Live Writer. Opinions seem to vary as to the usefulness of the tool. So I thought it was time I tried it out for myself.&lt;/p&gt;  &lt;p&gt;This is the first post I’ve made with it. I’m just using basic word processing so it shouldn’t be too different than what I use now. That would be OneNote and Word, sometimes just entering right from blogger. But this looks to have most, if not all, the same capabilities. So we’ll see.&amp;#160; &lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b828851c-4b27-4ed6-95ab-9f7c399cdde4" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Live+Writer" rel="tag"&gt;Live Writer&lt;/a&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1011194354260453886?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1011194354260453886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1011194354260453886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1011194354260453886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1011194354260453886'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/06/using-live-writer.html' title='Using Live Writer'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8931287457455161391</id><published>2009-06-17T07:15:00.004-05:00</published><updated>2009-09-10T10:24:14.284-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='trace replay'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Replaying traces with SQL Profiler</title><content type='html'>One of the projects I've become involved with at work has been the virtualization of our regional databases. However, when we hooked up a copy of one of the databases in a virtual environment we noticed a huge performance degradation, mainly in regard to CPU usage. The only part of the server that was virtualized was the drive containing the OS. User databases were mainly placed on a SAN so the IO looked to be acceptable, at least based on the small workload we generated. We know that the servers were not comparable; the current, physical server has 16 CPUs, where the virtual server is limited by VMWare to 4. Since performance was much worse than expected, we decided to try and replay a workload from one of our production servers on a virtual server and compare the results.&lt;br /&gt; &lt;br /&gt;We thought of a few different ways to do this, but we eventually decided on using the replay ability of SQL Profiler. So we captured a trace from production, set up a copy of the databases on a second physical server configured identically to the production server, then used the different options inside profiler for the replay. What we saw was surprising.&lt;br /&gt;&lt;br /&gt;The original trace was run for an hour. Using the multithreading option on the test box, the replay took twice as long, and the CPU usage was at least 10% higher for the length of the replay. When we set the number of threads to 64, the replay took 5 hours, and the CPU usage was maybe 25% of the original trace.&lt;br /&gt;&lt;br /&gt;So the next step is to replay a trace on the same server to see what the results are. I'll post more on this in a few days, after a few more test cases. I'll also include some of the actual numbers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8931287457455161391?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8931287457455161391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8931287457455161391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8931287457455161391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8931287457455161391'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/06/replaying-traces-with-sql-profiler.html' title='Replaying traces with SQL Profiler'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-3586697268485366701</id><published>2009-04-09T06:41:00.003-05:00</published><updated>2009-09-10T10:24:59.697-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>How to change the display name of mail sent with DB Mail</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;Recently I had a manager complain that emails from some of our SQL 2005 servers were displaying different "From" aliases. These emails were being sent via DB Mail in jobs that were on all servers. I thought all the servers were configured the same; the same email account was being used on all, the same Exchange server, all the profiles had the server name as the display name. &lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;br /&gt; &lt;/p&gt;&lt;p&gt;However I missed one thing. Two servers were using  Windows Authentication of the database engine and two were using Anonymous. The two using Windows Auth picked up the display name from Exchange, the 2 using Anonymous used the display name of the DB Mail profile. &lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;br /&gt; &lt;/p&gt;&lt;p&gt;A small thing, but useful in the future if I need to change the display name of email sent from a server.&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-3586697268485366701?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/3586697268485366701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=3586697268485366701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3586697268485366701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3586697268485366701'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/04/how-to-change-display-name-of-mail-sent.html' title='How to change the display name of mail sent with DB Mail'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-9026314194950339274</id><published>2009-02-17T13:32:00.002-06:00</published><updated>2009-09-10T10:25:33.066-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='Troubleshooting'/><title type='text'>Start with the basics when troubleshooting</title><content type='html'>Recently I began troubleshooting an issue on one of our servers. The issue is that the alerts I set up for jobs and on the server itself weren't sending emails to the operator I configured. This was happening for a while but I never had time to look at it in detail until now. And besides, I kept a close eye on the server so I would know if there were any problems. I had our other servers set up the same way, and none of them were having any issues. All the servers were using the same email account, and I set up all the database profiles to be identical. And I never had issues sending emails using send_dbmail.&lt;br /&gt;&lt;br /&gt;So of course I checked and rechecked all the email account settings against a server that worked. I even went so far as deleting the email profile and creating a new one. Nothing I did had any effect. Finally I did what I should have done in the first place; check to see if the SQL Agent  had email enabled for alerts. Sure enough if didn't.&lt;br /&gt;&lt;br /&gt;The moral of my story is to start at the beginning when troubleshooting, no matter how basic it seems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-9026314194950339274?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/9026314194950339274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=9026314194950339274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/9026314194950339274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/9026314194950339274'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/02/start-with-basics-when-troubleshooting.html' title='Start with the basics when troubleshooting'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5751119888431498912</id><published>2009-01-20T08:37:00.004-06:00</published><updated>2009-09-10T10:26:17.244-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'></title><content type='html'>One of the first things you'll probably notice is the Surface Area Configuration Tool, introduced in SQL 2005, is not there. Actually it's still part of the server, only its moved. Now you access it by connecting to the server using the Management Studio,  right clicking on the server name and choose "Facets" from the menu. When the View Facet screen opens, select "Surface Area Configuration" from the Facet combo box. Notice that by default all options are turned off; I specifically turned Database Mail on.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_R-tbJU7CXwQ/SXXiTHJ5oDI/AAAAAAAAASk/1UCnKfNkuGQ/s1600-h/SAC.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 278px;" src="http://1.bp.blogspot.com/_R-tbJU7CXwQ/SXXiTHJ5oDI/AAAAAAAAASk/1UCnKfNkuGQ/s320/SAC.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5293385755009851442" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5751119888431498912?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5751119888431498912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5751119888431498912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5751119888431498912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5751119888431498912'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/01/one-of-first-things-youll-probably.html' title=''/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_R-tbJU7CXwQ/SXXiTHJ5oDI/AAAAAAAAASk/1UCnKfNkuGQ/s72-c/SAC.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4223755809865369621</id><published>2009-01-05T12:57:00.001-06:00</published><updated>2009-09-10T10:26:56.996-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Moving a reporting database</title><content type='html'>Another task I just finished in regards to SSRS was moving the reporting database. We have an older server we were using for developing the report on. The system team gave us a virtual server  (we're going to run virtual when we go live). I wanted to copy the existing catalogs to the new server so I wouldn't have to re-deploy them all. These are the steps I took. In my case the new report server was already installed and configured&lt;br /&gt;&lt;br /&gt;1. Backup the encryption key on the source server using the Report Server Configuration Manager. This should be done regardless.&lt;br /&gt;2. Backup the reporting database on the source server. &lt;br /&gt;3. Restore the backup from the source to the destination server. &lt;br /&gt;4. Apply the encryption key from the source onto the destination.&lt;br /&gt;&lt;br /&gt;After I completed these steps all the reports and their data sources and credentials appeared on the new server's Report Manager. Hopefully I haven't missed anything.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4223755809865369621?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4223755809865369621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4223755809865369621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4223755809865369621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4223755809865369621'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/01/moving-reporting-database.html' title='Moving a reporting database'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4845242503056167854</id><published>2009-01-05T08:20:00.002-06:00</published><updated>2009-09-10T10:27:32.355-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Getting data into a page header in SSRS</title><content type='html'>As I've mentioned before, we're moving MS Access97 reports to SSRS 2008. Recently I came across another issue, repeating data in a page header. You may or may not know it, but you can't directly add a data field to a page/report headers and footers. If you want your data to repeat you need to employ a workaround. One way is to use parameters and use a second data set for the parameters. I tried this method, but I had a problem when the page changed; the header didn't always mirror what was in my group. I also tried group headers that repeated on each page, but the report I'm working with also has sub reports that may or may not span pages. I found when that happened the group headers didn't repeat properly.&lt;br /&gt;&lt;br /&gt;The solution I came up with is to set the values in code. The first step was to declare a public variable for each field I needed on my page header. The second step was to create a function that set the value of the variables to a parameter passed into the function. I then added a hidden text box on the body of my report that called my functioned and passed in the values I needed on the page header. Finally I added the page header section, added a text box for each field I needed, and used an expression to call the public variable I declared in the first step.&lt;br /&gt;&lt;br /&gt;This isn't my invention; there are examples of this on the web. I don't have a source handy but I'll cite a few that I used later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4845242503056167854?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4845242503056167854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4845242503056167854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4845242503056167854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4845242503056167854'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2009/01/getting-data-into-page-header-in-ssrs.html' title='Getting data into a page header in SSRS'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4026115541930951673</id><published>2008-12-24T07:14:00.001-06:00</published><updated>2008-12-24T07:16:03.553-06:00</updated><title type='text'>Happy Holidays!</title><content type='html'>I hope everyone has a very healthy, happy, and Merry Christmas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4026115541930951673?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4026115541930951673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4026115541930951673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4026115541930951673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4026115541930951673'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/12/happy-holidays.html' title='Happy Holidays!'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6181633313241095217</id><published>2008-12-18T08:13:00.001-06:00</published><updated>2009-09-10T10:28:00.069-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='SSRS'/><title type='text'>Reporting Service "features"</title><content type='html'>I've been a proponent of Microsoft's SQL Server Reporting Services (SSRS since 2005) since it was first released in beta for SQL 2000. I thought the product was a natural, combining a report writer with the database. I especially loved the ease of deploying individual reports. The first product was rough, but I figured it would improve with time. By the time SSRS 2005 came out it was a stable product, but it lacked some features, like rich textbox formatting and exporting to MS Word.  SSRS 2008 added those features, so I thought all was right with the world.  Silly me.&lt;br /&gt;&lt;br /&gt;My client has been using some reports written for SSRS 2005. Recently we began converting their existing reporting application from MS Access 97 (please don't snicker too loud) to SSRS 2008. We started with small, simple reports. These worked out nicely, and developers were able to learn how to use the report designer fairly quickly. I began converting a much more complex report that had tons of Access code-behind and sub reports. Much on the report is determined by what the user wants to see. Creating the report in SSRS 2008 was time consuming, but it worked out nicely.&lt;br /&gt;&lt;br /&gt;The "features" came out after I created the first, main report and checked the reporting project into Visual Source Safe. After that I started running into all kinds of problems, some of which are;&lt;br /&gt;&lt;br /&gt;○ Very often, with no reason, credentials for the data sources would change from what we use to no credentials. I first noticed this after I checked the solution out of VSS. At first I thought the last person to check out the file changed it for some reason. Then I noticed that it didn't matter who last touched the file; even files that were never checked out were affected. And this also happened to files that were never checked into VSS.&lt;br /&gt;○ Another annoyance is when a dataset changed from running a stored procedure to running text. This can happen if you modify the data source (see above), and also happened in SSRS 2005 if you merely opened the dataset definition to see what it was pulling.&lt;br /&gt;○ Inconsistent behavior. For instance, the main report has 2 very similar sub reports. The user can choose to see  sub report A, sub report B, or neither. Simple, right? Just set the sub-report visibility to display based on the user's choice. It worked fine if the user chose A or B; the correct sub report was displayed and the correct sub report was hidden. But if the user chose to hide both, then both display. I'm not going to post the code here, but suffice it to say the code was correct; it's being used on many other sub reports on the same main report. So how did I fix it? I moved the code to a report function. The bottom line is the very same code that didn't work as an expression of the visibility property of the sub report worked correctly when called as a function!    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There's more, but this is enough for this post. I'll be adding to it soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6181633313241095217?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6181633313241095217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6181633313241095217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6181633313241095217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6181633313241095217'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/12/reporting-service-features.html' title='Reporting Service &quot;features&quot;'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5526638641366607855</id><published>2008-12-05T07:33:00.003-06:00</published><updated>2009-09-10T10:28:26.234-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQLServerPedia Syndication'/><title type='text'>Object Explorer Details in 2008 SSMS</title><content type='html'>&lt;a href="http://3.bp.blogspot.com/_R-tbJU7CXwQ/STkvRVDqn0I/AAAAAAAAAOw/Dv0V4B-rotQ/s1600-h/SSMS.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 193px;" src="http://3.bp.blogspot.com/_R-tbJU7CXwQ/STkvRVDqn0I/AAAAAAAAAOw/Dv0V4B-rotQ/s320/SSMS.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5276300413198049090" /&gt;&lt;/a&gt;&lt;br /&gt;One of the things I love most in SQL 2008 SSMS is the way Microsoft redid the Object Explorer Details page. Now it shows some really useful information. You can change what columns display by right-clicking on the column bar and checking which columns you want to see.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5526638641366607855?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5526638641366607855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5526638641366607855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5526638641366607855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5526638641366607855'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/12/object-explorer-details-in-2008-ssms.html' title='Object Explorer Details in 2008 SSMS'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_R-tbJU7CXwQ/STkvRVDqn0I/AAAAAAAAAOw/Dv0V4B-rotQ/s72-c/SSMS.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-120491740303045804</id><published>2008-12-04T08:35:00.000-06:00</published><updated>2008-12-04T08:36:32.858-06:00</updated><title type='text'>I need to catch up</title><content type='html'>It's been quite a while since I've blogged about anything. Mostly it's because I've been busy at work; creating a new reporting interface, critical disaster at one of our data centers, busy time of year. But in reality it's because I've been too lazy. I mean, really, I've got a long commute to work (1 1/2 hours by train each way) so there's no excuse why I can't do more. If nothing else, it's a way for me to capture my thoughts/actions of the day.&lt;br /&gt; &lt;br /&gt;So, beginning today, I (once again) vow to blog more often. And I'll try to keep this blog technical; no one really wants to read about my personal life.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-120491740303045804?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/120491740303045804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=120491740303045804' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/120491740303045804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/120491740303045804'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/12/i-need-to-catch-up.html' title='I need to catch up'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1488673168772550625</id><published>2008-07-10T08:14:00.002-05:00</published><updated>2008-07-10T08:19:36.617-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>SQL 2008 on August price list</title><content type='html'>OK, I guess this means we can order it next month. However &lt;a href="http://blogs.technet.com/dataplatforminsider/archive/2008/07/09/sql-server-2008-available-on-august-price-list.aspx"&gt;this article&lt;/a&gt;from a TechNet blog only states that 2008 will be on the August list, not that it will ship then. &lt;br /&gt;&lt;br /&gt;But this is still good news. If it doesn't ship in August, surely it will be very soon after.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1488673168772550625?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1488673168772550625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1488673168772550625' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1488673168772550625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1488673168772550625'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/07/sql-2008-on-august-price-list.html' title='SQL 2008 on August price list'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1428109096237433365</id><published>2008-07-10T08:09:00.002-05:00</published><updated>2008-07-10T08:12:31.360-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>Catching up after vacation</title><content type='html'>First and foremost, I passed 70-447 on June 27th. I'm done with the 2005 exams, not going to worry about the BI track since I'm not that fluent in SSAS or SSIS (I do know SSRS pretty well, though). So I made my goal of being certified in SQL 2005 before SQL 2008 came out.&lt;br /&gt;&lt;br /&gt;Speaking of which, Microsoft just announced yesterday that 2008 will ship in August. More on that later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1428109096237433365?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1428109096237433365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1428109096237433365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1428109096237433365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1428109096237433365'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/07/catching-up-after-vacation.html' title='Catching up after vacation'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6587572180857652974</id><published>2008-06-10T08:35:00.002-05:00</published><updated>2008-06-10T08:42:38.036-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>Installing RC0, Part 1</title><content type='html'>OK, so I installed SQl 2008 RC0 yesterday. It was mostly successful. But it was missing the Business Intelligence stuff. I know that there's an issue where you can't upgrade an existing BI install. But I'm running SQL2005 and I was able to install CTP6 with no problems. Unfortunately I don't remember the steps I took to install BI for SQL2008. I did uninstall CTP6 before starting in on RC0.&lt;br /&gt;&lt;br /&gt;I've reverted back to CTP6 and I'll try again. This time I'll document the uninstall steps. I obviously missed something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6587572180857652974?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6587572180857652974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6587572180857652974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6587572180857652974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6587572180857652974'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/06/installing-rc0-part-1.html' title='Installing RC0, Part 1'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1471816516443122622</id><published>2008-06-06T19:08:00.002-05:00</published><updated>2008-06-06T19:10:30.924-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>SQL 2008 RC0 is out</title><content type='html'>At least it's available through TechNet and MSDN. I'm downloading it now, and I'll play with installing it on my train rides next week. I can't really dig deep since I'm concentrating on 70-447. But once that's over...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1471816516443122622?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1471816516443122622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1471816516443122622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1471816516443122622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1471816516443122622'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/06/sql-2008-rc0-is-out.html' title='SQL 2008 RC0 is out'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-1174213877484928079</id><published>2008-06-03T08:15:00.002-05:00</published><updated>2008-06-03T08:19:52.565-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>One to go..</title><content type='html'>I passed 70-442 on 5/30. Now I've got my MCITP as aDatabase Developer. Next up, and probably my final SQl 2005 exam,will be the update exam 70-447. I've scheduled that one for 6/27. That means I'll have taken 3 exams in 2 months. It seems to be working. Scheduling the test early forces me to be more prepared. I can focus better on the study material when I have a real deadline in place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-1174213877484928079?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/1174213877484928079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=1174213877484928079' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1174213877484928079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/1174213877484928079'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/06/one-to-go.html' title='One to go..'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8427909567399439461</id><published>2008-05-05T10:14:00.002-05:00</published><updated>2008-05-05T10:19:13.297-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>Taking 70-442 Next</title><content type='html'>I must be crazy, or overconfident, or both. I just scheduled to take 70-442 on May 30th. I'm figuring 2 things; 1, I'm pretty sure of the test material since I work with SQL 2005 daily and I've already read the MS Press training guide and 2, Microsoft's free Second Shot voucher expires at the end of the month. So this way, even if I fail (but that won't happen, right?)I get to retake it at no extra cost. So there's less pressure.&lt;br /&gt;&lt;br /&gt;And since I've already passed 70-431 and 70-441, this will make me MCITP as a database developer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8427909567399439461?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8427909567399439461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8427909567399439461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8427909567399439461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8427909567399439461'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/05/taking-70-442-next.html' title='Taking 70-442 Next'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-5783908686552232408</id><published>2008-05-02T09:33:00.004-05:00</published><updated>2008-05-02T09:45:53.153-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Passed 70-441</title><content type='html'>Yesterday I passed Microsoft's 70-441 exam, Designing Database Solutions by Using Microsoft SQL Server 2005. Since I've already passed 70-431 and I'm also a MCDBA, I just need to take (and pass) 70-442 and 70-447 to become MCITP as both a Database Developer and a Database Administrator. Maybe I can run across another free exam voucher!&lt;br /&gt;&lt;br /&gt;I don't want to break any confidentiality rules, so I won't talk about the exam in detail. But I will say that this exam was the easist Microsoft exam I've taken to date. I've been working with SQL on a daily basis for nine years now, and 2005 since it first was a CTP. That experience, plus now being the de facto DBA on my team at work, was major in preparing for the exam. The MS Press Training Kit was good for studying areas I don't know as much about, like the Service Broker and Notification Services, and it has a good exam simulation. And of course I must thank Microsoft for having the series of 4 webcasts on 70-441 (they're available on demand, I'll post the link later), and Tim Kashani for the great job of presenting the material. Not to mention receiving the free voucher.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-5783908686552232408?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/5783908686552232408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=5783908686552232408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5783908686552232408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/5783908686552232408'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/05/passed-70-441.html' title='Passed 70-441'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8009837171055746136</id><published>2008-04-16T07:54:00.003-05:00</published><updated>2008-04-16T08:05:57.996-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SP3'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL 2005 SP3 on the way</title><content type='html'>The good news: It looks like Microsoft is finally going to release Service Pack 3 for SQl 2005. The bad news: It won't be until Q4 of 2008, after the release of SQL 2008. Aaron Bertrand on&lt;a href="http://sqlblog.com/"&gt; SQLBlogs &lt;/a&gt;talks more about it &lt;a href="http://blogs.technet.com/dataplatforminsider/archive/2008/04/15/sql-server-2005-sp3-coming-soon.aspx"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is something that was a long time coming. Microsoft has something like 7 cumulative hot fixes. Some of the things on that list are things I want to start testing. One patch is for a problem I see on occasion, where our production servers kick out a SQL dump on a non-yielding process. This was addressed in SP2, which we're running, but not fully. I've seen other blogs that referenced a fix in one of the patches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8009837171055746136?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8009837171055746136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8009837171055746136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8009837171055746136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8009837171055746136'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/04/sql-2005-sp3-on-way.html' title='SQL 2005 SP3 on the way'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7879912153211166574</id><published>2008-04-07T15:26:00.002-05:00</published><updated>2008-04-07T15:32:09.587-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>Taking 70-441 in 3 1/2 weeks</title><content type='html'>Hopefully I'll have enough time to study, especially since I'm on vacation for the 2 weeks previous to that.&lt;br /&gt;&lt;br /&gt;I've read the MS Press training kit for this exam, and I've already passed 70-431 last summer. I know that won't be enough to pass this one, bit at least i've got a starting point for my studying. I also watched 4 webcasts that the Microsoft Partner program had on last year; I'll re-watch those. Too bad they're not downloadable. They'd be perfect for my daily commute.&lt;br /&gt;&lt;br /&gt;But I can't complain about those webcasts. I got a voucher to take the exam for free!. The only thing was that it expires on May 1st, hence the quickly approaching date.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7879912153211166574?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7879912153211166574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7879912153211166574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7879912153211166574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7879912153211166574'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/04/taking-70-441-in-3-12-weeks.html' title='Taking 70-441 in 3 1/2 weeks'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8359069131598636192</id><published>2008-02-29T14:22:00.003-06:00</published><updated>2008-02-29T14:35:21.448-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CTP 6'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><title type='text'>CTP6 issue with leap year</title><content type='html'>I just ran across this, ironic since I just updated a test computer from CTP5 to CTP6and wondered why it wasn't working;&lt;br /&gt;&lt;br /&gt;"We have recently discovered an issue with SQL Server 2008 CTPs that result in SQL Server 2008 not starting or installing on Feb 29 GMT only. We recommend that you do not run, install or upgrade this CTP on Feb 29 GMT to minimize any impact in your environment. You can install starting on March 1 GMT. If you have an immediate issue that cannot wait until March 1st GMT contact csskat@microsoft.com before taking any further steps."&lt;br /&gt;&lt;br /&gt;I mean, I know it's pre-release and all but come on - leap year?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8359069131598636192?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8359069131598636192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8359069131598636192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8359069131598636192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8359069131598636192'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/02/ctp6-issue-with-leap-year.html' title='CTP6 issue with leap year'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-6998413145826607435</id><published>2008-02-27T07:57:00.001-06:00</published><updated>2008-02-27T07:59:38.760-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Launch Event'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Microsoft 2008 Launch Event</title><content type='html'>Today is Microsoft's launch event for Windows Server 2008, Visual Studio 2008, and SQL 2008. If you haven't already signed up, you should do so at &lt;a href="http://www.microsoft.com/heroeshappenhere/default.mspx"&gt;Heroes Happen Here&lt;/a&gt;. Beside's today's launch in Los Angeles there is a list of cities where the event will take place. There are a number of different track you can attend based on your interests. And the content should also be on-line for a while. The event is free to anyone who registers. Sign up soon - spots are going fast!&lt;br /&gt; &lt;br /&gt;SQL 2008 won't be released until the 3rd quarter of this year, but I still plan to attend the launch when it comes to Chicago on March 11th. It's a good idea to get a head start on the new features. I'm still working my way through all the new features in 2005! But the good news is that most, if not all, features introduced in 2005 will stay in 2008. The one noticeable difference is Notifications - that's gone. And I still need to see what happened to the Surface Area tool introduced in the last release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-6998413145826607435?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/6998413145826607435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=6998413145826607435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6998413145826607435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/6998413145826607435'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/02/microsoft-2008-launch-event.html' title='Microsoft 2008 Launch Event'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-2761942454632563449</id><published>2008-02-21T18:43:00.003-06:00</published><updated>2008-02-29T14:27:47.534-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CTP 6'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Backup'/><title type='text'>CTP6 - Backup compression</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_R-tbJU7CXwQ/R74cANslOSI/AAAAAAAAACw/JpN_ZU2aV30/s1600-h/2008Compression.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5169600212270135586" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_R-tbJU7CXwQ/R74cANslOSI/AAAAAAAAACw/JpN_ZU2aV30/s320/2008Compression.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span xmlns=""&gt;&lt;br /&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;The Enterprise Edition of SQL 2008 now offers the ability to compress database backups. If you use the GUI for the backup, the compression option is the last choice on the Options page&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;Once there you'll have 3 choices; Use the default server setting (set to 0 after installation, use sp_configure to change it), Compress backup, and Do not compress backup. If you use a script, just add the COMPRESSION keyword:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;BACKUP&lt;/span&gt; &lt;span style="color:blue;"&gt;DATABASE&lt;/span&gt; [AdventureWorks] &lt;span style="color:blue;"&gt;TO&lt;/span&gt; DISK &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:red;"&gt;N'C:\ADWorks.bak'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;WITH&lt;/span&gt; &lt;span style="color:blue;"&gt;NOFORMAT&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;INIT&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; NAME &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:red;"&gt;N'AdventureWorks-Full Database Backup'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="color:blue;"&gt;SKIP&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;NOREWIND&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;NOUNLOAD&lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="COLOR: blue;color:yellow;" &gt;COMPRESSION&lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:green;"&gt;STATS&lt;/span&gt; &lt;span style="color:gray;"&gt;=&lt;/span&gt; 10&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;color:blue;"&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;I tested backing up the AdventureWorks sample database (always a good idea if you're going to play with it). The uncompressed file size is roughly 175 MB; the compressed is about 40.25 MB. There's not much free space in the database, less that 1 MB, and the size of the database matches the uncompressed size, which is what I expected.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;What I didn't expect is that the compressed backup appears to have run faster than the uncompressed backup. When testing I ran each backup 3 times and I only used the default settings (other than the compression option). Both backed up to the same disk drive and nothing else was running at the time that would have affected the backup.&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;Here's a sample output from the uncompressed backup: &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;BACKUP&lt;/span&gt; &lt;span style="color:blue;"&gt;DATABASE&lt;/span&gt; [AdventureWorks] &lt;span style="color:blue;"&gt;TO&lt;/span&gt; DISK &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:red;"&gt;N'c:\ADWorks_Uncompressed.bak'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;WITH&lt;/span&gt; &lt;span style="color:blue;"&gt;NOFORMAT&lt;/span&gt;&lt;span style="color:gray;"&gt;, &lt;/span&gt;&lt;span style="color:blue;"&gt;INIT&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; NAME &lt;span style="color:gray;"&gt;= &lt;/span&gt;&lt;span style="color:red;"&gt;N'AdventureWorks-Full Database Backup'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;SKIP&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;NOREWIND&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;NOUNLOAD&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:green;"&gt;STATS &lt;/span&gt;&lt;span style="color:gray;"&gt;=&lt;/span&gt; 10&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;color:blue;"&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Processed 21864 pages &lt;span style="color:blue;"&gt;for&lt;/span&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; &lt;span style="color:red;"&gt;'AdventureWorks'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;file &lt;/span&gt;&lt;span style="color:red;"&gt;'AdventureWorks_Data'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;on&lt;/span&gt; &lt;span style="color:blue;"&gt;file&lt;/span&gt; 1.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;100 &lt;span style="color:blue;"&gt;percent&lt;/span&gt; processed&lt;/span&gt;&lt;span style="font-size:85%;color:gray;"&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Processed 1 pages &lt;span style="color:blue;"&gt;for&lt;/span&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; &lt;span style="color:red;"&gt;'AdventureWorks'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;file&lt;/span&gt; &lt;span style="color:red;"&gt;'AdventureWorks_Log'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;on&lt;/span&gt; &lt;span style="color:blue;"&gt;file&lt;/span&gt; 1.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;BACKUP&lt;/span&gt; &lt;span style="color:blue;"&gt;DATABASE&lt;/span&gt; successfully processed 21865 pages &lt;span style="color:gray;"&gt;in&lt;/span&gt; 20.349 seconds&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;8.394 MB&lt;span style="color:gray;"&gt;/&lt;/span&gt;sec&lt;/span&gt;&lt;span style="color:gray;"&gt;&lt;span style="font-size:85%;"&gt;).&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;And here's a sample from the compressed version:&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;BACKUP&lt;/span&gt; &lt;span style="color:blue;"&gt;DATABASE&lt;/span&gt; [AdventureWorks] &lt;span style="color:blue;"&gt;TO&lt;/span&gt; DISK &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:red;"&gt;N'C:\ADWorks.bak'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;WITH&lt;/span&gt; &lt;span style="color:blue;"&gt;NOFORMAT&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;INIT&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; NAME &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:red;"&gt;N'AdventureWorks-Full Database Backup'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;SKIP&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;NOREWIND&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;NOUNLOAD&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;COMPRESSION&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:green;"&gt;STATS&lt;/span&gt; &lt;span style="color:gray;"&gt;=&lt;/span&gt; 10&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;color:blue;"&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Processed 21864 pages &lt;span style="color:blue;"&gt;for&lt;/span&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; &lt;span style="color:red;"&gt;'AdventureWorks'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;file&lt;/span&gt; &lt;span style="color:red;"&gt;'AdventureWorks_Data'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;on&lt;/span&gt; &lt;span style="color:blue;"&gt;file&lt;/span&gt; 1.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-size:85%;"&gt;100 &lt;span style="color:blue;"&gt;percent&lt;/span&gt; processed&lt;/span&gt;&lt;span style="font-size:85%;color:gray;"&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;Processed 2 pages &lt;span style="color:blue;"&gt;for&lt;/span&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; &lt;span style="color:red;"&gt;'AdventureWorks'&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt; &lt;span style="color:blue;"&gt;file&lt;/span&gt; &lt;span style="color:red;"&gt;'AdventureWorks_Log'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;on&lt;/span&gt; &lt;span style="color:blue;"&gt;file&lt;/span&gt; 1.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:blue;"&gt;BACKUP&lt;/span&gt; &lt;span style="color:blue;"&gt;DATABASE&lt;/span&gt; successfully processed 21866 pages &lt;span style="color:gray;"&gt;in&lt;/span&gt; 13.003 seconds&lt;span style="color:blue;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;13.137MB&lt;span style="color:gray;"&gt;/&lt;/span&gt;sec&lt;/span&gt;&lt;span style="color:gray;"&gt;&lt;span style="font-size:85%;"&gt;).&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;But then I remembered Idera's SQLSafe program. I ran the evaluation version a while back. I thought the speed increase there was due to some trick of Idera's. That's not really the case. Read this from the CTP's BOL:&lt;br /&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;&lt;strong&gt;&lt;em&gt;Performance Impact of Compressing Backups&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;Because a compressed backup is smaller than an uncompressed backup of the same data, compressing a backup typically requires less device I/O and therefore usually increases backup speed significantly.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;&lt;em&gt;By default, compression significantly increases CPU usage, and the additional CPU consumed by the compression process might adversely impact concurrent operations. Therefore, you might want to create low-priority compressed backups in a session whose CPU usage is limited by Resource Governor. For more information, see How to: Use Resource Governor to Limit CPU Usage by Backup Compression (Transact-SQL).&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;p style="MARGIN-LEFT: 1pt"&gt;That makes sense. It takes less time to write a smaller file than a larger file. So I was looking in the wrong area. I should have been checking the CPU counters. &lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-2761942454632563449?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/2761942454632563449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=2761942454632563449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2761942454632563449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/2761942454632563449'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/02/ctp6-backup-compression.html' title='CTP6 - Backup compression'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_R-tbJU7CXwQ/R74cANslOSI/AAAAAAAAACw/JpN_ZU2aV30/s72-c/2008Compression.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-3174488050155510924</id><published>2008-02-21T13:13:00.004-06:00</published><updated>2008-02-29T14:28:21.522-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CTP 6'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL 2008 February CTP is available</title><content type='html'>CTP6 is available at &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=749bd760-f404-4d45-9ac0-d7f1b3ed1053&amp;amp;displaylang=en&amp;amp;tm"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=749bd760-f404-4d45-9ac0-d7f1b3ed1053&amp;amp;displaylang=en&amp;amp;tm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I've just finished installing it and I'm starting to poke around a bit. Now I haven't been keeping up with the new or changed features in SQL2008, and I havn't played with the previous CTP's. So I was surprised to see that the Area Configuration Tool is not there. What's replaced it? Or is it just missing from the CTP and it will be in the final rollout? Definitely something to look into.&lt;br /&gt;&lt;br /&gt;The installation went pretty smooth. SQL 2008 is running next to SQL 2005 on this computer and there were no conficts during the installation. I did have one issue, though. When I tried to set up the accounts to run the different SQL services, it told me the password was wrong. No, I wasn't typing it incorrectly, I tried many times. I finally got past that by creating a new administrator account and used that to run the services. Later I'm going to go back and change what account they run under, to see if it will allow me to do that.&lt;br /&gt;&lt;br /&gt;I'll be back when I poke around a bit more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-3174488050155510924?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/3174488050155510924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=3174488050155510924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3174488050155510924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/3174488050155510924'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/02/sql-2008-february-ctp-is-available.html' title='SQL 2008 February CTP is available'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-7440766571606614913</id><published>2008-02-16T10:28:00.003-06:00</published><updated>2008-02-16T10:31:16.438-06:00</updated><title type='text'>New SQL 2005 training resource</title><content type='html'>Kalen Delaney, the author of the Inside Microsoft SQL books, is publishing a set of DVD's relating to SQL 2005. The content is also valid against the upcoming SQL 2008. You can either view the content on-line or buy the DVD. Both are great deals and far cheaper than other training videos.&lt;br /&gt;&lt;br /&gt;Check out the site at &lt;a href="http://sqlserverdvd.com/"&gt;http://sqlserverdvd.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-7440766571606614913?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/7440766571606614913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=7440766571606614913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7440766571606614913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/7440766571606614913'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/02/new-sql-2005-training-resource.html' title='New SQL 2005 training resource'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-4772239520061418749</id><published>2008-02-15T13:57:00.000-06:00</published><updated>2008-02-15T14:17:55.203-06:00</updated><title type='text'>Introduction, Part 2</title><content type='html'>I guess it's time I give a little info about myself. I currently working as a consultant for a company in Chicago (my client is based in Nashville). Most of my duties nowadays are DBA tasks, specifically performance tuning Microsoft SQL 2005 databases.&lt;br /&gt;&lt;br /&gt;I've been with the same company since January 2000, working for the same client the whole 8 years. I started in an entry level position, mostly writing and maintaining MSAccess 97 reports running against Sybase databases. Right after I started we migrated the databases to SQL 7, keeping Access for the reports.&lt;br /&gt;&lt;br /&gt;We're now in the final stages on migrating all the SQL 7 individual servers into 4 regional servers, 2 here in Chicago, 2 in Nashville. In addition to merging the data, we're also upgrading to SQL 2005. It's kind of ironic that we're just finishing up when SQL 2008 is right around the corner!&lt;br /&gt;&lt;br /&gt;This last 8 years has been a huge learning experience for me. When I started, I barely knew T-SQL and I had never worked with a true relational database before. But I slowly started getting more involved with SQL, reading everything I could get my hands on, going to user group meetings, attending different seminars, whatever would teach me about SQL. And while most of it was over my head at first, gradually some of it started to sink in. I was able to remember enough to become a MCDBA a few years back. And I recently passed Microsoft's 70-431 exam. So I'm getting there.&lt;br /&gt;&lt;br /&gt;But the more I learn the more I realize how much I don't know. Especially in the area of performance tuning. Right now for instance I'm investigating the CMEMTHREAD wait type, something that's starting to affect us. I'll be posting a more detailed explanation when i understand exactly what's going on.&lt;br /&gt;&lt;br /&gt;In the meantime, I'm using this blog as a place to clear my head, "talking" a problem through so I understand it better. I'll put up some neat things I learn as I go. I'll try not to be too dry, though I'm definitely not a writer of any sort.&lt;br /&gt;&lt;br /&gt;In summary, welcome to SQL Servings!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-4772239520061418749?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/4772239520061418749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=4772239520061418749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4772239520061418749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/4772239520061418749'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/02/introduction-part-2.html' title='Introduction, Part 2'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5892883484418619512.post-8604653357482438959</id><published>2008-02-01T15:54:00.000-06:00</published><updated>2008-02-01T15:57:43.882-06:00</updated><title type='text'>Introduction</title><content type='html'>Hi All&lt;br /&gt;&lt;br /&gt;This is another blog about Microsoft's SQL Server products. There are numerous, more knowledgable blogs out there, and I'll reference them. This blog is more about my learning path, things I've learned about SQL, questions I have, rants I want to get off my chest.&lt;br /&gt;&lt;br /&gt;I'll put up a bit about me later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5892883484418619512-8604653357482438959?l=sqlservings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sqlservings.blogspot.com/feeds/8604653357482438959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5892883484418619512&amp;postID=8604653357482438959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8604653357482438959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5892883484418619512/posts/default/8604653357482438959'/><link rel='alternate' type='text/html' href='http://sqlservings.blogspot.com/2008/02/introduction.html' title='Introduction'/><author><name>jaype</name><uri>http://www.blogger.com/profile/09643701158012749143</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
