<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblogcasts.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">RebornDBA</title><subtitle type="html" /><id>http://sqlblogcasts.com/blogs/reborndba/atom.aspx</id><link rel="alternate" type="text/html" href="http://sqlblogcasts.com/blogs/reborndba/default.aspx" /><link rel="self" type="application/atom+xml" href="http://sqlblogcasts.com/blogs/reborndba/atom.aspx" /><generator uri="http://communityserver.org" version="3.1.20917.1142">Community Server</generator><updated>2009-11-11T10:52:24Z</updated><entry><title>Using PowerPivot to read my perfmon Data</title><link rel="alternate" type="text/html" href="http://sqlblogcasts.com/blogs/reborndba/archive/2009/11/26/using-powerpivot-to-read-my-perfmon-data.aspx" /><id>http://sqlblogcasts.com/blogs/reborndba/archive/2009/11/26/using-powerpivot-to-read-my-perfmon-data.aspx</id><published>2009-11-26T14:34:45Z</published><updated>2009-11-26T14:34:45Z</updated><content type="html">&lt;p align="justify"&gt;Last week I attended &lt;a href="http://sqlbits.com/" target="_blank"&gt;SQL Bits V&lt;/a&gt; and I can say it was a great experience it is definitely a must go event, if you missed it, keep you eyes open to SQL Bits VI. Anyway, on the Friday sessions we had &lt;a href="http://www.beyeblogs.com/donaldfarmer/" target="_blank"&gt;Donald Farmer&lt;/a&gt; talking about &lt;a href="http://www.powerpivot.com/" target="_blank"&gt;PowerPivot&lt;/a&gt; for Excel/SharePoint 2010 and also the always energetic &lt;a href="http://www.brentozar.com/" target="_blank"&gt;Brent Ozar&lt;/a&gt; talking about the use of &lt;a href="http://www.brentozar.com/archive/2006/12/dba-101-using-perfmon-for-sql-performance-tuning/" target="_blank"&gt;Perfmon&lt;/a&gt; to monitor proactively our DB’s (I recommend his blog is full of useful stuff for all levels) and during the chat it hit me lest mix the two.&lt;/p&gt;  &lt;p align="justify"&gt;I like the idea of capturing key perfmon indicators as detailed by Mr Ozar but instead of dumping them into a csv to then import into excel and use the excel data mining tool I do a dump to a sql db. I then create a view on top of the 3 tables generated by perfmon and do some magic with PowerPivot. I have to say that the exercise took me around 2 days to capture the required data, setting up VM machine with SQL Server, Office 2010 and PowerPivot.&lt;/p&gt;  &lt;p align="justify"&gt;The actual PowerPivot work was under an hour, once you get use to the tool everything is simple adding extra columns on the fly using expressions etc…&lt;/p&gt;  &lt;p align="justify"&gt;The nice thing about having perfmon dumping data to the sql db is that the only thing I need to do now is refresh the data feed for PowerPivot and Bob’s your uncle! &lt;/p&gt;  &lt;p align="justify"&gt;I got the following result:&lt;/p&gt;  &lt;div align="justify"&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:275e7787-e7c9-499b-bb1b-fdbbe7a4a8b3" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_W6PQSm97JJE/Sw6JjlnVKNI/AAAAAAAAAdA/u-9gTn6ixug/s800/TopLevelCounts.jpg"&gt;&lt;img style="border-right:2px;border-top:2px;border-left:2px;border-bottom:2px;" height="245" src="http://lh6.ggpht.com/_W6PQSm97JJE/Sw6JjlnVKNI/AAAAAAAAAdA/u-9gTn6ixug/s400/TopLevelCounts.jpg" width="400" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt; &lt;/div&gt;  &lt;div align="justify"&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:2cbccab2-43fc-4285-b3ce-f49772e0d267" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_W6PQSm97JJE/Sw6Jj002-FI/AAAAAAAAAdE/6UR1CL71VRQ/s800/Graphs.jpg"&gt;&lt;img style="border-right:2px;border-top:2px;border-left:2px;border-bottom:2px;" height="186" src="http://lh4.ggpht.com/_W6PQSm97JJE/Sw6Jj002-FI/AAAAAAAAAdE/6UR1CL71VRQ/s400/Graphs.jpg" width="400" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p align="justify"&gt;Not bad for an hours dev eh!!&lt;/p&gt;  &lt;p align="justify"&gt;Ok so here is how I did it:&lt;/p&gt;  &lt;p align="justify"&gt;1. On Performance Monitor Logs setup a job to grab the following (&lt;a href="http://www.brentozar.com/archive/2006/12/dba-101-using-perfmon-for-sql-performance-tuning/" target="_blank"&gt;Brent Ozar has&amp;#160; great blog on this&lt;/a&gt;):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p align="justify"&gt;Memory – Available MBytes      &lt;br /&gt;Paging File – % Usage       &lt;br /&gt;Physical Disk – % Disk Time       &lt;br /&gt;Physical Disk – Avg. Disk Queue Length       &lt;br /&gt;Physical Disk – Avg. Disk sec/Read       &lt;br /&gt;Physical Disk – Avg. Disk sec/Write       &lt;br /&gt;Physical Disk – Disk Reads/sec       &lt;br /&gt;Physical Disk – Disk Writes/sec       &lt;br /&gt;Processor – % Processor Time       &lt;br /&gt;SQLServer:Buffer Manager – Buffer cache hit ratio       &lt;br /&gt;SQLServer:Buffer Manager – Page life expectancy       &lt;br /&gt;SQLServer:General Statistics – User Connections       &lt;br /&gt;SQLServer:Memory Manager – Memory Grants Pending       &lt;br /&gt;System – Processor Queue Length&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align="justify"&gt;2. Set up the dump to a db (Note you will need to do a run as on the server with an account with the correct access)&lt;/p&gt;  &lt;p align="justify"&gt;3. Create a view on top of the Perfmon Tables with the&amp;#160; following code:&lt;/p&gt;  &lt;div align="justify"&gt;   &lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;     &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;       &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;CREATE&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;VIEW&lt;/span&gt; [DBO].[PERFMONDATA]&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt;&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;          &lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;               DOD.DISPLAYSTRING&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;             , CDT.MACHINENAME&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;             , CDT.OBJECTNAME&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;             , CDT.COUNTERNAME&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;             , CDT.INSTANCENAME&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;             , CDA.COUNTERDATETIME&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;             , CDA.COUNTERVALUE&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;         DBO.COUNTERDATA &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; CDA &lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;                     &lt;span style="color:#0000ff;"&gt;INNER&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt; DBO.COUNTERDETAILS &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; CDT&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;                             &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt; CDA.COUNTERID = CDT.COUNTERID &lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;                     &lt;span style="color:#0000ff;"&gt;INNER&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt; DBO.DISPLAYTOID &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; DOD&lt;/pre&gt;


      &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;                             &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt; CDA.GUID = DOD.GUID&lt;/pre&gt;
&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p align="justify"&gt;4. Fire up Excel 2010 and open the PowerPivot Plugin&lt;/p&gt;

&lt;p align="justify"&gt;5. Add Connection String to the instance hosting your Perfmon Db and pull the view created earlier&lt;/p&gt;

&lt;p align="justify"&gt;6. I used the expressions SECOND,MINUTE,HOUR,DAY,MONTH and YEAR to calculate those value on the fly, so you end up with something like this:&lt;/p&gt;

&lt;div align="justify"&gt;
  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:c14b8bce-9a47-46fc-96f6-be3420118950" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_W6PQSm97JJE/Sw6NP_keVtI/AAAAAAAAAeg/TTzwQDDi3IE/s800/PowerPivotData.jpg"&gt;&lt;img style="border-right:2px;border-top:2px;border-left:2px;border-bottom:2px;" height="148" src="http://lh4.ggpht.com/_W6PQSm97JJE/Sw6NP_keVtI/AAAAAAAAAeg/TTzwQDDi3IE/s400/PowerPivotData.jpg" width="400" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p align="justify"&gt;7. Use Pivot functionality from Excel and add a couple of sliders and you are Done.&lt;/p&gt;

&lt;p align="justify"&gt;&lt;/p&gt;

&lt;div align="justify"&gt;
  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:51CF81A4-8F44-4a2c-8837-198C090B9994:dcc8905a-6ba6-4804-a7f9-5052d622c3cb" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_W6PQSm97JJE/Sw6N9NI_okI/AAAAAAAAAek/24cPQ9spy5Y/s800/SetUpTopLevelCounts.jpg"&gt;&lt;img style="border-right:2px;border-top:2px;border-left:2px;border-bottom:2px;" height="197" src="http://lh6.ggpht.com/_W6PQSm97JJE/Sw6N9NI_okI/AAAAAAAAAek/24cPQ9spy5Y/s400/SetUpTopLevelCounts.jpg" width="400" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p align="justify"&gt;&lt;/p&gt;

&lt;p align="justify"&gt;I hope you found this useful&lt;/p&gt;

&lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p align="justify"&gt;Cheers,&lt;/p&gt;

&lt;p align="justify"&gt;&amp;#160;&lt;/p&gt;

&lt;p align="justify"&gt;@dcastrogavino&lt;/p&gt;&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=12637" width="1" height="1"&gt;</content><author><name>david.castro</name><uri>http://sqlblogcasts.com/members/david.castro.aspx</uri></author><category term="Sql" scheme="http://sqlblogcasts.com/blogs/reborndba/archive/tags/Sql/default.aspx" /><category term="perfmon" scheme="http://sqlblogcasts.com/blogs/reborndba/archive/tags/perfmon/default.aspx" /><category term="PowerPivot" scheme="http://sqlblogcasts.com/blogs/reborndba/archive/tags/PowerPivot/default.aspx" /></entry><entry><title>Where are my database backups?</title><link rel="alternate" type="text/html" href="http://sqlblogcasts.com/blogs/reborndba/archive/2009/11/26/where-are-my-database-backups.aspx" /><id>http://sqlblogcasts.com/blogs/reborndba/archive/2009/11/26/where-are-my-database-backups.aspx</id><published>2009-11-26T14:34:16Z</published><updated>2009-11-26T14:34:16Z</updated><content type="html">&lt;p&gt;Don’t you ever ask yourself, are my maintenance back up plans working?&lt;/p&gt;  &lt;p&gt;Today I’ve been looking at the database backup history information of my servers to make sure that I have my back covered. So using our loved msdb system database tables I have done a couple of useful script which I have schedule as&amp;#160; jobs to email the results on a regular basis.&lt;/p&gt;  &lt;p&gt;The main tables I’ve used are: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;MSDB.DBO.BACKUPMEDIAFAMILY - &lt;a title="http://msdn.microsoft.com/en-us/library/ms190284(SQL.90).aspx" href="http://msdn.microsoft.com/en-us/library/ms190284(SQL.90).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms190284(SQL.90).aspx&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;MSDB.DBO.BACKUPSET - &lt;a title="http://msdn.microsoft.com/en-us/library/ms186299(SQL.90).aspx" href="http://msdn.microsoft.com/en-us/library/ms186299(SQL.90).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms186299(SQL.90).aspx&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;My 2 simple scripts are:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. Identify Database Backups for all db’s on the last 7 days:&lt;/strong&gt;&lt;/p&gt;  &lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;CONVERT&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;VARCHAR&lt;/span&gt;(64), SERVERPROPERTY(&lt;span style="color:#006080;"&gt;&amp;#39;SERVERNAME&amp;#39;&lt;/span&gt;)) &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; SERVER,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;         BST.DATABASE_NAME, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;         BST.BACKUP_START_DATE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;         BST.BACKUP_FINISH_DATE,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;         BST.EXPIRATION_DATE,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;CASE&lt;/span&gt; BST.TYPE &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;WHEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;D&amp;#39;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;THEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;FULL&amp;#39;&lt;/span&gt;  &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;WHEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;I&amp;#39;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;THEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;DIFFERENTIAL&amp;#39;&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;WHEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;L&amp;#39;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;THEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;LOG&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;WHEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;F&amp;#39;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;THEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;FILE / FILEGROUP&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;WHEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;G&amp;#39;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;THEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;DIFFERENTIAL FILE&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;WHEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;P&amp;#39;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;THEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;PARTIAL&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;WHEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;Q&amp;#39;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;THEN&lt;/span&gt; &lt;span style="color:#006080;"&gt;&amp;#39;DIFFERENTIAL PARTIAL&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;END&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; TYPE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt;         BST.BACKUP_SIZE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum17"&gt;  17:&lt;/span&gt;         BMF.LOGICAL_DEVICE_NAME, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum18"&gt;  18:&lt;/span&gt;         BMF.PHYSICAL_DEVICE_NAME,  &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum19"&gt;  19:&lt;/span&gt;         BST.NAME &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; BACKUPSET_NAME,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum20"&gt;  20:&lt;/span&gt;         BST.DESCRIPTION&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum21"&gt;  21:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;   MSDB.DBO.BACKUPMEDIAFAMILY  &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; BMF&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum22"&gt;  22:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;INNER&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt; MSDB.DBO.BACKUPSET &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; BST &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum23"&gt;  23:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt; BMF.MEDIA_SET_ID = BST.MEDIA_SET_ID &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum24"&gt;  24:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;WHERE&lt;/span&gt;  BST.BACKUP_START_DATE &amp;gt;= GETDATE() - 7 &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum25"&gt;  25:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;ORDER&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;BY&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum26"&gt;  26:&lt;/span&gt;    BST.DATABASE_NAME,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum27"&gt;  27:&lt;/span&gt;    BST.BACKUP_FINISH_DATE&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;2. Identify the most recent full (type D) Backup for each DB with detail information about the backup:&lt;/strong&gt;&lt;/p&gt;

&lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt;        BMFBST.SERVERNAME, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt;        BMFBST.LAST_BACKUP_DATE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt;        BMFBSTD.BACKUP_START_DATE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt;        BMFBSTD.EXPIRATION_DATE,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt;        BMFBSTD.BACKUP_SIZE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt;        BMFBSTD.LOGICAL_DEVICE_NAME, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt;        BMFBSTD.PHYSICAL_DEVICE_NAME,  &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt;        BMFBSTD.BACKUPSET_NAME,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;        BMFBSTD.DESCRIPTION&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;    (&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt; &lt;span style="color:#008000;"&gt;/*&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt; &lt;span style="color:#008000;"&gt;    List of the most recent full backups for each database    &lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt; &lt;span style="color:#008000;"&gt;*/&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum17"&gt;  17:&lt;/span&gt;          &lt;span style="color:#0000ff;"&gt;CONVERT&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;VARCHAR&lt;/span&gt;(64),SERVERPROPERTY(&lt;span style="color:#006080;"&gt;&amp;#39;SERVERNAME&amp;#39;&lt;/span&gt;)) &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; SERVERNAME&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum18"&gt;  18:&lt;/span&gt;         ,BST.DATABASE_NAME&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum19"&gt;  19:&lt;/span&gt;         ,&lt;span style="color:#0000ff;"&gt;MAX&lt;/span&gt;(BST.BACKUP_FINISH_DATE) &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; LAST_BACKUP_DATE&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum20"&gt;  20:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;   MSDB.DBO.BACKUPMEDIAFAMILY BMF&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum21"&gt;  21:&lt;/span&gt;            &lt;span style="color:#0000ff;"&gt;INNER&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt; MSDB.DBO.BACKUPSET BST&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum22"&gt;  22:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt; BMF.MEDIA_SET_ID = BST.MEDIA_SET_ID &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum23"&gt;  23:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;WHERE&lt;/span&gt;  BST.TYPE = &lt;span style="color:#006080;"&gt;&amp;#39;D&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum24"&gt;  24:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;GROUP&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;BY&lt;/span&gt;  BST.DATABASE_NAME &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum25"&gt;  25:&lt;/span&gt;    ) &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; BMFBST&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum26"&gt;  26:&lt;/span&gt;    &lt;span style="color:#0000ff;"&gt;LEFT&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum27"&gt;  27:&lt;/span&gt;    (&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum28"&gt;  28:&lt;/span&gt; &lt;span style="color:#008000;"&gt;/*&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum29"&gt;  29:&lt;/span&gt; &lt;span style="color:#008000;"&gt;    Detail information about back to join with the previous list&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum30"&gt;  30:&lt;/span&gt; &lt;span style="color:#008000;"&gt;*/&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum31"&gt;  31:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;SELECT&lt;/span&gt;  &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum32"&gt;  32:&lt;/span&gt;        &lt;span style="color:#0000ff;"&gt;CONVERT&lt;/span&gt;(&lt;span style="color:#0000ff;"&gt;VARCHAR&lt;/span&gt;(64), SERVERPROPERTY(&lt;span style="color:#006080;"&gt;&amp;#39;SERVERNAME&amp;#39;&lt;/span&gt;)) &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; SERVER,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum33"&gt;  33:&lt;/span&gt;        BST.DATABASE_NAME, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum34"&gt;  34:&lt;/span&gt;        BST.BACKUP_START_DATE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum35"&gt;  35:&lt;/span&gt;        BST.BACKUP_FINISH_DATE,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum36"&gt;  36:&lt;/span&gt;        BST.EXPIRATION_DATE,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum37"&gt;  37:&lt;/span&gt;        BST.BACKUP_SIZE, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum38"&gt;  38:&lt;/span&gt;        BMF.LOGICAL_DEVICE_NAME, &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum39"&gt;  39:&lt;/span&gt;        BMF.PHYSICAL_DEVICE_NAME,  &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum40"&gt;  40:&lt;/span&gt;        BST.NAME &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; BACKUPSET_NAME,&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum41"&gt;  41:&lt;/span&gt;        BST.DESCRIPTION&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum42"&gt;  42:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;FROM&lt;/span&gt;   MSDB.DBO.BACKUPMEDIAFAMILY &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; BMF&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum43"&gt;  43:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;INNER&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;JOIN&lt;/span&gt; MSDB.DBO.BACKUPSET BST&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum44"&gt;  44:&lt;/span&gt;                 &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt; BMF.MEDIA_SET_ID = BST.MEDIA_SET_ID &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum45"&gt;  45:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;WHERE&lt;/span&gt;  BST.TYPE = &lt;span style="color:#006080;"&gt;&amp;#39;D&amp;#39;&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum46"&gt;  46:&lt;/span&gt;    ) &lt;span style="color:#0000ff;"&gt;AS&lt;/span&gt; BMFBSTD&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum47"&gt;  47:&lt;/span&gt;    &lt;span style="color:#0000ff;"&gt;ON&lt;/span&gt; BMFBST.SERVERNAME = BMFBSTD.[SERVER] &lt;span style="color:#0000ff;"&gt;AND&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum48"&gt;  48:&lt;/span&gt;       BMFBST.DATABASE_NAME = BMFBSTD.[DATABASE_NAME] &lt;span style="color:#0000ff;"&gt;AND&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum49"&gt;  49:&lt;/span&gt;       BMFBST.LAST_BACKUP_DATE = BMFBSTD.[BACKUP_FINISH_DATE]&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum50"&gt;  50:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;ORDER&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;BY&lt;/span&gt; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum51"&gt;  51:&lt;/span&gt;    BMFBST.DATABASE_NAME&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I hope you find these useful,&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;@dcastrogavino&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&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:274a0b3b-9558-4f99-b6a3-55c3335f0f34" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/sql+server" rel="tag"&gt;sql server&lt;/a&gt;,&lt;a href="http://technorati.com/tags/database+backup" rel="tag"&gt;database backup&lt;/a&gt;,&lt;a href="http://technorati.com/tags/t-sql" rel="tag"&gt;t-sql&lt;/a&gt;&lt;/div&gt;&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=12636" width="1" height="1"&gt;</content><author><name>david.castro</name><uri>http://sqlblogcasts.com/members/david.castro.aspx</uri></author></entry><entry><title>My first issue as a reborn DBA: Installing SQL Server 2005 SP1 on a 6 core machine. How difficult could this be?</title><link rel="alternate" type="text/html" href="http://sqlblogcasts.com/blogs/reborndba/archive/2009/11/11/my-first-issue-as-a-reborn-dba-installing-sql-server-2005-sp1-on-a-6-core-machine-how-difficult-could-this-be.aspx" /><id>http://sqlblogcasts.com/blogs/reborndba/archive/2009/11/11/my-first-issue-as-a-reborn-dba-installing-sql-server-2005-sp1-on-a-6-core-machine-how-difficult-could-this-be.aspx</id><published>2009-11-11T10:52:24Z</published><updated>2009-11-11T10:52:24Z</updated><content type="html">&lt;p&gt;One of my tasks today was to do an installation of a STD version of SQL 2005 on a 6 core machine. Unfortunately, the only image I had was a SP1 so I started with my prep as normal.   &lt;br /&gt;-&amp;#160;&amp;#160;&amp;#160; Get image across to the server    &lt;br /&gt;-&amp;#160;&amp;#160;&amp;#160; Download SP3    &lt;br /&gt;-&amp;#160;&amp;#160;&amp;#160; Start install    &lt;br /&gt;At this point I think ... mmm... How difficult could this be?, it is a simple install and I’ll be done in less than an hour. How wrong was I!... as the installation setup gets to the point where it tries to start SQL Server it returned a useful message:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Product: Microsoft SQL Server 2005 (64-bit) -- Error 29503. The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, &amp;quot;How to: View SQL Server 2005 Setup Log Files&amp;quot; and &amp;quot;Starting SQL Server Manually.&amp;quot; &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I said ok, I’ll try to start the service manually, and I then get another useful message   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;quot;Error 1053: The service did not respond to the start or control request in a timely fashion&amp;quot;      &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I started to think that this must be a permission issue, so I tried to start the service with my admin account rather than the service account that I had used for the installation and the same error appeared.   &lt;br /&gt;I then go to the Event Viewer and I see the following error: &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;“Faulting application sqlservr.exe, version 2005.90.1399.0, faulting module sqlservr.exe, version 2005.90.1399.0, fault address 0x0000000000b323f0.”&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So at this point I try to do a tintenet search and I get two results of which the only really useful one was:&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;a href="http://blogs.msdn.com/psssql/archive/2008/07/23/sql-server-2005-encounters-exception-during-install-when-system-has-odd-number-of-processors-or-logical-processors-per-core.aspx"&gt;http://blogs.msdn.com/psssql/archive/2008/07/23/sql-server-2005-encounters-exception-during-install-when-system-has-odd-number-of-processors-or-logical-processors-per-core.aspx&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;This enlightened me with the issue of Installing SQL Server 2005 sp1 with an odd number of logical processors which is corrected on the SP2. The workaround that Bob Dorr proposed sounded a bit aggressive as I don’t like the idea of striping dll’s from sp2 to overwrite the existing ones and the idea of being on a production unsupported situation is something that I’d rather not risk.   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;So you ask, how did I solve the issue? Well, on the setup of the actual server I disabled one of the processors to leave the box running with 2 logical processors. I restarted the installation and applied service pack in my case SP3. Once I was happy I returned the processors count the original one and Bob’s your uncle!   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;I hope you found this useful.   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Regards,   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;David Castro&lt;/p&gt;&lt;img src="http://sqlblogcasts.com/aggbug.aspx?PostID=12509" width="1" height="1"&gt;</content><author><name>david.castro</name><uri>http://sqlblogcasts.com/members/david.castro.aspx</uri></author><category term="Installing SQL SERVER 2005 SP1 Triple Core" scheme="http://sqlblogcasts.com/blogs/reborndba/archive/tags/Installing+SQL+SERVER+2005+SP1+Triple+Core/default.aspx" /><category term="odd number of logical processors" scheme="http://sqlblogcasts.com/blogs/reborndba/archive/tags/odd+number+of+logical+processors/default.aspx" /><category term="&amp;quot;SQL SERVER 2005&amp;quot;" scheme="http://sqlblogcasts.com/blogs/reborndba/archive/tags/_2600_quot_3B00_SQL+SERVER+2005_2600_quot_3B00_/default.aspx" /></entry></feed>