<?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:blogger='http://schemas.google.com/blogger/2008' 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-5349971599411036250</id><updated>2026-04-18T03:12:27.748-07:00</updated><category term="SQL Server Administration"/><category term="SQL Server 2008"/><category term="SQL Server Performance"/><category term="SSRS"/><category term="tSQL"/><category term="SQL Server 2012"/><category term="SQLIO"/><category term="SQL Programming"/><category term="SQL Server Replication"/><category term="Compression"/><category term="Dynamics AX"/><category term="Linked Servers"/><category term="Ola Hallengren"/><category term="Availability Groups"/><category term="Backup Exec"/><category term="IIS"/><category term="Productivity Tools"/><category term="SCCM"/><category term="SQL Server"/><category term="SQL Server Backups"/><category term="SQL Server Clustering"/><category term="SQL Tools"/><category term="Software Updates"/><category term="Spinlocks"/><category term="System Center"/><category term="VMware"/><category term="Wait Stats"/><category term="sp_BlitzCache"/><title type='text'>@SQLTrooper&#39;s SQL Server Journal</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-9090754521428026630</id><published>2019-04-22T10:48:00.000-07:00</published><updated>2019-04-30T03:35:27.157-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ola Hallengren"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Backups"/><title type='text'>Identify and Retry Failed Backups using Ola&#39;s Solution</title><content type='html'>I ran into a situation where a database backup would fail due to a network error - specifically &quot;Operating system error 59(An unexpected network error occurred.)&quot;&amp;nbsp; This post pertains to those using the &lt;a href=&quot;https://ola.hallengren.com/sql-server-backup.html&quot; target=&quot;_blank&quot;&gt;Ola Hallengren backup solution&lt;/a&gt;, but the concept and/or approach could likely be applied to other backup solutions as well.&lt;br /&gt;
&lt;br /&gt;
When the solution iterates through the databases to be backed up, it may succeed on all but one or two but the job as a whole would report a failure.&amp;nbsp; In this scenario, you wouldn&#39;t want to re-run the entire job or configure the job step to use the &lt;a href=&quot;https://docs.microsoft.com/en-us/sql/ssms/agent/job-step-properties-new-job-step-advanced-page&quot; target=&quot;_blank&quot;&gt;Retry attempt/Retry Interval&lt;/a&gt; options, as that would result in all databases getting backed up again.&amp;nbsp; That would consume unnecessary resources.&amp;nbsp; The ideal solution would identify only those database backups that failed and retry those.&amp;nbsp; With Ola&#39;s solution, we can identify and retry failed backups by querying the CommandLog table and running a subsequent backup script:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; @SQL &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;), @FailedBackups &lt;span style=&quot;color: blue;&quot;&gt;NVARCHAR&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;), @BackupType &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;(4)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; @BackupType = &#39;FULL&#39;;&amp;nbsp; &lt;span style=&quot;color: #274e13;&quot;&gt;--LOG, DIFF or FULL&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;WITH&lt;/span&gt; cteRowNumber&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; [DatabaseName],&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ErrorNumber],&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: magenta;&quot;&gt;ROW_NUMBER&lt;/span&gt;() &lt;span style=&quot;color: blue;&quot;&gt;OVER&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;PARTITION BY&lt;/span&gt; [DatabaseName]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; ID &lt;span style=&quot;color: blue;&quot;&gt;DESC&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; RowNum&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; [CommandLog]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; [Command] LIKE &lt;span style=&quot;color: red;&quot;&gt;&#39;%_&#39;&lt;/span&gt; + @BackupType + &lt;span style=&quot;color: red;&quot;&gt;&#39;_%&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND [CommandType] IN (&lt;span style=&quot;color: red;&quot;&gt;&#39;BACKUP_DATABASE&#39;&lt;/span&gt;,&lt;span style=&quot;color: red;&quot;&gt;&#39;BACKUP_LOG&#39;&lt;/span&gt;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; @FailedBackups = &lt;span style=&quot;color: magenta;&quot;&gt;COALESCE&lt;/span&gt;(@FailedBackups + &lt;span style=&quot;color: red;&quot;&gt;&#39;,&#39;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&lt;/span&gt;) + [DatabaseName]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; cteRowNumber&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; RowNum = 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND [ErrorNumber] &amp;lt;&amp;gt; 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; [DatabaseName];&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; @SQL = &lt;span style=&quot;color: red;&quot;&gt;&#39;EXECUTE [dbo].[DatabaseBackup]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;@Databases = &#39;&#39;&#39;&lt;/span&gt; + @FailedBackups + &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&#39;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;@Directory = NULL,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;@BackupType = &#39;&#39;&#39;&lt;/span&gt; + @BackupType + &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&#39;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;@LogToTable = &#39;&#39;Y&#39;&#39;&#39;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;PRINT&lt;/span&gt; @SQL;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;--EXEC (@SQL);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
After testing the script and verifying it worked as intended, I created a second step in the backup job that would be triggered if the main backup step failed.&amp;nbsp; If it succeeds, all backups will then be current.&lt;br /&gt;
&lt;br /&gt;
I&#39;m sure I could expand the script to cover a broader set of use cases, but this covered my immediate needs.</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/9090754521428026630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2019/04/identify-and-retry-failed-backups-using.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/9090754521428026630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/9090754521428026630'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2019/04/identify-and-retry-failed-backups-using.html' title='Identify and Retry Failed Backups using Ola&#39;s Solution'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-3045108751649349675</id><published>2017-09-14T12:30:00.000-07:00</published><updated>2018-03-20T12:04:38.970-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Availability Groups"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><title type='text'>Using Synonyms with Availability Groups</title><content type='html'>I&#39;m a big fan of using synonyms to point to objects in other databases, but if you&#39;ve tried to use them in conjunction with Availability Groups you may have encountered a slight issue: upon failover, the synonyms are no longer valid because the instance name is part of the synonym definition. &amp;nbsp;In order for the synonyms to work again, they have to point to the instance they now reside in - assuming the databases were in the same instance, respectively.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The next challenge was to automate the of detection of when the primary has changed, therefore triggering an update of the synonyms. &amp;nbsp;I put the following tSQL into a SQL Agent job and set it to run every five seconds. &amp;nbsp;This will be Step 1 in the job, as it will have two steps total.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;IF&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;role_desc&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sys.dm_hadr_availability_replica_states&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INNER JOIN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sys.dm_hadr_name_id_map&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON&amp;nbsp; s&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ys.dm_hadr_availability_replica_states.group_id &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sys.dm_hadr_name_id_map.ag_id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sys.dm_hadr_name_id_map.ag_name &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;AGName&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;is_local &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;secondary&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RAISERROR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;This is secondary replica. Do not countinue this job.&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PRINT &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;This is primary replica and you can go to next step.&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Now, if no failover has occurred, the Step 1 above will fail - as will the job as a whole obviously. &amp;nbsp;If in fact a failover &lt;i&gt;has &lt;/i&gt;occurred it will go on to Step 2, which has the below syntax. &amp;nbsp;You&#39;ll note the syntax of the query in the cursor: it will query sys.synonyms to see if there are any pointing to the incorrect (not local) instance. &amp;nbsp;If they are all correct, no records will be returned and it will stop. &amp;nbsp;If there are synonyms that need updating, it will fall into the cursor and drop/recreate them using REPLACE syntax to point locally (@@SERVERNAME).&lt;br /&gt;
&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@ObjectName &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SYSNAME&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Definition &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Schema &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@SQL &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;loccur &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;CURSOR &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;LOCAL STATIC FORWARD_ONLY READ_ONLY &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FOR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;SCHEMA_NAME&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;schema_id&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;base_object_name&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sys.synonyms&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;base_object_name &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;LIKE &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;%OtherInstanceName%&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;OPEN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;loccur&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FETCH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;NEXT &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;loccur&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: 12px;&quot;&gt;INTO &lt;/span&gt;&lt;span style=&quot;color: #434343; font-size: 12px;&quot;&gt;@ObjectName&lt;/span&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: #434343;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Schema&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Definition&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@@FETCH_STATUS &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PRINT &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Converting: Synonym, &#39; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@ObjectName&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@SQL &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;DROP SYNONYM &#39; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;QUOTENAME&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Schema&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;) + &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;.&#39; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;QUOTENAME&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@ObjectName&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@SQL&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;--PRINT @SQL&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@SQL &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;CREATE SYNONYM &#39; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;QUOTENAME&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Schema&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;) + &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;.&#39; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;QUOTENAME&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@ObjectName&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;) + &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39; FOR &#39; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+ &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Definition&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;OtherInstanceName&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@@SERVERNAME&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@SQL&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;--PRINT @SQL&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FETCH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;NEXT &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;loccur&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INTO &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@ObjectName&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Schema&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Definition&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CLOSE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;loccur&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DEALLOCATE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;loccur&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/3045108751649349675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2017/09/using-synonyms-with-availability-groups.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3045108751649349675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3045108751649349675'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2017/09/using-synonyms-with-availability-groups.html' title='Using Synonyms with Availability Groups'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-1910064169563428461</id><published>2017-08-29T10:32:00.000-07:00</published><updated>2017-08-29T10:59:21.705-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>Monitor and stop long-running SQL Server Agent Jobs</title><content type='html'>In recent days I&#39;ve been having a periodic issue with the distribution cleanup job for replication. The vast majority of the time it runs in a few seconds. &amp;nbsp;There are times at night when it may take a few minutes which is not an issue. &amp;nbsp;But recently I&#39;ve had a couple cases where the job ran for 13 or 14 hours and that subsequently led to prolonged blocking of other replication activities such as the distribution agent SPIDs, etc. &amp;nbsp;That in turn led to all sorts of other issues that I won&#39;t detail here.&lt;br /&gt;
&lt;br /&gt;
To address the situation, I would essentially have to stop the SQL Server Agent job called &#39;Distribution clean up: distribution&#39;. &amp;nbsp;Oddly enough, subsequent runs would be right back on track.&lt;br /&gt;
&lt;br /&gt;
To mitigate the issue as quickly as possible (perhaps there are other solutions out there) I decided to put together a simple monitoring job to check how long the cleanup job has been running. &amp;nbsp;If it has been running for more than 10 minutes, stop the job.&lt;br /&gt;
&lt;br /&gt;
Here is the code I used. &amp;nbsp;It has to run in msdb and I scheduled it to run every 10 seconds. &amp;nbsp;You could use this syntax to monitor any jobs - perhaps an index maintenance job is running abnormally long on the weekend and bloating TempDB or something - but you wouldn&#39;t know right away. &amp;nbsp;This will at least stop the activity until there is time to further investigate.&lt;br /&gt;
&lt;br /&gt;
The syntax:&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Duration_secs &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Duration_secs &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;DATEDIFF&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ss&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ja.start_execution_date&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;GETDATE&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;())&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;msdb.dbo.sysjobs jobs&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LEFT &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;JOIN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;msdb.dbo.sysjobactivity ja &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ja.job_id &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;jobs.job_id&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ja.start_execution_date &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;IS &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;NOT NULL&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;jobs.name &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Distribution clean up: distribution&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;stop_execution_date &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;IS &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;NULL;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;
&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Duration_secs &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;600 &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;-- 10 minutes&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EXEC &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;dbo.&lt;/span&gt;&lt;span style=&quot;color: darkred;&quot;&gt;sp_stop_job &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;N&#39;Distribution clean up: distribution&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;

&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/1910064169563428461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2017/08/monitor-and-stop-long-running-sql.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/1910064169563428461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/1910064169563428461'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2017/08/monitor-and-stop-long-running-sql.html' title='Monitor and stop long-running SQL Server Agent Jobs'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-33250211545320341</id><published>2016-08-18T07:46:00.002-07:00</published><updated>2016-08-18T07:53:01.727-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="VMware"/><title type='text'>VMware Host Performance and Configuration Reports</title><content type='html'>So you are a DBA and you are in a virtual environment - VMware in particular. &amp;nbsp;You are curious to know the health of the VMware hosts in terms of CPU and RAM, but you really don&#39;t know how to get the data you need and you&#39;re not certain if the information you are asking for is entirely accurate. &amp;nbsp;Well, chances are you have access to the VMware databases themselves - if that is the case, you can create these reports based on a blog post from&amp;nbsp;&lt;a href=&quot;https://twitter.com/sqlpoolboy&quot; target=&quot;_blank&quot;&gt;Jonathan Kehayias&lt;/a&gt;:&amp;nbsp;&quot;&lt;a href=&quot;https://www.sqlskills.com/blogs/jonathan/querying-the-vmware-vcenter-database-vcdb-for-performance-and-configuration-information/&quot; target=&quot;_blank&quot;&gt;Querying the VMware vCenter Database (VCDB) for Performance and Configuration Information&lt;/a&gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
I have created five reports that are based on Jonathan&#39;s queries and you can download the RDL for the SSRS reports below - enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B5D5Zt72TyvERlRpeXFaTEtwU2c/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;Host Configuration&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B5D5Zt72TyvEQV81MHFJYTNLa3c/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;CPU Ready Values (Daily)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B5D5Zt72TyvERGNTQ01vMzgwckU/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;CPU Ready Values (Weekly)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B5D5Zt72TyvEWi12Y1pVZGtUX1k/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;Memory Ballooned (Daily)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/file/d/0B5D5Zt72TyvERXdJZlJucUhZMlU/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;Memory Ballooned (Weekly)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully you find these useful,&lt;br /&gt;
Allen (&lt;a href=&quot;https://twitter.com/sqltrooper&quot; target=&quot;_blank&quot;&gt;@SQLTrooper&lt;/a&gt;)</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/33250211545320341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2016/08/vmware-host-performance-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/33250211545320341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/33250211545320341'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2016/08/vmware-host-performance-and.html' title='VMware Host Performance and Configuration Reports'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-8648594775063946198</id><published>2016-01-21T10:02:00.002-08:00</published><updated>2016-01-21T21:26:03.690-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Productivity Tools"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Tools"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>SSMSBoost - A Productivity Tool</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;u&gt;SSMSBoost Tips and
Trips&lt;/u&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;(&lt;a href=&quot;http://www.ssmsboost.com/&quot;&gt;http://www.ssmsboost.com&lt;/a&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Today I typed up a little &quot;tips and tricks&quot; document for the various teams I work with and figured heck, why not share it with everyone? &amp;nbsp;As you can see, I had to obfuscate some of the database/connection information with white boxes. &amp;nbsp;Hope the tips come in handy!&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;Tip 1: Locate Object&lt;/span&gt;&lt;/b&gt; –
when you have hundreds or sometimes thousands of tables to comb through, this
feature makes it very simple to locate an object with a couple clicks.&amp;nbsp; Simply hover over the object (normally a
table), right-click and click “Locate object in Object Explorer”.&amp;nbsp; All the menus will expand and send you right
to the object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shapetype
 id=&quot;_x0000_t75&quot; coordsize=&quot;21600,21600&quot; o:spt=&quot;75&quot; o:preferrelative=&quot;t&quot;
 path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; filled=&quot;f&quot; stroked=&quot;f&quot;&gt;
 &lt;v:stroke joinstyle=&quot;miter&quot;/&gt;
 &lt;v:formulas&gt;
  &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 1 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum 0 0 @1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @2 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 0 1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @6 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;sum @8 21600 0&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @10 21600 0&quot;/&gt;
 &lt;/v:formulas&gt;
 &lt;v:path o:extrusionok=&quot;f&quot; gradientshapeok=&quot;t&quot; o:connecttype=&quot;rect&quot;/&gt;
 &lt;o:lock v:ext=&quot;edit&quot; aspectratio=&quot;t&quot;/&gt;
&lt;/v:shapetype&gt;&lt;v:shape id=&quot;Picture_x0020_1&quot; o:spid=&quot;_x0000_i1032&quot; type=&quot;#_x0000_t75&quot;
 style=&#39;width:260.25pt;height:113.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\MCGU93~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgydiCI9m7qHLrhVEc1_1tO1pIFfIJkSITVP15mSkj_cHZn-8zJ5bhO9crJz9EkrzJPlwG32oilVAXZId4pZxfbiNypDSoVOcZXdpRHqvTfvTTcSJJeII5eh-LxLSyQfnn9PUfpdYYwNQb_/s1600/1.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgydiCI9m7qHLrhVEc1_1tO1pIFfIJkSITVP15mSkj_cHZn-8zJ5bhO9crJz9EkrzJPlwG32oilVAXZId4pZxfbiNypDSoVOcZXdpRHqvTfvTTcSJJeII5eh-LxLSyQfnn9PUfpdYYwNQb_/s1600/1.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id=&quot;_x0000_t32&quot; coordsize=&quot;21600,21600&quot;
 o:spt=&quot;32&quot; o:oned=&quot;t&quot; path=&quot;m,l21600,21600e&quot; filled=&quot;f&quot;&gt;
 &lt;v:path arrowok=&quot;t&quot; fillok=&quot;f&quot; o:connecttype=&quot;none&quot;/&gt;
 &lt;o:lock v:ext=&quot;edit&quot; shapetype=&quot;t&quot;/&gt;
&lt;/v:shapetype&gt;&lt;v:shape id=&quot;Straight_x0020_Arrow_x0020_Connector_x0020_4&quot;
 o:spid=&quot;_x0000_s1029&quot; type=&quot;#_x0000_t32&quot; style=&#39;position:absolute;
 margin-left:64.5pt;margin-top:37.55pt;width:342pt;height:180pt;flip:x;
 z-index:251655680;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:margin;mso-height-relative:margin&#39; o:gfxdata=&quot;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
9QLTKCSNQtIsJM1C0iokLd/TZ+LwHUYdh/teceQNPSw/Is/XFvb3m+1/AQAA//8DAFBLAwQUAAYA
CAAAACEAnGZGQbsAAAAkAQAAKgAAAGNsaXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54
bWwucmVsc4SPzQrCMBCE74LvEPZu0noQkSa9iNCr1AcIyTYtNj8kUezbG+hFQfCyMLPsN7NN+7Iz
eWJMk3ccaloBQae8npzhcOsvuyOQlKXTcvYOOSyYoBXbTXPFWeZylMYpJFIoLnEYcw4nxpIa0cpE
fUBXNoOPVuYio2FBqrs0yPZVdWDxkwHii0k6zSF2ugbSL6Ek/2f7YZgUnr16WHT5RwTLpRcWoIwG
MwdKV2edNS1dgYmGff0m3gAAAP//AwBQSwECLQAUAAYACAAAACEAu+VIlAUBAAAeAgAAEwAAAAAA
AAAAAAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQCtMD/xwQAAADIB
AAALAAAAAAAAAAAAAAAAADYBAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQBMKzvy+AEAANME
AAAfAAAAAAAAAAAAAAAAACACAABjbGlwYm9hcmQvZHJhd2luZ3MvZHJhd2luZzEueG1sUEsBAi0A
FAAGAAgAAAAhALY7BCJUBgAACxoAABoAAAAAAAAAAAAAAAAAVQQAAGNsaXBib2FyZC90aGVtZS90
aGVtZTEueG1sUEsBAi0AFAAGAAgAAAAhAJxmRkG7AAAAJAEAACoAAAAAAAAAAAAAAAAA4QoAAGNs
aXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVsc1BLBQYAAAAABQAFAGcBAADk
CwAAAAA=
&quot; strokecolor=&quot;red&quot; strokeweight=&quot;2.25pt&quot;&gt;
 &lt;v:stroke endarrow=&quot;block&quot; joinstyle=&quot;miter&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 249px; margin-left: 81px; margin-top: 48px; mso-ignore: vglayout; position: absolute; width: 463px; z-index: 251655680;&quot;&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;Tip 2: Easily switch connections&lt;/span&gt;&lt;/b&gt; – I often switch between
connections, which natively is a little cumbersome (Right-click &amp;gt; Connection
&amp;gt; Change Connection, etc.).&amp;nbsp; With
SSMSBoost, you can define your Preferred Connections.&amp;nbsp; For each connection, as you can see below you
can also choose a default database that it will connect to rather than master
by default.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkpAzQ6F5arCNCWo0FHwZRX2rF8H2zA1yInBmFszUJvORna89miOwQpFEEMOC7eppzJw_9bwP6lBYTa_3XejunlWIKn6g3fF-WISzDY4NCWOzznlMfTKaU1k4NOcwWV92KOzJwPLNvhfPA/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkpAzQ6F5arCNCWo0FHwZRX2rF8H2zA1yInBmFszUJvORna89miOwQpFEEMOC7eppzJw_9bwP6lBYTa_3XejunlWIKn6g3fF-WISzDY4NCWOzznlMfTKaU1k4NOcwWV92KOzJwPLNvhfPA/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape id=&quot;Straight_x0020_Arrow_x0020_Connector_x0020_6&quot;
 o:spid=&quot;_x0000_s1028&quot; type=&quot;#_x0000_t32&quot; style=&#39;position:absolute;
 margin-left:54pt;margin-top:128.15pt;width:366pt;height:49.5pt;flip:y;
 z-index:251656704;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:margin;mso-height-relative:margin&#39; o:gfxdata=&quot;UEsDBBQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSRvU7DMBSF
dyTewfKKEqcMCKEmHfgZgaE8wMW+SSwc27JvS/v23KTJgkoXFsu+P+c7Ol5vDoMTe0zZBl/LVVlJ
gV4HY31Xy4/tS3EvRSbwBlzwWMsjZrlprq/W22PELHjb51r2RPFBqax7HCCXIaLnThvSAMTP1KkI
+gs6VLdVdad08ISeCho1ZLN+whZ2jsTzgcsnJwldluLxNDiyagkxOquB2Knae/OLUsyEkjenmdzb
mG/YhlRnCWPnb8C898bRJGtQvEOiVxjYhtLOxs8AySiT4JuDystlVV4WPeM6tK3VaILeDZxIOSsu
ti/jidNGNZ3/J08yC1dNv9v8AAAA//8DAFBLAwQUAAYACAAAACEArTA/8cEAAAAyAQAACwAAAF9y
ZWxzLy5yZWxzhI/NCsIwEITvgu8Q9m7TehCRpr2I4FX0AdZk2wbbJGTj39ubi6AgeJtl2G9m6vYx
jeJGka13CqqiBEFOe2Ndr+B03C3WIDihMzh6RwqexNA281l9oBFTfuLBBhaZ4ljBkFLYSMl6oAm5
8IFcdjofJ0z5jL0MqC/Yk1yW5UrGTwY0X0yxNwri3lQgjs+Qk/+zfddZTVuvrxO59CNCmoj3vCwj
MfaUFOjRhrPHaN4Wv0VV5OYgm1p+LW1eAAAA//8DAFBLAwQUAAYACAAAACEALXPw7fYBAADQBAAA
HwAAAGNsaXBib2FyZC9kcmF3aW5ncy9kcmF3aW5nMS54bWykVFFvmzAQfp+0/2D5fYWkCUtRSTVl
TV+mrWrWvd+MAWvmjGyPkH+/MxCSRdOqrU/44Lvvvvvu8O1dV2vWSuuUwYzPrmLOJAqTKywz/vx1
+27FmfOAOWiDMuMH6fjd+u2bW0hLC02lBCMGdClkvPK+SaPIiUrW4K5MI5G+FcbW4Cm0ZZRb2BNz
raN5HCdRDQr5+kT1ETywn1b9B5U24ofMN4AtOKLUIj1/M2rU4vXMkGL7YJtd82iDcvG5fbRM5Rkn
5xBqsohH44cRRmF0kVWeCLrC1gFvioJ1NIHZ4jqOieuQ8eXN9SJ+vxz4ZOeZIMAiWazIPM4EIZL5
KlnGY8HqywsUorr/OwnJHOTQ4Uyi6HDXBI3YbsLxsvPk2PnOW1Bl5dkHa82ebQyiFN5YlkyejARH
T8743MgbFLBCq+YbudFvxyutmbqCtLHOP0hTs3DIuBv1TkKHetB+cn5QeEwI3Wtk+4zPV0saSYid
0SrfKq37wJbfN9qyFnTGt1saYT8Wqv0bzIPS95gzf2hoU7xVgKWWwR1CauwfRyOcP2g5FH6SBe1Y
WI+hcvjD5FQOhJDoZxMLoUNaQdKmxPjlxBEfUmVR0OD+JXnK6CsbPCXXCo39U3XfHSUXA37ofuia
7BjXLrr4l3vUePeEC+M8Xv8CAAD//wMAUEsDBBQABgAIAAAAIQC2OwQiVAYAAAsaAAAaAAAAY2xp
cGJvYXJkL3RoZW1lL3RoZW1lMS54bWzsWUtvGzcQvhfof1jsvbHeio3Iga1H3MZOgkhJkSOlpXYZ
c5cLkrKjW5EcCxQomhY9NEBvPRRtAyRAL+mvcZuiTYH8hQ65D5ESVTtGChhBLMDYnf1mOJyZ/Ybk
Xrn6IKbeEeaCsKTjVy9VfA8nExaQJOz4d0aDjy77npAoCRBlCe74cyz8q9sffnAFbU0oSccM8WAU
4Rh7YCgRW6jjR1KmWxsbYgJiJC6xFCfwbMp4jCTc8nAj4OgYBojpRq1SaW3EiCT+NliUylCfwr9E
CiWYUD5UZrCXoBhGvzmdkgnW2OCwqhBiLrqUe0eIdnywGbDjEX4gfY8iIeFBx6/oP39j+8oG2sqV
qFyja+gN9F+ulysEhzU9Jg/H5aCNRrPR2intawCVq7h+u9/qt0p7GoAmE5hp5otps7m7udtr5lgD
lF06bPfavXrVwhv26ys+7zTVz8JrUGa/sYIfDLoQRQuvQRm+uYJvNNq1bsPCa1CGb63g25WdXqNt
4TUooiQ5XEFXmq16t5htCZkyuueEbzYbg3YtN75AQTWU1aWGmLJErqu1GN1nfAAABaRIksST8xRP
0QRqsosoGXPi7ZMwgsJLUcIEiCu1yqBSh//q19BXOiJoCyNDW/kFnogVkfLHExNOUtnxPwGrvgF5
/eKn1y+eeScPn588/PXk0aOTh79khiytPZSEptarH77858ln3t/Pvn/1+Gs3Xpj4P37+/PffvnID
YaaLELz85umfz5++/PaLv3587IDvcDQ24SMSY+HdwMfebRbDxHQIbM/xmL+ZxihCxNTYSUKBEqRG
cdjvy8hC35gjihy4XWxH8C4HinEBr83uWw4PIz6TxGHxehRbwAPG6C7jzihcV2MZYR7NktA9OJ+Z
uNsIHbnG7qLEym9/lgK3EpfJboQtN29RlEgU4gRLTz1jhxg7ZnePECuuB2TCmWBT6d0j3i4izpCM
yNiqpoXSHokhL3OXg5BvKzYHd71dRl2z7uEjGwlvBaIO50eYWmG8hmYSxS6TIxRTM+D7SEYuJ4dz
PjFxfSEh0yGmzOsHWAiXzk0O8zWSfh3oxZ32AzqPbSSX5NBlcx8xZiJ77LAboTh1YYckiUzsx+IQ
ShR5t5h0wQ+Y/Yaoe8gDStam+y7BVrpPZ4M7wKymS4sCUU9m3JHLa5hZ9Tuc0ynCmmqA+C0+j0ly
Krkv0Xrz/6V1INKX3z1xzOqiEvoOJ843am+Jxtfhlsm7y3hALj5399AsuYXhdVltYO+p+z11++88
da97n98+YS84GuhbLRWzpbpeuMdr1+1TQulQzineF3rpLqAzBQMQKj29P8XlPi6N4FK9yTCAhQs5
0joeZ/JTIqNhhFJY31d9ZSQUuelQeCkTsOzXYqdthaez+IAF2Xa1WlVb04w8BJILeaVZymGrITN0
q73YgpXmtbeh3ioXDijdN3HCGMx2ou5wol0IVZD0xhyC5nBCz+yteLHp8OKyMl+kasULcK3MCiyd
PFhwdfxmA1RACXZUiOJA5SlLdZFdncy3mel1wbQqANYRRQUsMr2pfF07PTW7rNTOkGnLCaPcbCd0
ZHQPExEKcF6dSnoWN94015uLlFruqVDo8aC0Fm60L/+XF+fNNegtcwNNTKagiXfc8Vv1JpTMBKUd
fwrbfriMU6gdoZa8iIZwYDaRPHvhz8MsKReyh0SUBVyTTsYGMZGYe5TEHV9Nv0wDTTSHaN+qNSCE
C+vcJtDKRXMOkm4nGU+neCLNtBsSFensFhg+4wrnU61+frDSZDNI9zAKjr0xnfHbCEqs2a6qAAZE
wOlPNYtmQOA4sySyRf0tNaacds3zRF1DmRzRNEJ5RzHJPINrKi/d0XdlDIy7fM4QUCMkeSMch6rB
mkG1umnZNTIf1nbd05VU5AzSXPRMi1VU13SzmDVC0QaWYnm+Jm94VYQYOM3s8Bl1L1PuZsF1S+uE
sktAwMv4ObruGRqC4dpiMMs15fEqDSvOzqV27ygmeIprZ2kSBuu3CrNLcSt7hHM4EJ6r84PectWC
aFqsK3WkXZ8mDlDqjcNqx4fPA3A+8QCu4AODD7KaktWUDK7gqwG0i+yov+PnF4UEnmeSElMvJPUC
0ygkjULSLCTNQtIqJC3f02fi8B1GHYf7XnHkDT0sPyLP1xb295vtfwEAAP//AwBQSwMEFAAGAAgA
AAAhAJxmRkG7AAAAJAEAACoAAABjbGlwYm9hcmQvZHJhd2luZ3MvX3JlbHMvZHJhd2luZzEueG1s
LnJlbHOEj80KwjAQhO+C7xD2btJ6EJEmvYjQq9QHCMk2LTY/JFHs2xvoRUHwsjCz7DezTfuyM3li
TJN3HGpaAUGnvJ6c4XDrL7sjkJSl03L2DjksmKAV201zxVnmcpTGKSRSKC5xGHMOJ8aSGtHKRH1A
VzaDj1bmIqNhQaq7NMj2VXVg8ZMB4otJOs0hdroG0i+hJP9n+2GYFJ69elh0+UcEy6UXFqCMBjMH
SldnnTUtXYGJhn39Jt4AAAD//wMAUEsBAi0AFAAGAAgAAAAhALvlSJQFAQAAHgIAABMAAAAAAAAA
AAAAAAAAAAAAAFtDb250ZW50X1R5cGVzXS54bWxQSwECLQAUAAYACAAAACEArTA/8cEAAAAyAQAA
CwAAAAAAAAAAAAAAAAA2AQAAX3JlbHMvLnJlbHNQSwECLQAUAAYACAAAACEALXPw7fYBAADQBAAA
HwAAAAAAAAAAAAAAAAAgAgAAY2xpcGJvYXJkL2RyYXdpbmdzL2RyYXdpbmcxLnhtbFBLAQItABQA
BgAIAAAAIQC2OwQiVAYAAAsaAAAaAAAAAAAAAAAAAAAAAFMEAABjbGlwYm9hcmQvdGhlbWUvdGhl
bWUxLnhtbFBLAQItABQABgAIAAAAIQCcZkZBuwAAACQBAAAqAAAAAAAAAAAAAAAAAN8KAABjbGlw
Ym9hcmQvZHJhd2luZ3MvX3JlbHMvZHJhd2luZzEueG1sLnJlbHNQSwUGAAAAAAUABQBnAQAA4gsA
AAAA
&quot; strokecolor=&quot;red&quot; strokeweight=&quot;2.25pt&quot;&gt;
 &lt;v:stroke endarrow=&quot;block&quot; joinstyle=&quot;miter&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 76px; margin-left: 70px; margin-top: 163px; mso-ignore: vglayout; position: absolute; width: 494px; z-index: 251656704;&quot;&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id=&quot;Picture_x0020_3&quot;
 o:spid=&quot;_x0000_i1031&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:540pt;height:165pt;
 visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\MCGU93~1\AppData\Local\Temp\msohtmlclip1\01\clip_image004.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The color coding is nice as well.&amp;nbsp; I choose to set all production servers to have
a red Status Bar (see Tip 1 image).&amp;nbsp; That
way I know when I’m connected to production and when I’m not.&amp;nbsp; Once you have configured your Preferred
Connections, you’ll note the Connections drop-down in the SSMSBoost ribbon will
contain them all for quick switching between instances:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_5&quot; o:spid=&quot;_x0000_i1030&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:280.5pt;
 height:140.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\MCGU93~1\AppData\Local\Temp\msohtmlclip1\01\clip_image006.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTiRStVWaEs9CfF1bsy1hOxDJe9GXI_FCrhbNI36DVN2S6CLmzfcBrpH_HaN_9udPr2B7zwTTdkk71PxTsfF-MKt9-2nROwHfZ6Dwqbcy9ilLLS1bM1YeJI77BP2rA0HtUcKU1VwM-ifBn/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTiRStVWaEs9CfF1bsy1hOxDJe9GXI_FCrhbNI36DVN2S6CLmzfcBrpH_HaN_9udPr2B7zwTTdkk71PxTsfF-MKt9-2nROwHfZ6Dwqbcy9ilLLS1bM1YeJI77BP2rA0HtUcKU1VwM-ifBn/s400/3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;Tip 3: Fatal Actions Guard&lt;/span&gt;&lt;/b&gt;
– Let’s face it – we’ve all likely ran a query and forgot to put a where
clause, or perhaps you clicked F5 to truncate a table in dev… BUT you were in
production.&amp;nbsp; At least this feature gives
you one last chance to change your mind if you really didn’t mean it.&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%; mso-no-proof: yes;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQTy2swLWrZA16vs8JRHMkLsexGfyYchCOuocSGpsgvOos3frqBFduJlu_WWpeoTadJb4y2tRZhf0wefksP4Vg3Z6TZ7DNPnVjDSZsbwanjLbCPZZZm-WD2zMpbDGjAKGzNPuBqTb-XcaA/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQTy2swLWrZA16vs8JRHMkLsexGfyYchCOuocSGpsgvOos3frqBFduJlu_WWpeoTadJb4y2tRZhf0wefksP4Vg3Z6TZ7DNPnVjDSZsbwanjLbCPZZZm-WD2zMpbDGjAKGzNPuBqTb-XcaA/s640/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape id=&quot;Straight_x0020_Arrow_x0020_Connector_x0020_10&quot;
 o:spid=&quot;_x0000_s1027&quot; type=&quot;#_x0000_t32&quot; style=&#39;position:absolute;
 margin-left:62.25pt;margin-top:2.3pt;width:80.25pt;height:89.25pt;flip:x;
 z-index:251658752;visibility:visible;mso-wrap-style:square;
 mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;
 mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;
 mso-width-relative:margin;mso-height-relative:margin&#39; o:gfxdata=&quot;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
QtIsJM1C0iokLd/TZ+LwHUYdh/teceQNPSw/Is/XFvb3m+1/AQAA//8DAFBLAwQUAAYACAAAACEA
nGZGQbsAAAAkAQAAKgAAAGNsaXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVs
c4SPzQrCMBCE74LvEPZu0noQkSa9iNCr1AcIyTYtNj8kUezbG+hFQfCyMLPsN7NN+7IzeWJMk3cc
aloBQae8npzhcOsvuyOQlKXTcvYOOSyYoBXbTXPFWeZylMYpJFIoLnEYcw4nxpIa0cpEfUBXNoOP
VuYio2FBqrs0yPZVdWDxkwHii0k6zSF2ugbSL6Ek/2f7YZgUnr16WHT5RwTLpRcWoIwGMwdKV2ed
NS1dgYmGff0m3gAAAP//AwBQSwECLQAUAAYACAAAACEAu+VIlAUBAAAeAgAAEwAAAAAAAAAAAAAA
AAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQCtMD/xwQAAADIBAAALAAAA
AAAAAAAAAAAAADYBAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQD4TKrn8gEAANUEAAAfAAAA
AAAAAAAAAAAAACACAABjbGlwYm9hcmQvZHJhd2luZ3MvZHJhd2luZzEueG1sUEsBAi0AFAAGAAgA
AAAhALY7BCJUBgAACxoAABoAAAAAAAAAAAAAAAAATwQAAGNsaXBib2FyZC90aGVtZS90aGVtZTEu
eG1sUEsBAi0AFAAGAAgAAAAhAJxmRkG7AAAAJAEAACoAAAAAAAAAAAAAAAAA2woAAGNsaXBib2Fy
ZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVsc1BLBQYAAAAABQAFAGcBAADeCwAAAAA=
&quot; strokecolor=&quot;red&quot; strokeweight=&quot;2.25pt&quot;&gt;
 &lt;v:stroke endarrow=&quot;block&quot; joinstyle=&quot;miter&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 127px; margin-left: 76px; margin-top: 1px; mso-ignore: vglayout; position: absolute; width: 116px; z-index: 251658752;&quot;&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id=&quot;Picture_x0020_8&quot;
 o:spid=&quot;_x0000_i1029&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:540pt;height:155.25pt;
 visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\MCGU93~1\AppData\Local\Temp\msohtmlclip1\01\clip_image008.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Preview of the popup that will appear upon execution:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_7&quot; o:spid=&quot;_x0000_i1028&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:402.75pt;
 height:260.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\MCGU93~1\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTdWbq9mSRtW2YxLbvLtNsLG5se07peYdFRTg8fKerRsW1hEOrmOrwZ8U9mIBAnpyTqXz7CyQCNcLs-OHfp6PVGb-6w2ytu_VA0hUSVkyY6J1HfEUzfpcTKW_742jgO6dkLjDYkyXY1HcZ/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTdWbq9mSRtW2YxLbvLtNsLG5se07peYdFRTg8fKerRsW1hEOrmOrwZ8U9mIBAnpyTqXz7CyQCNcLs-OHfp6PVGb-6w2ytu_VA0hUSVkyY6J1HfEUzfpcTKW_742jgO6dkLjDYkyXY1HcZ/s1600/5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;Tip 4: Results Grid aggregates &lt;/span&gt;&lt;/b&gt;–
Some people do a lot of calculations with their data, whether it’s sales data
or whatever.&amp;nbsp; You end up saving the query
results to Excel and about five minutes later you have the totals, etc.&amp;nbsp; With SSMSBoost, you can have your totals in
seconds.&amp;nbsp; Below I’m selecting 10 records
from a sales related table.&amp;nbsp; Say I want to get
the SUM, MIN, MAX and Count of the SALEPRICE.&amp;nbsp;
All I do is slide my mouse down the column highlighting the cells and a
pop-up will appear with that information:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6dQ6j8OZkucRIgqz-_s1PzostcSLfH0lTh_r0OJjB_4_yqWw9572w457JxeC7YqamBg1kt59dEoozkaekK4Yw-qxcJEranT32VkcFpUW_Ry2bDhS4XHXLUz9l3YOb1KSXhhYxBPHjsxxj/s1600/6.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;386&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6dQ6j8OZkucRIgqz-_s1PzostcSLfH0lTh_r0OJjB_4_yqWw9572w457JxeC7YqamBg1kt59dEoozkaekK4Yw-qxcJEranT32VkcFpUW_Ry2bDhS4XHXLUz9l3YOb1KSXhhYxBPHjsxxj/s640/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:rect id=&quot;Rectangle_x0020_12&quot; o:spid=&quot;_x0000_s1026&quot;
 style=&#39;position:absolute;margin-left:159pt;margin-top:73.8pt;width:300pt;
 height:52.5pt;z-index:251659776;visibility:visible;mso-wrap-style:square;
 mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;
 mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;
 mso-position-horizontal-relative:text;mso-position-vertical:absolute;
 mso-position-vertical-relative:text;v-text-anchor:middle&#39; o:gfxdata=&quot;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
&quot; filled=&quot;f&quot; strokecolor=&quot;red&quot; strokeweight=&quot;2.25pt&quot;/&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 74px; margin-left: 210px; margin-top: 96px; mso-ignore: vglayout; position: absolute; width: 404px; z-index: 251659776;&quot;&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_11&quot; o:spid=&quot;_x0000_i1027&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:461.25pt;
 height:279pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\MCGU93~1\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;Tip 5: Format SQL &lt;/span&gt;&lt;/b&gt;– Not
every developer has a tSQL formatting tool.&amp;nbsp;
SSMSBoost does come with one if you want to use it.&amp;nbsp; Your teams could all configure the tool for
the same sort of formatting for consistency sake.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggnKzcas7-EHBB1vrF8g2HCQWGNq7kf59StsZiRzdfR7uVK-nLSrXm7d-X8ZOiyejWLWSHjM6852yECkFNZ3n-YEeUOlygFtPt3vnwDIYKT0pa36yKhir1JWVM_0WbUTj0AKa8ElWNSd2p/s1600/7.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggnKzcas7-EHBB1vrF8g2HCQWGNq7kf59StsZiRzdfR7uVK-nLSrXm7d-X8ZOiyejWLWSHjM6852yECkFNZ3n-YEeUOlygFtPt3vnwDIYKT0pa36yKhir1JWVM_0WbUTj0AKa8ElWNSd2p/s400/7.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;Tip 6: History &lt;/span&gt;&lt;/b&gt;– How many
times have you wanted to retrieve a query from a few days ago?&amp;nbsp; Maybe SSMS crashed, or you wanted to revert
back to another version.&amp;nbsp; You can
customize the History feature to suit your needs.&amp;nbsp; In the example below I searched for UPDATE –
I know I ran an update a few days ago, but I don’t recall the exact
syntax.&amp;nbsp; Not a problem:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ERBwc-ESD7E6_z4v1Yk78UhEaslYfc-jRftvtE6xlAP-u9FT9M11oNgLCAyJWTallFZb-Un2kwqcHDxKAu6Tg7cRoCHjIqCi6QihPIDNO3OtZM3NtaDMee1gSaOeoOpiA6w2heKziuKf/s1600/8.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ERBwc-ESD7E6_z4v1Yk78UhEaslYfc-jRftvtE6xlAP-u9FT9M11oNgLCAyJWTallFZb-Un2kwqcHDxKAu6Tg7cRoCHjIqCi6QihPIDNO3OtZM3NtaDMee1gSaOeoOpiA6w2heKziuKf/s1600/8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_15&quot; o:spid=&quot;_x0000_i1025&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:477.75pt;
 height:386.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\MCGU93~1\AppData\Local\Temp\msohtmlclip1\01\clip_image013.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18.0pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/8648594775063946198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2016/01/ssmsboost-productivity-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8648594775063946198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8648594775063946198'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2016/01/ssmsboost-productivity-tool.html' title='SSMSBoost - A Productivity Tool'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgydiCI9m7qHLrhVEc1_1tO1pIFfIJkSITVP15mSkj_cHZn-8zJ5bhO9crJz9EkrzJPlwG32oilVAXZId4pZxfbiNypDSoVOcZXdpRHqvTfvTTcSJJeII5eh-LxLSyQfnn9PUfpdYYwNQb_/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-8207628647578721668</id><published>2015-10-16T08:35:00.000-07:00</published><updated>2015-10-16T08:35:32.618-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Backup Exec"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><title type='text'>Custom Backup Exec SSRS Report</title><content type='html'>I&#39;m not a Backup Exec administrator, but recently one of my co-workers wanted a custom SSRS report to track our backups, which also allows him to receive this report on a regular basis via a subscription. &amp;nbsp;This is what I came up with - perhaps you too will find it useful.&lt;br /&gt;
&lt;br /&gt;
Query:&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;CASE&lt;/span&gt; TaskTypeID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;200 &lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Backup&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;300 &lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Duplicate&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; END AS&lt;/span&gt; TaskType&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,JobName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,ActualStartTime&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,EndTime&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(ElapsedTimeSeconds / 3600.0) &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;ElapsedTimeHours&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,CASE FinalJobStatus&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Success w/ Exception&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&amp;nbsp;&lt;/span&gt;3&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Success w/ Exception&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&amp;nbsp;&lt;/span&gt;6&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Canceled&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&amp;nbsp;&lt;/span&gt;19&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Success&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ELSE &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Unknown&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END AS FinalJobStatus&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,TargetName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,MediaSetName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(TotalDataSizeBytes / 1024.0 / 1024.0 / 1024.0)&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;TotalDataSizeGB&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,TotalNumberOfDirectories&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,FinalErrorDescription&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;BEDB.dbo.vwJobHistorySummary&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;TaskTypeID IN (200, 300)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND ActualStartTime &amp;gt; DATEADD(MONTH, -1, GETDATE())&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; ActualStartTime &lt;span style=&quot;color: blue;&quot;&gt;DESC&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
RDL: click &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvER1ZNOERKalU5VGs&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/8207628647578721668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2015/10/custom-backup-exec-ssrs-report.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8207628647578721668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8207628647578721668'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2015/10/custom-backup-exec-ssrs-report.html' title='Custom Backup Exec SSRS Report'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-2168629036795466076</id><published>2015-08-26T10:22:00.000-07:00</published><updated>2016-02-12T09:51:07.744-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCCM"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Updates"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="System Center"/><title type='text'>Custom System Center Reports for Windows Updates</title><content type='html'>Chances are if you&#39;ve used System Center (SCCM) you&#39;ll find that the reports are less than adequate for keeping tabs on software updates in your environment. &amp;nbsp;Because of that, I decided to author a couple of Reporting Services (SSRS) reports to inform me which servers/computers (I&#39;ll use &quot;server(s)&quot; the rest of the way) require how many updates, along with the ability to click in and get more details as to which updates those are. &amp;nbsp;On the summary report you can search for servers containing certain characters - if you have a lot of servers this comes in handy. &amp;nbsp;You can then click on the server name to get more details. &amp;nbsp;On the detailed report, I decided to color code the severity and provide a direct link to the Microsoft KB.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;New!&lt;/b&gt; &lt;/span&gt;I have added a Severity Level drop-down to allow you to just review servers/workstations that only require critical updates. &amp;nbsp;I&#39;ve also added a Type drop-down so you can choose between Servers and Workstations (you will have to get some data from the database for this - review/modify the Dataset as needed). &amp;nbsp;I&#39;ve also added a total count of devices and count of those requiring critical updates, along with a percentage - management often inquires on those high-level sorts of statistics.&lt;br /&gt;
&lt;br /&gt;
Click &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEVzFWTzNVZ00tVnc&quot;&gt;here&lt;/a&gt;&amp;nbsp;to get the RDL for the summary report. &amp;nbsp;Here is a preview:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyC9xzq2ABVOGGiCv4oRW5DNsa-QVCL830VEtvI_1D8CJtJyFhC35TqSiTKbr6nwMsPu5AlxbR2p2mP6leL12Who25urClrWonjYrbBs_Laf64wP5e9iBHLilqJZF_U87yXZxRDRhJQD2Z/s1600/SUMMARY.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyC9xzq2ABVOGGiCv4oRW5DNsa-QVCL830VEtvI_1D8CJtJyFhC35TqSiTKbr6nwMsPu5AlxbR2p2mP6leL12Who25urClrWonjYrbBs_Laf64wP5e9iBHLilqJZF_U87yXZxRDRhJQD2Z/s640/SUMMARY.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEbnJSSGU3TW5Vb3M&quot;&gt;here&lt;/a&gt;&amp;nbsp;to get the RDL for the summary report. &amp;nbsp;Here is a preview:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLkPCl3BoXdn_5_iozziZCFSKx3okm2xFvJLxHQuY199njdlRGMhHiw3QSs0vaAx7de9B56EZIQHNEPlfCHs1irjRVPX4nLM9MdfY-akJsf2Jn4bkWRs-l3L-VV2da7u4j7CgPUFDmJhws/s1600/DETAIL.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLkPCl3BoXdn_5_iozziZCFSKx3okm2xFvJLxHQuY199njdlRGMhHiw3QSs0vaAx7de9B56EZIQHNEPlfCHs1irjRVPX4nLM9MdfY-akJsf2Jn4bkWRs-l3L-VV2da7u4j7CgPUFDmJhws/s640/DETAIL.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy patching!</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/2168629036795466076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2015/08/custom-system-center-reports-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/2168629036795466076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/2168629036795466076'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2015/08/custom-system-center-reports-for.html' title='Custom System Center Reports for Windows Updates'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyC9xzq2ABVOGGiCv4oRW5DNsa-QVCL830VEtvI_1D8CJtJyFhC35TqSiTKbr6nwMsPu5AlxbR2p2mP6leL12Who25urClrWonjYrbBs_Laf64wP5e9iBHLilqJZF_U87yXZxRDRhJQD2Z/s72-c/SUMMARY.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-922062221000855693</id><published>2014-11-19T10:22:00.001-08:00</published><updated>2014-11-19T10:47:13.124-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><title type='text'>Work Smarter, Not Harder - The UTILITY Instance</title><content type='html'>If your a SQL Server DBA, chances are you&#39;ve walked into environments that were pretty disorganized to say the least. &amp;nbsp;Nobody seems to have a complete list of SQL Server instances, the instances are not configured consistently, database recovery models and growth rates are all over the board, the master database is muddied up with old versions of scripts and other objects - the list is endless. &amp;nbsp;And it&#39;s a nightmare to administer.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve come up with an organizational approach that has worked very well for me over the years. &amp;nbsp;The heart of the organizational effort starts by having a centralized administrative instance. &amp;nbsp;I personally call this instance my &quot;\UTILITY&quot; instance. &amp;nbsp;It acts as the Central Management Server, is used for Policy Based Management, is the master server (MSX) for common SQL Agent jobs, houses the core DBADB (which every instance I administer has) which in turn is where I keep &lt;a href=&quot;http://allen-mcguire.blogspot.com/2013/08/my-dba-toolbox.html&quot;&gt;my favorite administrative scripts&lt;/a&gt;, and finally it&#39;s where I keep my monitoring and utility databases. &amp;nbsp;It&#39;s important to note that I push out my &lt;a href=&quot;http://allen-mcguire.blogspot.com/2014/07/using-replication-to-deploy-your-admin.html&quot;&gt;administrative scripts to all instances using replication&lt;/a&gt;. &amp;nbsp;If a new version comes out, I simply update the central version and reinitialize all subscriber instances so they too receive a fresh, updated copy.&lt;br /&gt;
&lt;br /&gt;
If you have questions and/or feedback on this approach, I would love to hear it! &amp;nbsp;I&#39;m always looking to work smarter, not harder!&lt;br /&gt;
&lt;br /&gt;
Here is a graphical representation of my \UTILITY instance&#39;s responsibilities:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5gb3JH3SJr5eqefQxbS-54jNIjibNoGop0xsEvN5g6sWNREGCTk6PyA5WeJ9W2ujhu_utRJ12lKbp7jFfQWYB8c3KpztuPjXWn4qrkY781kTvnRHiGhsaIKHTeMRpJCw-9hkeBlw9daAf/s1600/UTILITY+Instance.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5gb3JH3SJr5eqefQxbS-54jNIjibNoGop0xsEvN5g6sWNREGCTk6PyA5WeJ9W2ujhu_utRJ12lKbp7jFfQWYB8c3KpztuPjXWn4qrkY781kTvnRHiGhsaIKHTeMRpJCw-9hkeBlw9daAf/s1600/UTILITY+Instance.gif&quot; height=&quot;478&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/922062221000855693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/11/work-smarter-not-harder-utility-instance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/922062221000855693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/922062221000855693'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/11/work-smarter-not-harder-utility-instance.html' title='Work Smarter, Not Harder - The UTILITY Instance'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5gb3JH3SJr5eqefQxbS-54jNIjibNoGop0xsEvN5g6sWNREGCTk6PyA5WeJ9W2ujhu_utRJ12lKbp7jFfQWYB8c3KpztuPjXWn4qrkY781kTvnRHiGhsaIKHTeMRpJCw-9hkeBlw9daAf/s72-c/UTILITY+Instance.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-8355546092405964384</id><published>2014-11-18T14:23:00.000-08:00</published><updated>2014-11-26T08:12:10.605-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linked Servers"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Clustering"/><title type='text'>Dynamically Adjust SQL Server Failover Cluster Instance Memory</title><content type='html'>I recently installed a third FCI (Failover Cluster Instance) on a three-node WSFC (Windows Server Failover Cluster), meaning each FCI will have it&#39;s own node - assuming all nodes are online. &amp;nbsp;It&#39;s worth noting this is a non-production cluster - I would normally have an N+1 configuration in production, meaning I have a spare node at all times and typically would not have to worry about running more than one FCI on a single node. &amp;nbsp;But in this case it is quite possible to be running two instances on a single node, or the rare case where all three instances are on a single node. &amp;nbsp;When that happens, you&#39;ll want to adjust the memory in each instance so they can co-exist on the same node while you address which ever node is offline (patching, other failure, etc.).&lt;br /&gt;
&lt;br /&gt;
All that said, I found a &lt;a href=&quot;http://sqlblog.com/blogs/aaron_bertrand/archive/2009/09/18/managing-active-active-cluster-failovers-with-different-hardware.aspx&quot;&gt;blog post&lt;/a&gt; authored by Aaron Bertrand (&lt;a href=&quot;http://sqlblog.com/blogs/aaron_bertrand&quot;&gt;b&lt;/a&gt;|&lt;a href=&quot;https://twitter.com/AaronBertrand&quot;&gt;t&lt;/a&gt;) where he dynamically adjusted memory for two instances that have different hardware, whereas in my case I have three identical virtual machines. &amp;nbsp;Therefore I wanted to take some of his existing logic and tailor it to my situation. &amp;nbsp;While I&#39;m pretty certain I could have made it more efficient, the goal was to keep it very easy to read and maintain moving forward.&lt;br /&gt;
&lt;br /&gt;
Some keys to remember: you will have to create linked servers to each instance and you will make this procedure a startup procedure. &amp;nbsp;Also worth noting is that each of my nodes have 32GB of RAM with 28GB assigned to SQL Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; font-family: consolas, &#39;lucida console&#39;, &#39;courier new&#39;, courier; padding: 10px 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[master].dbo.&lt;/span&gt;&lt;span style=&quot;color: darkred;&quot;&gt;sp_procoption 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;dbo.BalanceMemory&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;startup&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;true&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;USE &lt;/span&gt;[master]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE PROCEDURE &lt;/span&gt;[dbo].[BalanceMemory]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET NOCOUNT ON;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@ThisNode &lt;span style=&quot;color: blue;&quot;&gt;NVARCHAR&lt;/span&gt;(255)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@ThisInstance&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(255)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@OtherNode2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(255)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@OtherNode3&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(255)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@command&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@run&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@LoneMemory &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;(5) = 28672&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@SharedMemory2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(5) = 14336&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@SharedMemory3&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(5) = 9216&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;&lt;/span&gt;@ThisNode = &lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;sysname&lt;/span&gt;, &lt;span style=&quot;color: magenta;&quot;&gt;SERVERPROPERTY&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;ComputerNamePhysicalNetBIOS&#39;&lt;/span&gt;))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@ThisInstance = &lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;sysname&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, &lt;span style=&quot;color: magenta;&quot;&gt;SERVERPROPERTY&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;InstanceName&#39;&lt;/span&gt;))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@command = &lt;span style=&quot;color: red;&quot;&gt;&#39;USE [master];&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC sp_configure &#39;&#39;show advanced options&#39;&#39;, 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RECONFIGURE WITH OVERRIDE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC sp_configure &#39;&#39;max server memory (MB)&#39;&#39;, $;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RECONFIGURE WITH OVERRIDE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC sp_configure &#39;&#39;show advanced options&#39;&#39;, 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RECONFIGURE WITH OVERRIDE;&#39;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;@ThisInstance = &lt;span style=&quot;color: red;&quot;&gt;&#39;SQL01&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;EXEC &lt;/span&gt;[SERVER02\SQL02].[master].dbo.sp_executesql &lt;span style=&quot;color: red;&quot;&gt;N&#39;SELECT @node = CONVERT(SYSNAME, SERVERPROPERTY(&#39;&#39;ComputerNamePhysicalNetBIOS&#39;&#39;))&#39;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;N&#39;@node SYSNAME OUTPUT&#39;&lt;/span&gt;, @OtherNode2 &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER\SQL03].[master].dbo.sp_executesql &lt;span style=&quot;color: red;&quot;&gt;N&#39;SELECT @node = CONVERT(SYSNAME,&amp;nbsp;SERVERPROPERTY(&#39;&#39;ComputerNamePhysicalNetBIOS&#39;&#39;))&#39;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;N&#39;@node SYSNAME OUTPUT&#39;&lt;/span&gt;, @OtherNode3&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;@ThisNode = @OtherNode2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;AND @ThisNode = @OtherNode3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt; -- ALL THREE ON SAME NODE!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run = &lt;span style=&quot;color: magenta;&quot;&gt;REPLACE&lt;/span&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory3);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF&lt;/span&gt; @ThisNode = @OtherNode2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- TWO ON SAME NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF&lt;/span&gt; @ThisNode = @OtherNode3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- TWO ON SAME NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/span&gt; &lt;span style=&quot;color: #274e13;&quot;&gt;-- EACH ON OWN NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF @ThisInstance = &lt;span style=&quot;color: red;&quot;&gt;&#39;SQL02&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql &lt;span style=&quot;color: red;&quot;&gt;N&#39;SELECT @node = CONVERT(SYSNAME,&amp;nbsp;SERVERPROPERTY(&#39;&#39;ComputerNamePhysicalNetBIOS&#39;&#39;))&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&#39;@node SYSNAME OUTPUT&#39;&lt;/span&gt;, @OtherNode2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql &lt;span style=&quot;color: red;&quot;&gt;N&#39;SELECT @node = CONVERT(SYSNAME,&amp;nbsp;SERVERPROPERTY(&#39;&#39;ComputerNamePhysicalNetBIOS&#39;&#39;))&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&#39;@node SYSNAME OUTPUT&#39;&lt;/span&gt;, @OtherNode3&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; IF&lt;/span&gt; @ThisNode = @OtherNode2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;AND @ThisNode = @OtherNode3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- ALL THREE ON SAME NODE!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory3);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF &lt;/span&gt;@ThisNode = @OtherNode2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- TWO ON SAME NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF&lt;/span&gt; @ThisNode = @OtherNode3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- TWO ON SAME NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/span&gt; &lt;span style=&quot;color: #274e13;&quot;&gt;-- EACH ON OWN NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER03\SQL03].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF @ThisInstance = &lt;span style=&quot;color: red;&quot;&gt;&#39;SQL03&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql &lt;span style=&quot;color: red;&quot;&gt;N&#39;SELECT @node = CONVERT(SYSNAME,&amp;nbsp;SERVERPROPERTY(&#39;&#39;ComputerNamePhysicalNetBIOS&#39;&#39;))&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&#39;@node SYSNAME OUTPUT&#39;&lt;/span&gt;, @OtherNode2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql &lt;span style=&quot;color: red;&quot;&gt;N&#39;SELECT @node = CONVERT(SYSNAME,&amp;nbsp;SERVERPROPERTY(&#39;&#39;ComputerNamePhysicalNetBIOS&#39;&#39;))&#39;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&#39;@node SYSNAME OUTPUT&#39;&lt;/span&gt;, @OtherNode3&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;@ThisNode = @OtherNode2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;AND @ThisNode = @OtherNode3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- ALL THREE ON SAME NODE!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory3);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF&lt;/span&gt; @ThisNode = @OtherNode2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- TWO ON SAME NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF&lt;/span&gt; @ThisNode = @OtherNode3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN &lt;/span&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-- TWO ON SAME NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @SharedMemory2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&#39;$&#39;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; ELSE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/span&gt; &lt;span style=&quot;color: #274e13;&quot;&gt;-- EACH ON OWN NODE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;@run =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(@command, &lt;span style=&quot;color: red;&quot;&gt;&#39;$&#39;&lt;/span&gt;, @LoneMemory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                                &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER01\SQL01].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[SERVER02\SQL02].[master].dbo.sp_executesql @run;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; END&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/8355546092405964384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/11/dynamically-adjust-sql-server-memory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8355546092405964384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8355546092405964384'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/11/dynamically-adjust-sql-server-memory.html' title='Dynamically Adjust SQL Server Failover Cluster Instance Memory'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-3161143001026324970</id><published>2014-10-21T14:17:00.002-07:00</published><updated>2016-12-01T10:49:27.741-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><title type='text'>Consolidate your Reports with Dynamic Data Sources</title><content type='html'>I love writing SSRS reports that assist me in consuming data across my instances. &amp;nbsp;In some cases I set up subscriptions to my reports so I don&#39;t forget to review the data periodically. &amp;nbsp;But how many times have you created a really nice report and made a copy of it so you could have it query data from another instance? &amp;nbsp;I was modifying a report today and since I had three copies (one for three different instances), I set out to find a better solution.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you write reports, you know that when you create a data source, it is tied to an instance of SQL Server. &amp;nbsp;If you want your report to be able to query more than one data source, you will want to create what is called a &quot;dynamic data source&quot;. &amp;nbsp;Here is one way you can go about doing that. &amp;nbsp;Note that this solution is tailored around the fact that I have &lt;a href=&quot;http://allen-mcguire.blogspot.com/2014/07/using-replication-to-deploy-your-admin.html&quot;&gt;databases in each of my instances&lt;/a&gt; with the same schema to harvest performance related data, for example, but you might have a report that queries a DMV - that would be another use case.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;u&gt;Create Shared Dataset&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
The first thing I&#39;m going to start with is a blank report. &amp;nbsp;I&#39;m then going to create a Shared Dataset in my Visual Studio Solution called CMSInstances. &amp;nbsp;Creating a shared dataset allows you to use it in all the reports in your solution. &amp;nbsp;I prefixed it with CMS because I&#39;m going to get a list of instances from my Central Management Server (CMS). &amp;nbsp;If you are not using a CMS, you should be! &amp;nbsp;But if that were the case you would simply specify the parameter values individually, keeping in mind that if you add/remove instances - you will have to edit every report!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOm0bHB332K_8XbXpSpv5gIuAM-GQr-SS7F-WoqAXH6_Ul7O6nPu9gKfYGAULlBYsUCrpRNldaHPmXizB9RKkQS5YTHpi0kakMyQV93ybfCiMbwjZX-NhuQ5AE5Umse8W3JBBogmhGiX4h/s1600/Step1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;146&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOm0bHB332K_8XbXpSpv5gIuAM-GQr-SS7F-WoqAXH6_Ul7O6nPu9gKfYGAULlBYsUCrpRNldaHPmXizB9RKkQS5YTHpi0kakMyQV93ybfCiMbwjZX-NhuQ5AE5Umse8W3JBBogmhGiX4h/s1600/Step1.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Configure the shared dataset to connect to your CMS instance and paste the following query in the query window:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;&lt;/span&gt;g.[name] + &lt;span style=&quot;color: red;&quot;&gt;&#39; - &#39;&lt;/span&gt; + s.[name] AS [SQLAlias]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,[server_name] &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;[InstanceName]&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;[msdb].[dbo].[sysmanagement_shared_server_groups_internal] g&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #999999;&quot;&gt;INNER JOIN&lt;/span&gt; [msdb].[dbo].[sysmanagement_shared_registered_servers_internal] s &lt;span style=&quot;color: blue;&quot;&gt;ON &lt;/span&gt;g.[server_group_id] = s.[server_group_id]&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;g.[server_type] = 0&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #999999;&quot;&gt;AND &lt;/span&gt;g.[is_system_object] = 0&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; [SQLAlias]&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;u&gt;Create your Data Source&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Now that we have our shared dataset created, we can go to our report and add it as a data source. &amp;nbsp;In the Report Data window, right-click Data Sources and add a new one. &amp;nbsp;Call it &quot;DynamicDataSource&quot;. Next, in the embedded connections section click the expression button.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTRY1EsSW6TUQrotZ6ulJLfRS2hoXb2too8E7D0BXsjmpRxAVMIaMvYz4OHpVDNISSMH7tCC3xQDW0uwqrchwHjI_kpSKUBFXB1pqhNpjVrffCey-OfQtZTToQ7jA-Z6p8-yFtuSlx8LPw/s1600/Step2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTRY1EsSW6TUQrotZ6ulJLfRS2hoXb2too8E7D0BXsjmpRxAVMIaMvYz4OHpVDNISSMH7tCC3xQDW0uwqrchwHjI_kpSKUBFXB1pqhNpjVrffCey-OfQtZTToQ7jA-Z6p8-yFtuSlx8LPw/s1600/Step2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
Enter the following expression:&lt;/div&gt;
&lt;div&gt;
=&lt;span style=&quot;color: #741b47;&quot;&gt;&quot;Data Source=&quot;&lt;/span&gt;&amp;nbsp;&amp;amp; Parameters!InstanceName.Value&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;Create your Report&#39;s Dataset&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
Because we created the shared dataset prior, we can use that dataset over and over in any report we author. &amp;nbsp;To add that shared dataset to this report, simply right-click Datasets, give it a Name and select the shared dataset.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxxfP4T_pCaXgQoNmp6bXTHBv7_ZNnaUo3T9Q62l2Kf1PBe6wXCo-AY1HpSQSpIhl4gnNy_J-xrDW6el9bW0q_wDv7xqxC61PgpHWDm_Na18oSiRQ1E3QPjZHaxYpDAv9BTTs9huPqMwM/s1600/Step4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;259&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxxfP4T_pCaXgQoNmp6bXTHBv7_ZNnaUo3T9Q62l2Kf1PBe6wXCo-AY1HpSQSpIhl4gnNy_J-xrDW6el9bW0q_wDv7xqxC61PgpHWDm_Na18oSiRQ1E3QPjZHaxYpDAv9BTTs9huPqMwM/s1600/Step4.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/u&gt;
&lt;u style=&quot;color: blue; font-size: x-large;&quot;&gt;Create your Parameter&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
Now that you&#39;ve created the reports dataset to populate your instance pull-down, we can create the Parameter. &amp;nbsp;Right-click on Parameters and Add Parameter. &amp;nbsp;For Name type in InstanceName and Prompt just type in Instance. &amp;nbsp;Next, click on Available Values and configure it as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ2cGSIypL19iS2yIwwuNWIj4bqIm7k9o0_KboYM48r3z3KNQD81hHlr0zwzuPK_Nq85kf22HkYHOydVt5a-QYLu5OQ0cWdcccqgyKyyGznJRzmGm-jWJ3RfeKABGdSuZHEhauDVuD-ReB/s1600/Step5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;366&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ2cGSIypL19iS2yIwwuNWIj4bqIm7k9o0_KboYM48r3z3KNQD81hHlr0zwzuPK_Nq85kf22HkYHOydVt5a-QYLu5OQ0cWdcccqgyKyyGznJRzmGm-jWJ3RfeKABGdSuZHEhauDVuD-ReB/s1600/Step5.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;u&gt;You&#39;re all done!&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
You should now be able to Preview the report and your Instance pull-down will be populated with all the instances configured in your CMS. &amp;nbsp;If you group your servers by environment, you can further refine the query as needed. &amp;nbsp;Any queries using this data source would obviously have to be drawing their data from similar databases and table names.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNUtneYlzPmz1qeZEqL07KmLTEinAwPwRD66IeLjUT-G2Gs-lJxain7gvzPo3u4EfMWQqCHXpUw2UPSj-MnRCc-GrZrj_5c2iMWYPiO-bww5q8w_oJAYdJP1jghRIkBtrEwc2ysRe3JvRn/s1600/Step6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;345&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNUtneYlzPmz1qeZEqL07KmLTEinAwPwRD66IeLjUT-G2Gs-lJxain7gvzPo3u4EfMWQqCHXpUw2UPSj-MnRCc-GrZrj_5c2iMWYPiO-bww5q8w_oJAYdJP1jghRIkBtrEwc2ysRe3JvRn/s1600/Step6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/3161143001026324970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/10/consolidate-your-reports-with-dynamic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3161143001026324970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3161143001026324970'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/10/consolidate-your-reports-with-dynamic.html' title='Consolidate your Reports with Dynamic Data Sources'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOm0bHB332K_8XbXpSpv5gIuAM-GQr-SS7F-WoqAXH6_Ul7O6nPu9gKfYGAULlBYsUCrpRNldaHPmXizB9RKkQS5YTHpi0kakMyQV93ybfCiMbwjZX-NhuQ5AE5Umse8W3JBBogmhGiX4h/s72-c/Step1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-3191360537061292813</id><published>2014-07-17T11:08:00.003-07:00</published><updated>2014-07-17T11:10:50.525-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Replication"/><title type='text'>Using Replication to keep your Admin Scripts Current</title><content type='html'>We all have handy scripts that we want present in our SQL Server database instances. &amp;nbsp;Examples would include &lt;a href=&quot;http://sqlblog.com/blogs/adam_machanic/archive/2012/03/22/released-who-is-active-v11-11.aspx&quot;&gt;sp_WhoIsActive&lt;/a&gt;, &lt;a href=&quot;http://www.brentozar.com/blitz/&quot;&gt;sp_Blitz&lt;/a&gt;, &lt;a href=&quot;http://www.brentozar.com/blitzcache/&quot;&gt;sp_BlitzCache&lt;/a&gt;, &lt;a href=&quot;http://ola.hallengren.com/&quot;&gt;Ola&#39;s maintenance scripts&lt;/a&gt;&amp;nbsp;or custom scripts like &lt;a href=&quot;http://allen-mcguire.blogspot.com/2013/02/estimated-time-to-complete.html&quot;&gt;Estimated Time to Complete&lt;/a&gt;. &amp;nbsp;But how do you keep all your instances updated when new versions are released? &amp;nbsp;You certainly don&#39;t want to run the updated scripts on each instance one-by-one, especially if you manage quite a few instances. &amp;nbsp;One way to keep them in sync is by using a Central Management Server (CMS) and running the updated script on multiple instances at once. &amp;nbsp;However, what if there are some instances that you don&#39;t really want or need to deploy the scripts to? &amp;nbsp;That was my situation, so I opted to use SQL Server Replication to keep my scripts in sync.&lt;br /&gt;
&lt;br /&gt;
I personally have an instance that I call my &quot;UTILITY&quot; instance. &amp;nbsp;I use this instance as my CMS. &amp;nbsp;It&#39;s also where I store all my monitoring databases like &lt;a href=&quot;http://software.dell.com/products/spotlight-on-sql-server-enterprise/&quot;&gt;Spotlight&lt;/a&gt;, utility databases like &lt;a href=&quot;http://www.scalesql.com/cleartrace/&quot;&gt;ClearTrace&lt;/a&gt;&amp;nbsp;and most importantly - my central DBADB. &amp;nbsp;I have a DBADB in every instance I administer. &amp;nbsp;It&#39;s a place to keep all your DBA related scripts and tables (maintenance logging tables, &lt;a href=&quot;http://allen-mcguire.blogspot.com/2014/06/reporting-on-spblitzcache-results.html&quot;&gt;sp_BlitzCache output&lt;/a&gt;, &lt;a href=&quot;http://allen-mcguire.blogspot.com/2014/05/sql-server-wait-stats-harvesting-and.html&quot;&gt;harvested wait stat data&lt;/a&gt;, etc.) and you can have peace of mind that nobody else is going to go in there and mess with them. &amp;nbsp;I then created a publication on my DBADB, selected only the stored procedures that I want to deploy and set up subscriptions to all the target instances. &amp;nbsp;With just a few clicks of the mouse, I was able to deploy out the latest and greatest version of all my administrative scripts.&lt;br /&gt;
&lt;br /&gt;
These are the ones I personally replicate out - if you have other useful scripts, feel free to share!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIFjYjBQ56Tbr4bMq1O1gZ5s-PTL8f-DPlus14OUWxoRpPZ6Z7L5mKu1uCTeW9A1LqPntorcx24PJynkM_WuL2faGCLvU88CxaeeRhZnO41eOAfo5GJGF2GmTdOlJVL6gNxHl-DJ8plnRu/s1600/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIFjYjBQ56Tbr4bMq1O1gZ5s-PTL8f-DPlus14OUWxoRpPZ6Z7L5mKu1uCTeW9A1LqPntorcx24PJynkM_WuL2faGCLvU88CxaeeRhZnO41eOAfo5GJGF2GmTdOlJVL6gNxHl-DJ8plnRu/s1600/Capture.JPG&quot; height=&quot;640&quot; width=&quot;344&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/3191360537061292813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/07/using-replication-to-deploy-your-admin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3191360537061292813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3191360537061292813'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/07/using-replication-to-deploy-your-admin.html' title='Using Replication to keep your Admin Scripts Current'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIFjYjBQ56Tbr4bMq1O1gZ5s-PTL8f-DPlus14OUWxoRpPZ6Z7L5mKu1uCTeW9A1LqPntorcx24PJynkM_WuL2faGCLvU88CxaeeRhZnO41eOAfo5GJGF2GmTdOlJVL6gNxHl-DJ8plnRu/s72-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-8322868455690405873</id><published>2014-06-18T08:21:00.004-07:00</published><updated>2017-03-30T11:16:01.784-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sp_BlitzCache"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><title type='text'>Reporting on sp_BlitzCache Results</title><content type='html'>Regularly examining the plan cache in your database instances is a must, as there is a wealth of useful information that helps you determine which statements and/or stored procedures are your biggest performance problems. &amp;nbsp;Doing such analysis has become much easier with the release of &lt;a href=&quot;http://www.brentozar.com/blitzcache/&quot; target=&quot;_blank&quot;&gt;sp_BlitzCache&lt;/a&gt; by &lt;a href=&quot;http://www.brentozar.com/&quot; target=&quot;_blank&quot;&gt;Brent Ozar Unlimited&lt;/a&gt;. &amp;nbsp;One of the great features of sp_BlitzCache is the fact that you can log the results to a table, allowing for more effective analysis of the results. &amp;nbsp;I&#39;ve decided to take it one step further and put together an SSRS report to help dive into the data. &amp;nbsp;Get the&amp;nbsp;&lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEbUVfVFQtZ0JLckk&quot; target=&quot;_blank&quot;&gt;Report RDL&lt;/a&gt;.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To harvest the data, I created a scheduled job in SQL Server which is set to run nightly at 7pm. &amp;nbsp;I keep all of my utility scripts and data in a database called DBADB. &amp;nbsp;Each instance has its own such database.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;EXEC &lt;/span&gt;DBADB.dbo.sp_BlitzCache&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@top=&lt;span style=&quot;color: red;&quot;&gt;&#39;200&#39;&lt;/span&gt;,&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@results = &lt;span style=&quot;color: red;&quot;&gt;&#39;expert&#39;&lt;/span&gt;,&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@output_database_name = &lt;span style=&quot;color: red;&quot;&gt;&#39;DBADB&#39;&lt;/span&gt;,&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;@output_schema_name = &lt;span style=&quot;color: red;&quot;&gt;&#39;dbo&#39;&lt;/span&gt;,&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@output_table_name = &lt;span style=&quot;color: red;&quot;&gt;&#39;BlitzCache&#39;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
The report I wrote is based off expert mode results. &amp;nbsp;There is a plethora of data in the report so it does get fairly wide. &amp;nbsp;I don&#39;t display the values in QueryText or QueryPlan on the report, but in Figure 3 you&#39;ll note I provided the syntax to obtain the query plan and/or SQL text in the header. &amp;nbsp;Copy in the plan_handle or sql_handle, respectively. &amp;nbsp;Another option is to&amp;nbsp;directly query&amp;nbsp;your BlitzCache table for it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are four parameters on the report: Database Name, Sample Time, Query Type and Warnings. &amp;nbsp;Most column headers allow you to sort so you can zero in on a particular performance metric of concern. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Figure 1 - Parameters&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfLhKaf-Hfl8UmZm_1aXbttVO7YyxeIL2H-gCwULqukJkQZnzWkvoAl88SF60nG1d7kJxz58bml_H8do1DxkYjAt5364iGmBswJldFo4PUfiD44YR1qQaJLCHiQtiu__g04vXSBABy2oqE/s1600/Parameters.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfLhKaf-Hfl8UmZm_1aXbttVO7YyxeIL2H-gCwULqukJkQZnzWkvoAl88SF60nG1d7kJxz58bml_H8do1DxkYjAt5364iGmBswJldFo4PUfiD44YR1qQaJLCHiQtiu__g04vXSBABy2oqE/s1600/Parameters.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Figure 2 - Report Data&lt;/b&gt; - these are the first set of columns in the report:
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy2h2KiGVN_k6zhufXnkiQj2yUgc66TBz7j5ub85UhW6jRUjybjrLTxBpK_fuA1xJUWkHBslk07XWIektLKMQPreCCmrKo7rWSLj2PsWlPcApsH1WWRCgZfT57AUdUvdoenBWKcUjaKj7y/s1600/Results1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy2h2KiGVN_k6zhufXnkiQj2yUgc66TBz7j5ub85UhW6jRUjybjrLTxBpK_fuA1xJUWkHBslk07XWIektLKMQPreCCmrKo7rWSLj2PsWlPcApsH1WWRCgZfT57AUdUvdoenBWKcUjaKj7y/s1600/Results1.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Figure 3 - Report Data, cont.&lt;/b&gt; - scrolling to the right is more data:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-cmPyFD_qfu_BJi_7AXo6xepPCp9BQSRTYvL56MY4PC2FJHrSXH2OkS84ocrDNas0ZPv-Ci5hue3_IUzOQe9MAKZck3cnLm9ScQpUJ1U_H9c0t5qMyDe-zgeSiM551qCJBQF5PgQ2boms/s1600/Results2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;106&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-cmPyFD_qfu_BJi_7AXo6xepPCp9BQSRTYvL56MY4PC2FJHrSXH2OkS84ocrDNas0ZPv-Ci5hue3_IUzOQe9MAKZck3cnLm9ScQpUJ1U_H9c0t5qMyDe-zgeSiM551qCJBQF5PgQ2boms/s1600/Results2.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/8322868455690405873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/06/reporting-on-spblitzcache-results.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8322868455690405873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8322868455690405873'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/06/reporting-on-spblitzcache-results.html' title='Reporting on sp_BlitzCache Results'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfLhKaf-Hfl8UmZm_1aXbttVO7YyxeIL2H-gCwULqukJkQZnzWkvoAl88SF60nG1d7kJxz58bml_H8do1DxkYjAt5364iGmBswJldFo4PUfiD44YR1qQaJLCHiQtiu__g04vXSBABy2oqE/s72-c/Parameters.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-2515143695878654283</id><published>2014-05-13T10:20:00.001-07:00</published><updated>2014-05-13T12:36:52.669-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spinlocks"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><title type='text'>SQL Server Spinlock Reference</title><content type='html'>I&#39;ve been troubleshooting some performance issues of late, and it was brought to my attention that there is yet another DMV that may shed some light on the subject: sys.dm_os_spinlock_stats.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;First, what is a spinlock?&lt;/b&gt;&lt;br /&gt;
Per Microsoft&#39;s whitepaper &lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=26666&quot; target=&quot;_blank&quot;&gt;Diagnosing and Resolving Spinlock Contention on SQL Server&lt;/a&gt;: &quot;Spinlocks are lightweight synchronization primitives which are used to protect access to data structures. &amp;nbsp;They are generally used when it is expected that access to a given data structure will need to be held for a very short period of time.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How does a spinlock differ than a latch?&lt;/b&gt;&lt;br /&gt;
Per the whitepaper: &quot;The main difference between a latch and a spinlock is the fact that spinlocks will spin (execute a loop) for a period of time checking for availability of a data structure while a thread attempting to acquire access to a structure protected by a latch will immediately yield if the resource is not available. Yielding requires context switching of a thread off the CPU so that another thread can execute. This is a relatively expensive operation and for resources that are held for a very short duration it is more efficient overall to allow a thread to execute in a loop periodically checking for availability of the resource.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What condition might indicate spinlock contention?&lt;/b&gt;&lt;br /&gt;
Per the whitepaper:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
1. A high number of spins and backoffs are observed for a particular spinlock type.&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;b&gt;AND&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;
&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
2. The system is experiencing heavy CPU utilization or spikes in CPU consumption. In heavy CPU scenarios one may also observe high signal waits on SOS_SCHEDULER_YEILD (reported by the DMV sys.dm_os_wait_stats).&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;b&gt;AND&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;
&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
3. The system is experiencing very high concurrency.&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;b&gt;AND&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;
&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
4. The CPU usage and spins are increased disproportionate to throughput.&lt;/div&gt;
&lt;/blockquote&gt;
&lt;b&gt;Options and workarounds for handling spinlock contention:&lt;/b&gt;&lt;br /&gt;
Per the whitepaper:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Fully Qualified Names: &lt;/b&gt;Fully qualifying names of all objects will result in removing the need for SQL Server to execute code paths that are required to resolve names. We have observed contention points also on the SOS_CACHESTORE spinlock type encountered when not utilizing fully qualified names in calls to stored procedures. Failure to fully qualify these the names results in the need for SQL Server to lookup the default schema for the user which results in a longer code path required to execute the SQL.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Parameterized Queries: &lt;/b&gt;Another example is utilizing parameterized queries and stored procedure calls to reduce the work needed to generate execution plans. This again results in a shorter code path for execution.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;LOCK_HASH Contention:&lt;/b&gt; Contention on certain lock structure or hash bucket collisions is unavoidable in some cases. Even though the SQL Server engine partitions the majority of lock structures, there are still times when acquiring a lock results in access the same hash bucket. For example, an application the accesses the same row by many threads concurrently (i.e. reference data). This type of problems can be approached by techniques which either scale out this reference data within the database schema or leverage NOLOCK hints when possible.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
The diagram below provides a conceptual view of the spinlock algorithm:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdQ9l0chyugzeIRiGsAleaYhkC03lADrX2cQ_W-ZndPZgCElGr0XFEi2dtBR8MlkeVPa9WCvOq2ClVhV0Fp7AVDUzwXasPJ6p7hs6oua2E30YkikMCMAZZGX5vBXcR7hsX4Ox0BCF2l9mE/s1600/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdQ9l0chyugzeIRiGsAleaYhkC03lADrX2cQ_W-ZndPZgCElGr0XFEi2dtBR8MlkeVPa9WCvOq2ClVhV0Fp7AVDUzwXasPJ6p7hs6oua2E30YkikMCMAZZGX5vBXcR7hsX4Ox0BCF2l9mE/s1600/Capture.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some additional resources I found on the topic:&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Paul Randal&lt;/u&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/sos_scheduler_yield-waits-and-the-lock_hash-spinlock/&quot; target=&quot;_blank&quot;&gt;SOS_SCHEDULER_YIELD waits and the LOCK_HASH spinlock&lt;/a&gt;,&amp;nbsp;April 2011&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/advanced-performance-troubleshooting-waits-latches-spinlocks/&quot; target=&quot;_blank&quot;&gt;Advanced SQL Server performance tuning&lt;/a&gt;, April 2011&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Thomas Kejser&lt;/u&gt;&lt;br /&gt;
&lt;a href=&quot;http://kejser.org/databases/thread-synchronization-in-sql-server/&quot; target=&quot;_blank&quot;&gt;Thread Synchronization In SQL Server&lt;/a&gt;, November 2011&lt;br /&gt;
&lt;a href=&quot;http://kejser.org/grade-of-the-steel/diagnosing-and-fixing-sos_object_store-spins-for-singleton-inserts/&quot; target=&quot;_blank&quot;&gt;Diagnosing And Fixing SOS_OBJECT_STORE Spins for Singleton INSERTS&lt;/a&gt;, May 2011&lt;br /&gt;
&lt;a href=&quot;http://kejser.org/grade-of-the-steel/secret-scale-sauce-heavy-singleton-insert-spinlocks/&quot; target=&quot;_blank&quot;&gt;Secret Scale Sauce: Heavy Singleton INSERT Spinlocks&lt;/a&gt;, May 2011&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Arvind Shyamsundar&lt;/u&gt;&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/arvindsh/archive/2014/01/22/exotic-spinlocks-xts-mgr.aspx&quot; target=&quot;_blank&quot;&gt;Exotic spinlocks: XTS_MGR&lt;/a&gt;, January 2014&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Fabricio Catae&lt;/u&gt;&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/fcatae/archive/2010/07/12/spinlock-parte-1.aspx&quot; target=&quot;_blank&quot;&gt;Spinlock (Part I)&lt;/a&gt;, July 2010&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/fcatae/archive/2010/07/15/spinlock-parte-ii.aspx&quot; target=&quot;_blank&quot;&gt;Spinlock (Part II)&lt;/a&gt;, July 2010&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/fcatae/archive/2010/07/19/spinlock-parte-iii.aspx&quot; target=&quot;_blank&quot;&gt;Spinlock (Part III)&lt;/a&gt;, July 2010&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/fcatae/archive/2009/12/17/spinlock-contention.aspx&quot; target=&quot;_blank&quot;&gt;Spinlock Contention&lt;/a&gt;, December 2009</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/2515143695878654283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/05/sql-server-spinlock-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/2515143695878654283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/2515143695878654283'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/05/sql-server-spinlock-reference.html' title='SQL Server Spinlock Reference'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdQ9l0chyugzeIRiGsAleaYhkC03lADrX2cQ_W-ZndPZgCElGr0XFEi2dtBR8MlkeVPa9WCvOq2ClVhV0Fp7AVDUzwXasPJ6p7hs6oua2E30YkikMCMAZZGX5vBXcR7hsX4Ox0BCF2l9mE/s72-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-5186396692268730545</id><published>2014-05-07T12:24:00.000-07:00</published><updated>2017-03-30T11:10:41.626-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="Wait Stats"/><title type='text'>SQL Server Wait Stats Harvesting and Reporting</title><content type='html'>One the the keys - if not THE key - to identifying&amp;nbsp;SQL Server&amp;nbsp;performance issues is by investigating wait statistics.&amp;nbsp;&amp;nbsp;As is the case with various SQL Server performance metrics, however, is the fact that these stats are cumulative. &amp;nbsp;That means you can&#39;t just query sys.dm_os_wait_stats and determine the root cause of an issue at a particular point in time unless your issue is happening right &lt;i&gt;&lt;b&gt;now&lt;/b&gt;. &amp;nbsp;&lt;/i&gt;If that were the case,&amp;nbsp;you run one of the various scripts to calculate the differential of multiple sys.dm_os_wait_stats executions (example from &lt;a href=&quot;http://www.brentozar.com/responder/triage-wait-stats-in-sql-server/&quot; target=&quot;_blank&quot;&gt;Brent Ozar&lt;/a&gt;). &amp;nbsp;But what if your issue occurred off-hours, during the night, while you were traveling or in a meeting?&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
While I realize there are various ways to go about analyzing wait stats, I decided to put together a solution that was very easy to manage, deploy and write custom reports from. &amp;nbsp;You will need to configure a &lt;a href=&quot;http://technet.microsoft.com/en-us/library/bb934126.aspx&quot; target=&quot;_blank&quot;&gt;Central Management Server&lt;/a&gt;&amp;nbsp;(CMS) and register your target servers - the servers you want to deploy this solution to.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Once you have your CMS configured, you will create a SQL Server Agent job (&quot;Collect and Cycle Wait Stats&quot;, for example). &amp;nbsp;The job is going to have four steps:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Check for DBADB database, which is the database I keep all DBA related scripts and data in&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If not present, create it&lt;/li&gt;
&lt;li&gt;Get script &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEQ29pWGpOclczZjQ&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Check for table that will house the wait stats&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If not present, create it&lt;/li&gt;
&lt;li&gt;Get script &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEZ0VXYXl4dHZLVm8&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Collect wait stats&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;I personally harvest the wait stats hourly but you may adjust as you see fit&lt;/li&gt;
&lt;li&gt;This is a pretty typical query you will find in most blogs&lt;/li&gt;
&lt;li&gt;Get script &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEUFY5S2FwNXpFbkU&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Clear wait stats&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;By clearing the wait stats, I know each hourly harvest are the wait stats just for that hour and I don&#39;t have to do any differential calculations&lt;/li&gt;
&lt;li&gt;If I want to know wait stats to a point in time, I can add them up accordingly&lt;/li&gt;
&lt;li&gt;Get script &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEdG13cUlxQTBuRU0&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Report on it!&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Preview of report below&lt;/li&gt;
&lt;li&gt;Get the RDL &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEdmxGaFN6UUlVd28&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div&gt;
By checking for and creating the database and table if they aren&#39;t present, you can deploy this by going to your CMS checking a box to target another instance.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Below is a preview of a report I just put together. &amp;nbsp;I&#39;ll likely update it in the coming days/weeks to better highlight anomalies, but this works for now. &amp;nbsp;You choose a date and the top 95% of waits are summarized by hour, which you can further drill into by clicking the plus sign by the hour on the left. &amp;nbsp;I added a few helpful reminders/notes from &lt;a href=&quot;https://www.sqlskills.com/blogs/paul/&quot; target=&quot;_blank&quot;&gt;Paul Randal&lt;/a&gt; and &lt;a href=&quot;http://www.sqlskills.com/blogs/joe/&quot; target=&quot;_blank&quot;&gt;Joe Sack&#39;s&lt;/a&gt; blogs. &amp;nbsp;As you can see, I had a CPU issue on this particular day at or around 10am as indicated by the elevated/irregular SOS_SCHEDULER_YIELD signal waits.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBkGpSo8SzMIlWoFGB1D_zJByL-ztejZJfeM5u7yeunWYMz7vw3s_i65sR5kqfyglHs4QOjZl870TkyT2-jGXqEKGE-fcpVbgvzssHWtWoPp2zAIwQAoMT4Wg6Mcw6kQlGC-mD8OeTJsqM/s1600/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBkGpSo8SzMIlWoFGB1D_zJByL-ztejZJfeM5u7yeunWYMz7vw3s_i65sR5kqfyglHs4QOjZl870TkyT2-jGXqEKGE-fcpVbgvzssHWtWoPp2zAIwQAoMT4Wg6Mcw6kQlGC-mD8OeTJsqM/s1600/Capture.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/5186396692268730545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/05/sql-server-wait-stats-harvesting-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/5186396692268730545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/5186396692268730545'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/05/sql-server-wait-stats-harvesting-and.html' title='SQL Server Wait Stats Harvesting and Reporting'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBkGpSo8SzMIlWoFGB1D_zJByL-ztejZJfeM5u7yeunWYMz7vw3s_i65sR5kqfyglHs4QOjZl870TkyT2-jGXqEKGE-fcpVbgvzssHWtWoPp2zAIwQAoMT4Wg6Mcw6kQlGC-mD8OeTJsqM/s72-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-4331466329836277169</id><published>2014-05-07T08:41:00.001-07:00</published><updated>2019-12-13T06:07:57.119-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLIO"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>Useful SQL Server Articles</title><content type='html'>I used to have these on &lt;a href=&quot;http://allen-mcguire.blogspot.com/2013/08/my-dba-toolbox.html&quot; target=&quot;_blank&quot;&gt;My DBA Toolbox&lt;/a&gt; post, but it was getting a little full so I&#39;m pulling out my list of favorite articles and sharing them in their own post. &amp;nbsp;Enjoy!&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Paul Randal (&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/PaulRandal&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/misconceptions-around-tf-1118/&quot; target=&quot;_blank&quot;&gt;Misconceptions around Trace Flag 1118&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/fed-up-with-backup-success-messages-bloating-your-error-logs/&quot; target=&quot;_blank&quot;&gt;Turn off backup success messages,&amp;nbsp;Trace Flag 3226&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/&quot; target=&quot;_blank&quot;&gt;Wait statistics, or please tell me where it hurts&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/script-open-transactions-with-text-and-plans/&quot;&gt;Script - open transactions with text and plans&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Kimberly Tripp (&lt;a href=&quot;http://www.sqlskills.com/blogs/kimberly/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/KimberlyLTripp&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/kimberly/transaction-log-vlfs-too-many-or-too-few/&quot; target=&quot;_blank&quot;&gt;Transaction Log VLFs - too many or too few?&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlskills.com/blogs/kimberly/ever-increasing-clustering-key-the-clustered-index-debate-again/&quot; target=&quot;_blank&quot;&gt;Ever-increasing clustering key - the Clustered Index Debate.... again!&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Brent Ozar (&lt;a href=&quot;http://www.brentozar.com/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/BrentO&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.brentozar.com/responder/triage-wait-stats-in-sql-server/&quot; target=&quot;_blank&quot;&gt;Triage Wait Stats in SQL Server&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.brentozar.com/archive/2013/08/what-is-the-cxpacket-wait-type-and-how-do-you-reduce-it&quot; target=&quot;_blank&quot;&gt;What is the CXPACKET Wait Type, and How Do You Reduce It?&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.brentozar.com/archive/2008/09/finding-your-san-bottlenecks-with-sqlio/&quot; target=&quot;_blank&quot;&gt;SQLIO Tutorial: How to Test Disk Performance&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.brentozar.com/archive/2008/03/sql-server-2005-setup-checklist-part-1-before-the-install/&quot; target=&quot;_blank&quot;&gt;SQL Server 2005/2008/2012/2014 Setup Checklist&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Joe Sack (&lt;a href=&quot;http://www.sqlskills.com/blogs/joe/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/josephsack&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/joesack/archive/2009/04/22/presentation-deck-for-performance-tuning-with-wait-statistics.aspx&quot; target=&quot;_blank&quot;&gt;Performance Tuning with Wait Stats&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thomas LaRock (&lt;a href=&quot;http://thomaslarock.com/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/SQLRockstar&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://thomaslarock.com/2012/05/are-you-using-the-right-sql-server-performance-metrics/&quot; target=&quot;_blank&quot;&gt;Are you Using the Right SQL Server Performance Metrics&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Kalen Delaney (&lt;a href=&quot;http://sqlblog.com/blogs/kalen_delaney/default.aspx&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/sqlqueen&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://sqlblog.com/blogs/kalen_delaney/archive/2008/10/29/reducing-cache-bloat-and-a-metadata-bug.aspx&quot; target=&quot;_blank&quot;&gt;Geek City:&amp;nbsp;Reducing Cache Bloat and a Metadata Bug&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Aaron Bertrand (&lt;a href=&quot;http://sqlblog.com/blogs/aaron_bertrand/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/AaronBertrand&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mssqltips.com/sqlservertip/2085/sql-server-ddl-triggers-to-track-all-database-changes/&quot; target=&quot;_blank&quot;&gt;SQL Server DDL Triggers to Track All Database Changes&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sqlblog.com/blogs/aaron_bertrand/archive/2010/10/26/useful-free-resources-for-sql-server.aspx&quot; target=&quot;_blank&quot;&gt;Useful, free resources for SQL Server&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://blogs.sqlsentry.com/aaronbertrand/bad-habits-nolock-everywhere/&quot;&gt;Bad habits : Putting NOLOCK everywhere&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;Robert Davis (&lt;a href=&quot;http://www.sqlsoldier.com/wp/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/SQLSoldier&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlsoldier.com/wp/sqlserver/schemaonlybackupsandrestores&quot; target=&quot;_blank&quot;&gt;Schema-only Backups and Restores&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;Paul White (&lt;a href=&quot;http://sqlblog.com/blogs/paul_white/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/SQL_Kiwi&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://sqlperformance.com/2013/08/t-sql-queries/parameter-sniffing-embedding-and-the-recompile-options&quot;&gt;Parameter Sniffing, Embedding, and the RECOMPILE Options&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sqlblog.com/blogs/paul_white/archive/2012/08/15/temporary-tables-in-stored-procedures.aspx&quot; target=&quot;_blank&quot;&gt;Temporary Tables in Stored Procedures&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sqlblog.com/blogs/paul_white/archive/2012/08/17/temporary-object-caching-explained.aspx&quot; target=&quot;_blank&quot;&gt;Temporary Table Caching Explained&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Allan Hirt (&lt;a href=&quot;http://www.sqlha.com/blog/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt; | &lt;a href=&quot;https://twitter.com/SQLHA&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.sqlha.com/2013/03/12/how-to-properly-configure-dtc-for-clustered-instances-of-sql-server-with-windows-server-2008-r2/&quot; target=&quot;_blank&quot;&gt;How to Properly Configure DTC for Clustered Instances of SQL Server&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jonathan Kehayias (&lt;a href=&quot;https://www.sqlskills.com/blogs/jonathan/&quot; target=&quot;_blank&quot;&gt;b&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;https://twitter.com/SQLPoolBoy&quot; target=&quot;_blank&quot;&gt;t&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.simple-talk.com/sql/database-administration/great-sql-server-debates-lock-pages-in-memory/&quot;&gt;Great SQL Server Debates: Lock Pages in Memory (LPiM)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.sqlskills.com/blogs/jonathan/extended-events-ring_buffer/&quot;&gt;Extended Events - Targets Week - ring_buffer&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;u&gt;&lt;b&gt;Other&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;div&gt;
&lt;a href=&quot;http://sqlserverbuilds.blogspot.com/&quot; target=&quot;_blank&quot;&gt;SQL Server Builds and Versions&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://social.technet.microsoft.com/wiki/contents/articles/13105.trace-flags-in-sql-server.aspx&quot; target=&quot;_blank&quot;&gt;Trace Flags in SQL Server&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc645723(v=sql.105).aspx&quot; target=&quot;_blank&quot;&gt;Monitoring Best Practices by Using Policy Based Management (PBM)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/sqlcat/archive/2013/09/05/sqlcat-com-consolidated-index-of-whitepapers.aspx&quot; target=&quot;_blank&quot;&gt;SQLCAT.com consolidated index of Whitepapers&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://are%20my%20actual%20worker%20threads%20exceeding%20the%20sp_configure%20%27max%20worker%20threads%27%20value/?&quot;&gt;Max Worker Threads and when you should change it&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://houseofbrick.com/troubleshooting-database-mail-for-sql-server/&quot; target=&quot;_blank&quot;&gt;Troubleshooting Databae Mail&lt;/a&gt;&amp;nbsp;&lt;b style=&quot;color: red;&quot;&gt;New add!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/4331466329836277169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/05/useful-sql-server-articles.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/4331466329836277169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/4331466329836277169'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/05/useful-sql-server-articles.html' title='Useful SQL Server Articles'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-2577684638113331711</id><published>2014-03-20T09:09:00.001-07:00</published><updated>2017-03-30T11:13:55.936-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLIO"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><title type='text'>Harvest and Report on SQL Server IO</title><content type='html'>I&#39;m a big advocate of automation, and as a result I often create processes and reports to help with such automation. &amp;nbsp;My most recent task was to create a process to &lt;i&gt;properly &lt;/i&gt;report on IO stall/wait stats. &amp;nbsp;A recent post of mine called &lt;a href=&quot;http://allen-mcguire.blogspot.com/2013/10/io-stats-putting-lipstick-on-pig.html&quot; target=&quot;_blank&quot;&gt;IO Stats - Putting Lipstick on the Pig&lt;/a&gt;&amp;nbsp;was a report I created to lay on top of statistics that derive from querying sys.fn_virtualfilestats. &amp;nbsp;At the end of the day, it&#39;s still a pig. &amp;nbsp;While various DBA&#39;s have shared queries that do computations on results from that function, it&#39;s &lt;i&gt;&lt;b&gt;very &lt;/b&gt;&lt;/i&gt;misleading because the data is cumulative. &amp;nbsp;That means the IO wait stats include all your maintenance activity: backups, index rebuild/reorgs, DBCC activity, etc. &amp;nbsp;Including all that activity can and will dramatically skew the data. &amp;nbsp;In fact the results I get for IO waits on one of my TempDB files is &amp;gt;200ms currently when in reality I rarely see values exceed 5ms on a per-hour basis.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I would like to share a better way of harvesting and reporting on your IO data. &amp;nbsp;Now, I personally have no problem putting these objects in the master database - adjust to suit your needs accordingly. &amp;nbsp;I will admit that a portion of this process was found online - if/when I find that author, I will credit them accordingly. &amp;nbsp;The summarizing and reporting portion is what I put together.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;First, you need to &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvERXVCT0l0V2RhMmM&quot; target=&quot;_blank&quot;&gt;create the tables&lt;/a&gt;&amp;nbsp;(all links go to my public GDrive folder)&lt;/li&gt;
&lt;li&gt;Next, create the &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEN25rNlhNNkJBMWc&quot; target=&quot;_blank&quot;&gt;stored procedure that will harvest the the snapshots&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;You will note that this procedure uses the compare process to store summarized data for reporting purposes&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Then, create the &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEbGYxdXJiVDRxUlk&quot; target=&quot;_blank&quot;&gt;stored procedure that will compare the snapshots&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Lastly, create a scheduled job. &amp;nbsp;My reports are based on hourly snapshots, so if you change the frequency you may have to adjust some things.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;exec master.dbo.sp_IOStatsSnapshot&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div&gt;
That&#39;s it! Your data will start to collect as soon as your job schedule kicks in. &amp;nbsp;The data won&#39;t really mean much until a couple days go by so you&#39;ll have plenty of time to get the reports in place.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The first report is an &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEVUJiRlRITGs2VzA&quot; target=&quot;_blank&quot;&gt;IO summary report&lt;/a&gt;&amp;nbsp;(Figure 1) that computes differentials based on the times you select. &amp;nbsp;So with this report you can get the IO wait stat summary for core hours, for example. &amp;nbsp;As is the case with all RDL I share, you need to change the data source information.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The second report is an &lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEUXFiSVI5U2YwZ1E&quot; target=&quot;_blank&quot;&gt;IO analysis report&lt;/a&gt;&amp;nbsp;(Figure 2) that shows the hourly data, highlighting metrics that are outside certain ranges. &amp;nbsp;I go with the standard recommendation that a read IO should take &amp;lt;20ms while a write should take &amp;lt;4ms. &amp;nbsp;The other values I chose for warning and critical were personal preferences and can be adjusted accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;*Recent updates to the second report (Figure 2):&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;You can now type in a list of instances and the file listing will automatically pull from that instance via a dynamic data source - this keeps from having one report per instance&lt;/li&gt;
&lt;li&gt;I changed the file listing to come from sys.master_files so it&#39;s always got just the current files and not those that may have moved drives and/or instances&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Figure 1&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjPIoqbLN8AWJTJJi1TsiDHQJarGxRu4ZBVEsRQDtdjFra-aj43IwMgU68-aGiKzX6h4Wx256vk8832dQ_zamgjssUXCrgJGRuacDj5W85C5RchMiTpWt5ygJcQLVnPQH25yBocilgnRze/s1600/IOStallSummary.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjPIoqbLN8AWJTJJi1TsiDHQJarGxRu4ZBVEsRQDtdjFra-aj43IwMgU68-aGiKzX6h4Wx256vk8832dQ_zamgjssUXCrgJGRuacDj5W85C5RchMiTpWt5ygJcQLVnPQH25yBocilgnRze/s1600/IOStallSummary.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Figure 2&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghd07y2-jKnj655mcBIrSHU8k-sNoLNsYuVbsEBIAVrdJLzgnMjNlhh_F_swz9R6WnVkHl77dlaJNafrzKGx9PHMrtesLwnlt6OlnX1Cto4GODPNZ3kZfRfkER8caXTVNpuo0GvgkbMxQc/s1600/blogger.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghd07y2-jKnj655mcBIrSHU8k-sNoLNsYuVbsEBIAVrdJLzgnMjNlhh_F_swz9R6WnVkHl77dlaJNafrzKGx9PHMrtesLwnlt6OlnX1Cto4GODPNZ3kZfRfkER8caXTVNpuo0GvgkbMxQc/s1600/blogger.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/2577684638113331711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/03/harvest-and-report-on-sql-server-io.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/2577684638113331711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/2577684638113331711'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/03/harvest-and-report-on-sql-server-io.html' title='Harvest and Report on SQL Server IO'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjPIoqbLN8AWJTJJi1TsiDHQJarGxRu4ZBVEsRQDtdjFra-aj43IwMgU68-aGiKzX6h4Wx256vk8832dQ_zamgjssUXCrgJGRuacDj5W85C5RchMiTpWt5ygJcQLVnPQH25yBocilgnRze/s72-c/IOStallSummary.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-3477781900697871367</id><published>2014-03-07T10:01:00.000-08:00</published><updated>2014-04-28T14:41:58.597-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><title type='text'>My SQL Server Installation Checklist</title><content type='html'>I figured since I was doing a fresh install of SQL Server 2012 Enterprise, I might as well document the installation process for future reference. &amp;nbsp;The items may not be in any particular order.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Install SQL Server!&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Create AD account to run services under, if necessary&lt;/li&gt;
&lt;li&gt;Create folder structure for data files, transaction logs, TempDB, backups, etc.&lt;/li&gt;
&lt;li&gt;Install any SP&#39;s and/or CU&#39;s&lt;/li&gt;
&lt;li&gt;Enable the DAC&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;Register the instance with the Central Management Server&lt;/li&gt;
&lt;li&gt;Instance Configuration&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Configure Min/Max Server Memory appropriately (Properties &amp;gt; Memory)&lt;/li&gt;
&lt;li&gt;Double-check the Data and Log locations (Properties &amp;gt; Database Settings)&lt;/li&gt;
&lt;li&gt;Configure baseline values for Cost Threshold for Parallelism (50) and MAXDOP (1/2 cores in single processor)&lt;/li&gt;
&lt;li&gt;Create Login for SQL Server service AD Group/Account(s)&lt;/li&gt;
&lt;li&gt;Change the number of SQL Server Logs to retain from 6 to 25&lt;/li&gt;
&lt;li&gt;Create job to cycle errors logs nightly at midnight (goes with #5, normally TSX)&lt;/li&gt;
&lt;li&gt;Create Operator(s) for DBA&lt;/li&gt;
&lt;li&gt;Enable Optimize for Ad-Hoc Workloads (in most cases)&lt;/li&gt;
&lt;li&gt;Configure Database Mail for sending alerts (if new,&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;Scripts&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;a href=&quot;http://ola.hallengren.com/downloads.html&quot; target=&quot;_blank&quot;&gt;Ola Hallengren&#39;s maintenance scripts&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Schedule user backups accordingly&lt;/li&gt;
&lt;li&gt;If using centralized administration for jobs, add to master jobs&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Install additional &lt;a href=&quot;http://www.brentozar.com/blitz/configure-sql-server-alerts/&quot; target=&quot;_blank&quot;&gt;SQL Server Agent alerts from Brent Ozar&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Be sure the operator is set up correctly prior - find/replace appropriately&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div&gt;
This is not complete, but I wanted to publish it for feedback and further input.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/3477781900697871367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/03/my-sql-server-installation-checklist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3477781900697871367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3477781900697871367'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/03/my-sql-server-installation-checklist.html' title='My SQL Server Installation Checklist'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-3021832711347691560</id><published>2014-03-05T10:05:00.000-08:00</published><updated>2018-04-24T14:45:13.552-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Replication"/><title type='text'>Changing the Default Installation Paths for SQL Server</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;There are often times where you need to move all the files and SQL Server objects from the default installation paths - the path where system databases were installed, default traces are stored, error logs reside, etc. &amp;nbsp;I found no single resource that addressed each and every item I needed to move, which led to this blogging opportunity. &amp;nbsp;I have to do this twice in the coming days (new SAN, new LUN&#39;s/drives) and this is part of the migration process to retire the old SAN.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;I prefer to keep the default folder structure in place, which means the following exist in a common folder: DATA, FTData, JOBS, Log and repldata.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #cc0000; font-family: inherit;&quot;&gt;&lt;b&gt;&lt;i&gt;Note: Some require editing of the registry. Proceed with great caution!&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Move the SQL Server Agent error log&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;USE&lt;/span&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;msdb&lt;/span&gt;&lt;br /&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;span style=&quot;color: blue;&quot;&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;msdb.dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;sp_set_sqlagent_properties&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;@errorlog_file&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;N&#39;&amp;lt;common folder path&amp;gt;\Log\SQLAGENT.OUT&#39;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;GO&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Move the SQL Server error log&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div&gt;
Note: moving the SQL Server error log also changes the location of the default traces.&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Open SQL Server Configuration Manager on the server/node&lt;/li&gt;
&lt;li&gt;Click SQL Server Services&lt;/li&gt;
&lt;li&gt;Right click on SQL Server service and click Properties&lt;/li&gt;
&lt;li&gt;Click the Advanced tab&amp;nbsp;(in SQL 2012/2014 click on the Startup Parameters tab)&lt;/li&gt;
&lt;li&gt;Change the path following the -e parameter&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-e&lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;&lt;span style=&quot;white-space: normal;&quot;&gt;common folder path&lt;/span&gt;&amp;gt;\Log\ERRORLOG&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; white-space: normal;&quot;&gt;In SQL 2012/2014, be sure to click the Update button or the changes will not stick!&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;If you are working on a cluster, be sure to make this adjustment on all nodes&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguxCi6OoHPnkkjm4OJWl-FhRKYmDmCL-n6HgTtZHulDooFcdBukoDxSS8i-_xTx38gw3xzF1B5KQWFFDPOueUW5UQ3ialVw5bPwpWc1bRjZQAyRfPpo3zECSo0wVDZk-5UowV0lNHCZKMA/s1600/SQL+Server+Error+Log.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguxCi6OoHPnkkjm4OJWl-FhRKYmDmCL-n6HgTtZHulDooFcdBukoDxSS8i-_xTx38gw3xzF1B5KQWFFDPOueUW5UQ3ialVw5bPwpWc1bRjZQAyRfPpo3zECSo0wVDZk-5UowV0lNHCZKMA/s1600/SQL+Server+Error+Log.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Change the Dump Directory Path&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div&gt;
SQL Server creates dump files (files with a .mdmp extention) by default under the log folder. &amp;nbsp;These dump files are generally created when SQL Server encounters an exception or access violation.&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Open SQL Server Configuration Manager on the server/node&lt;/li&gt;
&lt;li&gt;Click SQL Server Services&lt;/li&gt;
&lt;li&gt;Right click on SQL Server service and click Properties&lt;/li&gt;
&lt;li&gt;Click the Advanced tab&lt;/li&gt;
&lt;li&gt;Type in the new path&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;&lt;span style=&quot;white-space: normal;&quot;&gt;common folder path&lt;/span&gt;&amp;gt;\Log&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;If you are working on a cluster, be sure to make this adjustment on all nodes&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6OjqSc8iEbPFpu_lwwFm_Wca3bm39gRH4SZgAnNnlwb4n5a2y62UlZX8w_GBThxQLkmkPpAnI_IypmTRfW4_BvrOTYkmN7EVKWCx5MHQTB6wfkvKev-7bsHrefDRew_xV6SSOgfWnmwH/s1600/Dump+Directory.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6OjqSc8iEbPFpu_lwwFm_Wca3bm39gRH4SZgAnNnlwb4n5a2y62UlZX8w_GBThxQLkmkPpAnI_IypmTRfW4_BvrOTYkmN7EVKWCx5MHQTB6wfkvKev-7bsHrefDRew_xV6SSOgfWnmwH/s1600/Dump+Directory.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Change the Data Path&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Changing the data path requires editing a registry entry. &amp;nbsp;Note this is not the same path as the &quot;Database default locations &amp;gt; Data&quot; location found when reviewing the Properties of your instance.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Go to the server and open the registry (Start &amp;gt; Run, and type in &quot;regedit&quot;)&lt;/li&gt;
&lt;li&gt;Browse to HKLM\SOSFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup&lt;/li&gt;
&lt;li&gt;Change the value of &lt;b&gt;SQLDataRoot &lt;/b&gt;to the new location&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;&lt;span style=&quot;white-space: normal;&quot;&gt;common folder path&lt;/span&gt;&amp;gt;\DATA&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;If you are working on a cluster, be sure to make this adjustment on all nodes&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;h2 style=&quot;clear: both;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Change the SQL Agent Jobs Path&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Changing the SQL Agent jobs path requires editing a registry entry. &amp;nbsp;This path is used by various features under the hood.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Go to the server and open the registry (Start &amp;gt; Run, and type in &quot;regedit&quot;)&lt;/li&gt;
&lt;li&gt;Browse to HKLM\SOSFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\SQLServerAgent&lt;/li&gt;
&lt;li&gt;Change the value of &lt;b&gt;WorkingDirectory &lt;/b&gt;to the new location&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;common folder path&amp;gt;\JOBS&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;If you are working on a cluster, be sure to make this adjustment on all nodes&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;h2 style=&quot;clear: both;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Change the Full-text Default Path&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Changing the full-text default path requires editing a registry entry.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Go to the server and open the registry (Start &amp;gt; Run, and type in &quot;regedit&quot;)&lt;/li&gt;
&lt;li&gt;Browse to HKLM\SOSFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup&lt;/li&gt;
&lt;li&gt;Change the value of &lt;b&gt;FullTextDefaultPath &lt;/b&gt;to the new location&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;common folder path&amp;gt;\FTData&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;If you are working on a cluster, be sure to make this adjustment on all nodes&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Change the Default Snapshot Path for Replication&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div&gt;
Whether or not you are currently using replication, it&#39;s a good idea to make sure all resources are reconfigured accordingly. &amp;nbsp;I found the easy way to do this was by running the following script:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;USE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;distribution&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: maroon;&quot;&gt;sp_changedistpublisher&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #38761d;&quot;&gt;@publisher&lt;/span&gt; = &lt;span style=&quot;color: red;&quot;&gt;&#39;Database Instance&#39;&lt;/span&gt;,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt; @property&lt;/span&gt; = &lt;span style=&quot;color: red;&quot;&gt;&#39;working_directory&#39;&lt;/span&gt;,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt; @value&lt;/span&gt; = &lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;common folder path&amp;gt;\repldata&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-size: small; font-weight: normal;&quot;&gt;Note that you may have to edit existing publications:&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBb3rUYupVoAGMwZ0t2KaX2ULZQbFmFEk4ikdxoec9MSdjxwmu_6yo5qNks3rItXPZfKWcx8SzVTVnU5_vafDj52vJQz5-UqYe-qEJYfLQO0rerxWjdwGoEt3BDzy-Bb6GM9sSknpg7qFo/s1600/Replication.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBb3rUYupVoAGMwZ0t2KaX2ULZQbFmFEk4ikdxoec9MSdjxwmu_6yo5qNks3rItXPZfKWcx8SzVTVnU5_vafDj52vJQz5-UqYe-qEJYfLQO0rerxWjdwGoEt3BDzy-Bb6GM9sSknpg7qFo/s1600/Replication.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/h2&gt;
&lt;h2&gt;
&lt;u&gt;&lt;span style=&quot;color: #990000; font-size: small;&quot;&gt;Move msdb and model databases&lt;/span&gt;&lt;/u&gt;&lt;/h2&gt;
&lt;div&gt;
Run the following query to get the logical file names.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;USE master&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;DB_NAME&lt;/span&gt;(&lt;span style=&quot;color: #38761d;&quot;&gt;database_id&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;Database&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: #38761d;&quot;&gt;name&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&quot;Logical Name&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: #38761d;&quot;&gt;physical_name&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&quot;Physical Location&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: #38761d;&quot;&gt;state_desc&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;State&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;sys.master_files&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;database_id &lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt;IN &lt;/span&gt;( &lt;span style=&quot;color: magenta;&quot;&gt;DB_ID&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;N&#39;msdb&#39;&lt;/span&gt;),&lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;DB_ID&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;(&lt;span style=&quot;color: red;&quot;&gt;N&#39;model&#39;&lt;/span&gt;) )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;DB_NAME&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;database_id&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Plug in the logical file names and new paths do the data and log files, respectively. &amp;nbsp;It&#39;s likely you will only need to adjust the common folder paths - the logical file names are probably as shown below.&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;USE&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; white-space: normal;&quot;&gt;master&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; white-space: normal;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;

&lt;span style=&quot;color: blue;&quot;&gt;ALTER DATABASE&lt;/span&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;model&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;MODIFY FILE&lt;/span&gt; (&lt;span style=&quot;color: #38761d;&quot;&gt;NAME &lt;/span&gt;= &lt;span style=&quot;color: red;&quot;&gt;&#39;modeldev&#39;&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;FILENAME &lt;/span&gt;= &lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;common folder path&amp;gt;\DATA\model.mdf&#39;&lt;/span&gt;);
&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; white-space: normal;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;

&lt;span style=&quot;color: blue;&quot;&gt;ALTER DATABASE&lt;/span&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;model&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;MODIFY FILE&lt;/span&gt; (&lt;span style=&quot;color: #38761d;&quot;&gt;NAME &lt;/span&gt;= &lt;span style=&quot;color: red;&quot;&gt;&#39;modellog&#39;&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;FILENAME&lt;/span&gt; = &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;common folder path&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;DATA&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\modellog.ldf&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;);&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; white-space: normal;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;

&lt;span style=&quot;color: blue;&quot;&gt;ALTER DATABASE&lt;/span&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;msdb&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;MODIFY FILE&lt;/span&gt; (&lt;span style=&quot;color: #38761d;&quot;&gt;NAME &lt;/span&gt;= &lt;span style=&quot;color: red;&quot;&gt;&#39;MSDBData&#39;&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;FILENAME&lt;/span&gt; = &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;common folder path&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;DATA&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\MSDBData.mdf&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;);&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; white-space: normal;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;

&lt;span style=&quot;color: blue;&quot;&gt;ALTER DATABASE&lt;/span&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;msdb&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;MODIFY FILE&lt;/span&gt; (&lt;span style=&quot;color: #38761d;&quot;&gt;NAME &lt;/span&gt;= &lt;span style=&quot;color: red;&quot;&gt;&#39;MSDBLog&#39;&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;FILENAME&lt;/span&gt; = &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;lt;common folder path&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;DATA&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\MSDBLog.ldf&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;);&lt;/span&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; white-space: normal;&quot;&gt;GO&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;After running the above script, stop the instance of SQL Server and move the physical files to their new location. &amp;nbsp;Once moved, restart the instance. &amp;nbsp;You can run the first query again to verify they have moved as intended.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #990000; font-size: small; white-space: normal;&quot;&gt;&lt;u&gt;Move master database&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Open SQL Server Configuration Manager on the server/node&lt;/li&gt;
&lt;li&gt;Click SQL Server Services&lt;/li&gt;
&lt;li&gt;Right click on SQL Server service and click Properties&lt;/li&gt;
&lt;li&gt;Click the Advanced tab (in SQL 2012/2014 click on the Startup Parameters tab)&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5fKvIn0HPNQ7k35C-Q_gtjIaCVHL3hyphenhyphenodRfqyHBqbugO3MUKuLZNQEy8tAk2CZryOw5ozvtos7GLLuijhc5TKlXIu10RycUGPLFAwkapXz7_YaEbVMH_xM2WLO-y8C1Vwe56g4iFPnXHp/s1600/Master+Database.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5fKvIn0HPNQ7k35C-Q_gtjIaCVHL3hyphenhyphenodRfqyHBqbugO3MUKuLZNQEy8tAk2CZryOw5ozvtos7GLLuijhc5TKlXIu10RycUGPLFAwkapXz7_YaEbVMH_xM2WLO-y8C1Vwe56g4iFPnXHp/s1600/Master+Database.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Change the path following the -d parameter for the new data file location&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-d&lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;common folder path&amp;gt;\DATA\master.mdf&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;In SQL 2012/2014, be sure to click the Update button or the changes will not stick!&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Change the path following the -l parameter for the new log file location&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-l&lt;span style=&quot;color: red;&quot;&gt;&#39;&amp;lt;common folder path&amp;gt;\DATA&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\master.ldf&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; white-space: normal;&quot;&gt;In SQL 2012/2014, be sure to click the Update button or the changes will not stick!&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Stop the instance of SQL Server&lt;/li&gt;
&lt;li&gt;Move the physical files to their new location&lt;/li&gt;
&lt;li&gt;Restart the instance of SQL Server&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;i&gt;If you are working on a cluster, be sure to make this adjustment on all nodes&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div&gt;
Run the following query to verify they have moved as intended.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;USE master&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;DB_NAME&lt;/span&gt;(&lt;span style=&quot;color: #38761d;&quot;&gt;database_id&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;Database&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: #38761d;&quot;&gt;name&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;Logical Name&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: #38761d;&quot;&gt;physical_name&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;Physical Location&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: #38761d;&quot;&gt;state_desc&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;State&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;sys.master_files&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;database_id&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt;=&amp;nbsp;&lt;/span&gt;(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;DB_ID&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;N&#39;master&#39;&lt;/span&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;DB_NAME&lt;/span&gt;(&lt;span style=&quot;color: #38761d;&quot;&gt;database_id&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/3021832711347691560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/03/changing-common-drive-for-sql-server.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3021832711347691560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3021832711347691560'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/03/changing-common-drive-for-sql-server.html' title='Changing the Default Installation Paths for SQL Server'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguxCi6OoHPnkkjm4OJWl-FhRKYmDmCL-n6HgTtZHulDooFcdBukoDxSS8i-_xTx38gw3xzF1B5KQWFFDPOueUW5UQ3ialVw5bPwpWc1bRjZQAyRfPpo3zECSo0wVDZk-5UowV0lNHCZKMA/s72-c/SQL+Server+Error+Log.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-140476605442054067</id><published>2014-02-28T10:11:00.000-08:00</published><updated>2014-02-28T10:12:25.534-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>Custom SQL Server IO Report for Quest/Dell Spotlight</title><content type='html'>As was the case with my &lt;a href=&quot;http://allen-mcguire.blogspot.com/2014/02/custom-sql-server-cpu-report-for.html&quot; target=&quot;_blank&quot;&gt;CPU report&lt;/a&gt;, I wanted a better way to tap into my Spotlight data to investigate IO data. &amp;nbsp;I figured I would &lt;a href=&quot;https://googledrive.com/host/0B5D5Zt72TyvENm9PQ1BISTJZY2s/Custom-SQL-Server-IO-Report-for-Dell-Spotlight.rdl&quot; target=&quot;_blank&quot;&gt;share the RDL&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here is my initial version - I&#39;ll probably update it to highlight anomalies, but that may take a bit of time to determine and develop. &amp;nbsp;You may want to adjust the retention of such data within Spotlight itself - this report is based off the default retention. &amp;nbsp;It happens to be data from a data warehouse server that loads data at night - pretty interesting!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYbVBJeuXaNb7sW2EvZkOEocWpa5V0j2Abuk9mwexcUdXz51AMExt4kZ72c4oxvVjVuBRFhfNPpzG4gDBMMbQQn0zjozDnq5CV0kXLuLKAE_zV1YFdtE9x9OHFSH28o_YL6XzKTfGV5Hu4/s1600/IO.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYbVBJeuXaNb7sW2EvZkOEocWpa5V0j2Abuk9mwexcUdXz51AMExt4kZ72c4oxvVjVuBRFhfNPpzG4gDBMMbQQn0zjozDnq5CV0kXLuLKAE_zV1YFdtE9x9OHFSH28o_YL6XzKTfGV5Hu4/s1600/IO.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/140476605442054067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/02/custom-sql-server-io-report-for.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/140476605442054067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/140476605442054067'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/02/custom-sql-server-io-report-for.html' title='Custom SQL Server IO Report for Quest/Dell Spotlight'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYbVBJeuXaNb7sW2EvZkOEocWpa5V0j2Abuk9mwexcUdXz51AMExt4kZ72c4oxvVjVuBRFhfNPpzG4gDBMMbQQn0zjozDnq5CV0kXLuLKAE_zV1YFdtE9x9OHFSH28o_YL6XzKTfGV5Hu4/s72-c/IO.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-3304032027223120583</id><published>2014-02-27T10:36:00.001-08:00</published><updated>2019-04-30T03:18:40.735-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ola Hallengren"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>RDL for Ola&#39;s Index Maintenance Logging</title><content type='html'>&lt;a href=&quot;https://drive.google.com/open?id=0B5D5Zt72TyvEaGs2Q2lrbHZ2bk0&quot; target=&quot;_blank&quot;&gt;Here is the RDL&lt;/a&gt; for this report - I moved it to Google Drive.</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/3304032027223120583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/02/rdl-for-olas-index-maintenance-logging.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3304032027223120583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/3304032027223120583'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/02/rdl-for-olas-index-maintenance-logging.html' title='RDL for Ola&#39;s Index Maintenance Logging'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-8064517064962030149</id><published>2014-02-19T09:31:00.003-08:00</published><updated>2014-02-19T09:40:46.079-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><title type='text'>Custom SQL Server CPU Report for Quest/Dell Spotlight</title><content type='html'>I often share some of the custom SSRS reports I&#39;ve created and this one seemed like a pretty good candidate. &amp;nbsp;It&#39;s a custom CPU report by hour that is driven from data collected by Quest/Dell Spotlight for SQL Server. &amp;nbsp;While Spotlight does have an SSRS Reports Pack, I don&#39;t find them particularly useful.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The first thing you need to do to make this report useful is to change the frequency in which the data is harvested and extend the retention. &amp;nbsp;Since the report has hourly intervals, I decided to store the data every 15 minutes so I can get a descent sample to then average for each hour, respectively.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEyDRLR3BOYiraQMMtrtHwjxYNUUgjPvwHyKEbkxYm3LC5e2BtfK_jjR0E4oEDEpO5PghZov0-CZBDEH_btJN47HiNFrn1iZsxUy-G07Ut6IDvwwa2AbzddEmTZDf_GKeJJcc8GF_bsVfM/s1600/Settings.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEyDRLR3BOYiraQMMtrtHwjxYNUUgjPvwHyKEbkxYm3LC5e2BtfK_jjR0E4oEDEpO5PghZov0-CZBDEH_btJN47HiNFrn1iZsxUy-G07Ut6IDvwwa2AbzddEmTZDf_GKeJJcc8GF_bsVfM/s1600/Settings.JPG&quot; height=&quot;268&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now you just have to create the SSRS report and update the data sources in the report. &amp;nbsp;You can get the RDL &lt;a href=&quot;https://googledrive.com/host/0B5D5Zt72TyvENm9PQ1BISTJZY2s/Custom-SQL-Server-CPU-Report-for-Dell-Spotlight.rdl&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. &amp;nbsp;This is what the report will look like once you get the plumbing all hooked up - note I&#39;m only displaying Monday through Friday because I&#39;ve found that my servers are pretty quiet on the weekends.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxwg6emfzzFq2FmY2481RAMBe17qYacsPPH47e_gRbziIst2wxd4aQz-Gx93hkyALv8d9f7Qqc_hMizOooF7Gcjypl5x39s2mwHPe2y_FLhKfb5jextnXPWZNpRZHqw2YbDcWVIscZmgjo/s1600/Report.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxwg6emfzzFq2FmY2481RAMBe17qYacsPPH47e_gRbziIst2wxd4aQz-Gx93hkyALv8d9f7Qqc_hMizOooF7Gcjypl5x39s2mwHPe2y_FLhKfb5jextnXPWZNpRZHqw2YbDcWVIscZmgjo/s1600/Report.JPG&quot; height=&quot;286&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/8064517064962030149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/02/custom-sql-server-cpu-report-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8064517064962030149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/8064517064962030149'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/02/custom-sql-server-cpu-report-for.html' title='Custom SQL Server CPU Report for Quest/Dell Spotlight'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEyDRLR3BOYiraQMMtrtHwjxYNUUgjPvwHyKEbkxYm3LC5e2BtfK_jjR0E4oEDEpO5PghZov0-CZBDEH_btJN47HiNFrn1iZsxUy-G07Ut6IDvwwa2AbzddEmTZDf_GKeJJcc8GF_bsVfM/s72-c/Settings.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-1275972891068977975</id><published>2014-01-14T14:24:00.003-08:00</published><updated>2014-07-18T07:21:15.184-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IIS"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>Using SQL Server to Report on your IIS Log Data</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I shared this post on a SQL Tuesday but am going to modify it a bit so folks better understand what it&#39;s all about. &amp;nbsp;In this post I&#39;m going to share how you can set up a very cost effective process to report on your IIS log data.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;Where are your IIS logs?&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
The first thing you need to do is locate the correct log directory for the website you are interested in. &amp;nbsp;If you open IIS and click on the Sites, you will see associated ID for that site. &amp;nbsp;Remember that, then in Windows Explorer browse to&amp;nbsp;C:\inetpub\logs\LogFiles\W3SVC&amp;lt;ID&amp;gt;. &amp;nbsp;So if the ID of your website is 2, you would find your logs in the W3SVC2 folder (I will use this as the example going forward).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Copy the logs&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
The next thing I did was to create a batch file and place it in the same folder as the logs. &amp;nbsp;You don&#39;t have to do it this way, but I chose to. &amp;nbsp;There will be a single line in this batch file:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
robocopy C:\inetpub\logs\LogFiles\W3SVC2\ \\DB_SERVER\SHARE\IISLogs\ /maxage:1&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I used Windows Scheduler to kick off this batch file every 10 minutes, and since we roll our logs over nightly this will get the current and previous days (maxage:1 means one day). &amp;nbsp;The reason for the frequency may vary depending on how accurate you want your data. &amp;nbsp;If our websites have an issue, I prefer to have pretty current data to dive into versus having to open the log itself.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Create the database&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Now you&#39;ll want to set up your IISLogs database - the schema for the table is as follows:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE&lt;/span&gt; [dbo].[LogData](&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[LogFilename] [varchar](255) NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[RowNumber] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[date] [datetime] NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[time] [datetime] NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[sIp] [varchar](255) NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[csMethod] [varchar](255) NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[csUriStem] [varchar](255) NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[csUriQuery] [varchar](255) NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[sPort] [int] NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[csUsername] [varchar](255) NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[cIp] [varchar](255) NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[csUserAgent] [varchar](255) NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[scStatus] [int] NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[scSubstatus] [int] NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[scWin32Status] [int] NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[timeTaken] [int] NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;CONSTRAINT &lt;/span&gt;[PK_LogData] &lt;span style=&quot;color: blue;&quot;&gt;PRIMARY KEY CLUSTERED&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[LogFilename] &lt;span style=&quot;color: blue;&quot;&gt;ASC&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[RowNumber] &lt;span style=&quot;color: blue;&quot;&gt;ASC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE&lt;/span&gt; [dbo].[IISDashboard](&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[LogFilename] [varchar](255) NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[LogDate] [date] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[Server] [varchar](10) NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[Records] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[CallsAbandoned] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[CallsAnswered] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[ID30Plus] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[ID10Plus] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[ID2Minus] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[ID200Errors] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[ID500Errors] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[GoogleBotHits] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[GoogleBotLoadTime] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[BingBotHits] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[BingBotLoadTime] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MSNBotHits] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MSNBotLoadTime] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[BotHits] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[BotLoadTime] [int] NOT NULL,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;CONSTRAINT &lt;/span&gt;[PK_IISDashboard] &lt;span style=&quot;color: blue;&quot;&gt;PRIMARY KEY CLUSTERED&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[LogFilename] &lt;span style=&quot;color: blue;&quot;&gt;ASC&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[LogDate] &lt;span style=&quot;color: blue;&quot;&gt;ASC&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[Server] &lt;span style=&quot;color: blue;&quot;&gt;ASC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Import the logs&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Now that the logs are over on the database server, it&#39;s time to import them. &amp;nbsp;I use &lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=24659&quot; target=&quot;_blank&quot;&gt;logparser from Microsoft&lt;/a&gt; to do this. &amp;nbsp;You&#39;ll want to create a SQL Server Agent job and run it every 10 minutes or so, making sure you don&#39;t bump heads with the copy job from the IIS server. &amp;nbsp;Stagger them accordingly. &amp;nbsp;You&#39;ll note the script dynamically creates the file name for me - the rest is pretty straight forward. &amp;nbsp;Yes, I have xp_cmdshell enabled - if you don&#39;t allow the use of xp_cmdshell, you may have to cook up an alternative way to import the data. &amp;nbsp;You&#39;ll also note I clear out the current day and reload it all - that&#39;s much easier than trying to figure out what&#39;s already been imported from a text file and what has not. &amp;nbsp;Shortly after midnight I reload the entire previous day (the reason I copy two logs each time) - that ensures I have the entire day of data loaded for that log file.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@TodaysDate &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;(6)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;,@LogFileName&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(100)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;,@LogParserCommand&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(1000)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;,@FileCheckCommand&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(1000)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;,@FileCheck &lt;span style=&quot;color: blue;&quot;&gt;TINYINT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;&lt;/span&gt;@TodaysDate = &lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(VARCHAR(6),&lt;span style=&quot;color: magenta;&quot;&gt;GETDATE&lt;/span&gt;(),12)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;@LogFileName = &lt;span style=&quot;color: red;&quot;&gt;&#39;I:\PathTo\IISLogs\u_ex&#39;&lt;/span&gt; + @TodaysDate +&lt;span style=&quot;color: red;&quot;&gt; &#39;.log&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DELETE &amp;nbsp;FROM&lt;/span&gt; IISLogs.dbo.LogData&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;LogFilename = @LogFileName&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@FileCheckCommand = &lt;span style=&quot;color: red;&quot;&gt;&#39;DIR &quot;&#39;&lt;/span&gt; + @LogFileName + &lt;span style=&quot;color: red;&quot;&gt;&#39;&quot; /B&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC &lt;/span&gt;@FileCheck = master.dbo.xp_cmdshell @FileCheckCommand,NO_OUTPUT&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;IF&lt;/span&gt; @FileCheck = 1&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;PRINT &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;File does not exist.&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; BEGIN&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRINT&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Importing &#39; &lt;/span&gt;+ @LogFileName&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SET&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;@LogParserCommand = &lt;span style=&quot;color: red;&quot;&gt;&#39;C:\&quot;Program Files (x86)&quot;\&quot;Log Parser 2.2&quot;\LogParser &quot;SELECT * INTO LogData FROM &#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + @LogFileName&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + &lt;span style=&quot;color: red;&quot;&gt;&#39;&quot; -i:W3C -o:SQL -server:DB_SERVER\INSTANCE -database:IISLogs -driver:&quot;SQL Server&quot; -username:&amp;lt;username&amp;gt; -password:&amp;lt;password&amp;gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;EXEC master&lt;/span&gt;..xp_cmdshell @LogParserCommand&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; END&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-size: x-small;&quot;&gt;-- CLEANUP&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXEC master&lt;/span&gt;.dbo.xp_cmdshell &lt;span style=&quot;color: red;&quot;&gt;&#39;del I:\PathTo\IISLogs\*.* /F /Q&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Report on the data&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Well, the hard part is over. &amp;nbsp;The data is in SQL Server, and now the fun begins - doing something with it. &amp;nbsp;Personally I set up an SSRS report that I receive and review each morning. &amp;nbsp;It takes me a few seconds to identify if there are any performance issues that require investigation. &amp;nbsp;The primary report is below, as is the query. &amp;nbsp;I actually roll up the data each iteration of the scheduled job so the dashboard is quick (versus plowing through tons of data each refresh). &amp;nbsp;You&#39;ll note I have two web servers (whited out under Page Hits) load balanced, but this process is very repeatable regardless of how many servers you have. &amp;nbsp;I also make some pieces of data appear to be hyperlinks, but it&#39;s really just &lt;span style=&quot;color: blue;&quot;&gt;blue font&lt;/span&gt; and &lt;u&gt;underlined&lt;/u&gt;&amp;nbsp;so people know they can further dive into the data. &amp;nbsp;The call data in the report comes from our I3 phone system - I have removed those from the query to avoid confusion. &amp;nbsp;If you wish to have a copy of the RDL, feel free to contact me.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3fD_pG7THAHpLYCs9c1iX6Wk61Gjtw-7urPtM9k61KWJ7s0Atc1MHPpK0PybJDlGRB1KZBYZMsKYjDZVT7eKB1807m-xUdE7rbrS_Il6EaRZ68rhvuq3TRPm0ytuaSxOGlTbbkCalkO2v/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3fD_pG7THAHpLYCs9c1iX6Wk61Gjtw-7urPtM9k61KWJ7s0Atc1MHPpK0PybJDlGRB1KZBYZMsKYjDZVT7eKB1807m-xUdE7rbrS_Il6EaRZ68rhvuq3TRPm0ytuaSxOGlTbbkCalkO2v/s640/Capture.PNG&quot; height=&quot;89&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DECLARE &lt;/span&gt;@Today &lt;span style=&quot;color: blue;&quot;&gt;DATE &lt;/span&gt;= &lt;span style=&quot;color: magenta;&quot;&gt;GETDATE()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DELETE &amp;nbsp;FROM&lt;/span&gt; IISLogs.dbo.IISDashboard&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;LogDate = @Today&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;INSERT &amp;nbsp;INTO&lt;/span&gt; IISLogs.dbo.IISDashboard&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LogFilename&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,LogDate&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,Server&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,Records&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,CallsAbandoned&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,CallsAnswered&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,ID30Plus&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,ID10Plus&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,ID2Minus&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,ID200Errors&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,ID500Errors&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,GoogleBotHits&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,GoogleBotLoadTime&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,BingBotHits&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,BingBotLoadTime&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,MSNBotHits&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,MSNBotLoadTime&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,BotHits&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,BotLoadTime&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;&lt;/span&gt;LEFT(LogFilename,16) &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;LogFileName&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;DATE&lt;/span&gt;,&lt;span style=&quot;color: magenta;&quot;&gt;DATEADD&lt;/span&gt;(hh,&lt;span style=&quot;color: magenta;&quot;&gt;DATEDIFF&lt;/span&gt;(hh,&lt;span style=&quot;color: magenta;&quot;&gt;GETUTCDATE&lt;/span&gt;(),&lt;span style=&quot;color: magenta;&quot;&gt;GETDATE&lt;/span&gt;()),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[Date] + &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;TIME&lt;/span&gt;,[Time]) &lt;span style=&quot;color: blue;&quot;&gt;AS DATETIME&lt;/span&gt;))) AS &lt;span style=&quot;color: red;&quot;&gt;&#39;LogDate&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(LogFilename,&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;SERVER_PREFIX&#39;&lt;/span&gt;,LogFilename),9) AS&lt;span style=&quot;color: red;&quot;&gt; &#39;Server&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: magenta;&quot;&gt;COUNT&lt;/span&gt;(*) AS &lt;span style=&quot;color: red;&quot;&gt;&#39;Records&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: magenta;&quot;&gt;SUM&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;CASE WHEN&lt;/span&gt; timeTaken &amp;gt; 30000 &lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ELSE &lt;/span&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&#39;30Plus&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;CASE WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;timeTaken &amp;gt; 10000&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;10Plus&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;CASE WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;timeTaken &amp;lt; 2000&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;2Minus&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE scStatus&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;200&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;200Errors&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE scStatus&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;500&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;500Errors&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%googlebot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;GoogleBotHits&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: magenta;&quot;&gt;AVG&lt;/span&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%googlebot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;timeTaken&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;GoogleBotLoadTime&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%bingbot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;BingBotHits&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;AVG&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%bingbot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;timeTaken&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;BingBotLoadTime&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%msnbot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;MSNBotHits&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;AVG&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%msnbot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;timeTaken&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;MSNBotLoadTime&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%bot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;BotHits&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;AVG&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(CASE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;csUserAgent LIKE &#39;%bot%&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;THEN&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;timeTaken&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;ELSE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&#39;BotLoadTime&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;IISLogs.dbo.LogData&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;DATE&lt;/span&gt;,&lt;span style=&quot;color: magenta;&quot;&gt;DATEADD&lt;/span&gt;(hh,&lt;span style=&quot;color: magenta;&quot;&gt;DATEDIFF&lt;/span&gt;(hh,&lt;span style=&quot;color: magenta;&quot;&gt;GETUTCDATE&lt;/span&gt;(),&lt;span style=&quot;color: magenta;&quot;&gt;GETDATE&lt;/span&gt;()),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[Date] + &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;TIME&lt;/span&gt;,[Time]) &lt;span style=&quot;color: blue;&quot;&gt;AS DATETIME&lt;/span&gt;))) = @Today&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND csUriStem LIKE &lt;span style=&quot;color: red;&quot;&gt;&#39;%.aspx%&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND &lt;span style=&quot;color: magenta;&quot;&gt;DATEPART&lt;/span&gt;(dw,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;CONVERT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DATE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;DATEADD&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(hh,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;DATEDIFF&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(hh,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;GETUTCDATE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;GETDATE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;()),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Date] +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;CAST&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;CONVERT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;TIME&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;,[Time])&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;AS DATETIME&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;)))) BETWEEN 2&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;AND 6&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;GROUP BY &lt;/span&gt;LEFT(LogFilename,16)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;CONVERT&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;DATE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;DATEADD&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(hh,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;DATEDIFF&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(hh,&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;GETUTCDATE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;(),&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;GETDATE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;()),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[Date] + &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CONVERT&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;TIME&lt;/span&gt;,[Time]) &lt;span style=&quot;color: blue;&quot;&gt;AS DATETIME&lt;/span&gt;)))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,&lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(LogFilename,&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;SERVER_PREFIX&#39;&lt;/span&gt;,LogFilename),9)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/1275972891068977975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/using-automation-to-help-others-save.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/1275972891068977975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/1275972891068977975'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/using-automation-to-help-others-save.html' title='Using SQL Server to Report on your IIS Log Data'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3fD_pG7THAHpLYCs9c1iX6Wk61Gjtw-7urPtM9k61KWJ7s0Atc1MHPpK0PybJDlGRB1KZBYZMsKYjDZVT7eKB1807m-xUdE7rbrS_Il6EaRZ68rhvuq3TRPm0ytuaSxOGlTbbkCalkO2v/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-6196410173928336511</id><published>2014-01-14T11:57:00.000-08:00</published><updated>2015-09-23T09:34:15.238-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>Detailed Statistics for SSRS Reports</title><content type='html'>I&#39;ve had this report for years but until today never really had a conversation about the statistical value you can find in the Reporting Services database. &amp;nbsp;When a user contacts &amp;nbsp;you and claims that a report is &quot;slow&quot;, where do you start? &amp;nbsp;Do you fire up a profiler trace and ask them to run it again? &amp;nbsp;Do you open the report and examine the query&#39;s execution plan for optimization opportunities? &amp;nbsp;Perhaps you weren&#39;t aware, but there is some really good statistical information in the Reporting Services database. &amp;nbsp;I put together the following report to assist me with my SSRS tuning investigation and efforts. &amp;nbsp;You can get the RDL for the report &lt;a href=&quot;https://drive.google.com/file/d/0B5D5Zt72TyvEZmR1M0NJTGVXdHc/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
(Note #1: I pulled the margins in to hide some account and report path information - better to be safe than sorry!)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXSnvUpHdlZ8MtrSGwDm5JLXYC9yR5QAfHgLRSfXDwceZU1lTxybDQSjz_dQnUGHplbC3MpBD59nKCMYh64hwQvaGr1eEKUlXTHRdIkOADuSqDnm0-jj9Y_SBLOCyFTsLSCCJTlZm5iHX/s1600/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXSnvUpHdlZ8MtrSGwDm5JLXYC9yR5QAfHgLRSfXDwceZU1lTxybDQSjz_dQnUGHplbC3MpBD59nKCMYh64hwQvaGr1eEKUlXTHRdIkOADuSqDnm0-jj9Y_SBLOCyFTsLSCCJTlZm5iHX/s640/Capture.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The query/dataset to populate the report:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT TOP&lt;/span&gt; 1000&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UserName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,Name&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,Path&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,[Status]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,Format&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,TimeStart&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,TimeEnd&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,ByteCount&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,ByteCount / 1024 &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; KB&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,ByteCount / 1024 / 1024 &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; MB&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,[RowCount]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,TimeDataRetrieval&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,TimeProcessing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,TimeRendering&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,[Parameters]&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;[ReportServer$SQL01].dbo.ExecutionLog AS ex&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,[ReportServer$SQL01].dbo.Catalog AS cat&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;ex.ReportID = cat.ItemID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND Name NOT LIKE &lt;span style=&quot;color: red;&quot;&gt;&#39;_My Reports%&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND ( UserName = @UserName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OR @UserName = &lt;span style=&quot;color: red;&quot;&gt;&#39;--- ALL USERS ---&#39;&lt;/span&gt; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND [Status] IN (@ReportStatus)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND ( [Name] = @ReportName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OR @ReportName = &lt;span style=&quot;color: red;&quot;&gt;&#39;--- ALL REPORTS ---&#39;&lt;/span&gt; )&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; TimeStart &lt;span style=&quot;color: blue;&quot;&gt;DESC&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/6196410173928336511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/detailed-statistics-for-ssrs-reports.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/6196410173928336511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/6196410173928336511'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/detailed-statistics-for-ssrs-reports.html' title='Detailed Statistics for SSRS Reports'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXSnvUpHdlZ8MtrSGwDm5JLXYC9yR5QAfHgLRSfXDwceZU1lTxybDQSjz_dQnUGHplbC3MpBD59nKCMYh64hwQvaGr1eEKUlXTHRdIkOADuSqDnm0-jj9Y_SBLOCyFTsLSCCJTlZm5iHX/s72-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-6130794150956721652</id><published>2014-01-14T10:45:00.001-08:00</published><updated>2014-10-29T07:23:16.084-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>SSRS Subscriptions and their SQL Server Agent job names</title><content type='html'>For those that run SQL Server Reporting Services and have a high volume of report subscriptions, you probably know the pain of trying to figure out which jobs in SQL Server Agent kick off which subscriptions in Reporting Services. &amp;nbsp;This is a query that you can put into a report of its own so you can pull it up and reference in the event you want to kick off a job (and subscription) manually:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;&lt;/span&gt;Schedule.ScheduleID &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; JobName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,[Catalog].Name&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;ReportName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,Subscriptions.Description&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;Recipients&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,[Catalog].Path&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;ReportPath&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,StartDate&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,Schedule.LastRunTime&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;[ReportServer$SQL01].dbo.ReportSchedule&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN [ReportServer$SQL01].dbo.Schedule &lt;span style=&quot;color: blue;&quot;&gt;ON &lt;/span&gt;ReportSchedule.ScheduleID = Schedule.ScheduleID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN [ReportServer$SQL01].dbo.Subscriptions&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ON&amp;nbsp;&lt;/span&gt;ReportSchedule.SubscriptionID =&amp;nbsp;Subscriptions.SubscriptionID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN [ReportServer$SQL01].dbo.[Catalog]&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ON&amp;nbsp;&lt;/span&gt;ReportSchedule.ReportID = [Catalog].ItemID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND Subscriptions.Report_OID = [Catalog].ItemID</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/6130794150956721652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/ssrs-subscriptions-and-their-sql-server.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/6130794150956721652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/6130794150956721652'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/ssrs-subscriptions-and-their-sql-server.html' title='SSRS Subscriptions and their SQL Server Agent job names'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5349971599411036250.post-1185653145667613682</id><published>2014-01-10T14:27:00.000-08:00</published><updated>2014-02-19T09:40:02.595-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Performance"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLIO"/><category scheme="http://www.blogger.com/atom/ns#" term="SSRS"/><category scheme="http://www.blogger.com/atom/ns#" term="tSQL"/><title type='text'>Importing SQLIO Data</title><content type='html'>In a previous post I shared with you how you might use an SSRS report to &lt;a href=&quot;http://allen-mcguire.blogspot.com/2013/01/sqlio-analyze-results-with-ssrs.html&quot; target=&quot;_blank&quot;&gt;analyze your SQLIO results&lt;/a&gt;. &amp;nbsp;What I didn&#39;t share was how you might get that data into SQL Server to begin with, so I will share how I go about that.&lt;br /&gt;
&lt;br /&gt;
[Update: You can get the RDL &lt;a href=&quot;https://googledrive.com/host/0B5D5Zt72TyvENm9PQ1BISTJZY2s/SQLIO-Report.rdl&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
The first thing you&#39;ll want to do is set up your SQLIO database, along with the related objects that you will need to import the results from the text file(s). &amp;nbsp;I have provided the necessary scripts below. &amp;nbsp;Upon creating those objects, there are a series of simple scripts you have to run to import the data. &amp;nbsp;Note: I did not write these scripts myself, but I did alter them a bit to include some information I felt necessary to do proper analysis:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;USE &lt;/span&gt;SQLIO&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #ffe599; color: #274e13;&quot;&gt;--STEP 1: import the data by changing to the appropriate txt file below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;TRUNCATE TABLE&lt;/span&gt; dbo.SQLIO_Import_Step1 ;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;BULK INSERT&lt;/span&gt; dbo.SQLIO_Import_Step1&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;C:\Program Files (x86)\SQLIO\SQLIO_Results\results-timestamp.txt&#39;&lt;/span&gt; ;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;TRUNCATE TABLE&lt;/span&gt; dbo.SQLIO_Import ;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;INSERT &amp;nbsp;INTO&lt;/span&gt; dbo.SQLIO_Import&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( ResultText )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;ISNULL&lt;/span&gt;(ResultText, &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&lt;/span&gt;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.SQLIO_Import_Step1 ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;background-color: #ffe599;&quot;&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;--STEP 2: ETL the data into the live table for reporting purposes. &lt;/span&gt;&amp;nbsp; &lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;EXECUTE &lt;/span&gt;[dbo].[USP_Import_SQLIO_TestPass] &lt;span style=&quot;color: red;&quot;&gt;&#39;[DATABASE INSTANCE]&#39;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;&#39;D:&#39;&lt;/span&gt;, 2, 15000, &lt;span style=&quot;color: red;&quot;&gt;&#39;RAID 10&#39;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;&#39;2014/1/10&#39;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;&#39;EMC CX3 Model 20&#39;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&lt;/span&gt;, 64, &lt;span style=&quot;color: red;&quot;&gt;&#39;NTFS&#39;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;&#39;65536&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #ffe599; color: #274e13;&quot;&gt;Tables needed:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE&lt;/span&gt; [dbo].[SQLIO_Import]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[RowID] [int] &lt;span style=&quot;color: blue;&quot;&gt;IDENTITY&lt;/span&gt;(1,1) &lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[ParameterRowID] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[ResultText] [varchar](&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,&lt;span style=&quot;color: blue;&quot;&gt;CONSTRAINT &lt;/span&gt;[PK_SQLIO_Import] &lt;span style=&quot;color: blue;&quot;&gt;PRIMARY KEY CLUSTERED&lt;/span&gt; ( [RowID] &lt;span style=&quot;color: blue;&quot;&gt;ASC &lt;/span&gt;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE&lt;/span&gt; [dbo].[SQLIO_Import_Step1](&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[ResultText] [varchar](&lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE&lt;/span&gt; [dbo].[SQLIO_TestPass]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;[TestPassID] [int] &lt;span style=&quot;color: blue;&quot;&gt;IDENTITY&lt;/span&gt;(1,1)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[ServerName] [nvarchar](50)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[LogicalDrive] [varchar](10)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[DriveQty] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[DriveRPM] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[DriveRaidLevel] [nvarchar](10)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[TestDate] [datetime]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[SANmodel] [nvarchar](50)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NOT NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[SANfirmware] [nvarchar](50)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[PartitionOffset] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[Filesystem] [nvarchar](50)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[FSClusterSizeBytes] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[SQLIO_Version] [nvarchar](20)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[Threads] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[ReadOrWrite] [nchar](1)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[DurationSeconds] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[SectorSizeKB] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[IOpattern] [nvarchar](50)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[IOsOutstanding] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[Buffering] [nvarchar](50)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[FileSizeMB] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[IOs_Sec] [decimal](18,0)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[MBs_Sec] [decimal](18,0)&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[LatencyMS_Min] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[LatencyMS_Avg] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,[LatencyMS_Max] [int]&amp;nbsp;&lt;span style=&quot;color: #666666;&quot;&gt;NULL&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ,&lt;span style=&quot;color: blue;&quot;&gt;CONSTRAINT &lt;/span&gt;[PK_SQLIO_TestPass] &lt;span style=&quot;color: blue;&quot;&gt;PRIMARY KEY CLUSTERED&lt;/span&gt; ( [TestPassID] &lt;span style=&quot;color: blue;&quot;&gt;ASC &lt;/span&gt;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #ffe599; color: #38761d;&quot;&gt;Stored Procedure:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;CREATE PROCEDURE&lt;/span&gt; [dbo].[USP_Import_SQLIO_TestPass]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @ServerName &lt;span style=&quot;color: blue;&quot;&gt;NVARCHAR&lt;/span&gt;(50)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@LogicalDrive &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;(10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@DriveQty &lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@DriveRPM &lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@DriveRaidLevel &lt;span style=&quot;color: blue;&quot;&gt;NVARCHAR&lt;/span&gt;(10)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@TestDate &lt;span style=&quot;color: blue;&quot;&gt;DATETIME&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@SANmodel &lt;span style=&quot;color: blue;&quot;&gt;NVARCHAR&lt;/span&gt;(50)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@SANfirmware&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;NVARCHAR&lt;/span&gt;(50)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@PartitionOffset&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@Filesystem&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;NVARCHAR&lt;/span&gt;(50)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;,@FSClusterSizeBytes&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; SET nocount OFF&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;@TestDate IS NULL&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;@TestDate = &lt;span style=&quot;color: magenta;&quot;&gt;GETDATE&lt;/span&gt;()&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; /* Add a blank record to the end so the last test result is captured */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INSERT &amp;nbsp;INTO&lt;/span&gt; dbo.SQLIO_Import&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( ParameterRowID,ResultText )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;VALUES &amp;nbsp;&lt;/span&gt;( 0,&lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&lt;/span&gt; );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; /* Update the ParameterRowID field for easier querying */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: magenta;&quot;&gt;UPDATE &amp;nbsp;&lt;/span&gt;dbo.sqlio_import&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SET &amp;nbsp; &amp;nbsp; &lt;/span&gt;parameterrowid = ( &lt;span style=&quot;color: blue;&quot;&gt;SELECT TOP&lt;/span&gt; 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &lt;/span&gt;dbo.sqlio_import parm&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&lt;/span&gt;parm.resulttext LIKE &lt;span style=&quot;color: red;&quot;&gt;&#39;%\%&#39;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND parm.rowid &amp;lt;= upd.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; rowid DESC&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import upd&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; /* Add new SQLIO_TestPass records from SQLIO_Import */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INSERT &amp;nbsp;INTO&lt;/span&gt; dbo.sqlio_testpass&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (servername&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,logicaldrive&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,driveqty&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,driverpm&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,driveraidlevel&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,testdate&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,sanmodel&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,sanfirmware&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,partitionoffset&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,filesystem&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,fsclustersizebytes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,sqlio_version&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,threads&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,readorwrite&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,durationseconds&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,sectorsizekb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,iopattern&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,iosoutstanding&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,buffering&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,filesizemb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,ios_sec&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,mbs_sec&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,latencyms_min&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,latencyms_avg&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,latencyms_max&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp;&lt;/span&gt;@ServerName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@LogicalDrive&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@DriveQty&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@DriveRPM&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@DriveRaidLevel&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@TestDate&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@SANmodel&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@SANfirmware&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@PartitionOffset&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@Filesystem&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,@FSClusterSizeBytes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,( &lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;REPLACE&lt;/span&gt;(resulttext,&#39;sqlio &#39;,&#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impsqlio_version&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&lt;/span&gt;imp.rowid + 1 = impsqlio_version.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;sqlio_version&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;LEFT(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39; threads&#39;,resulttext) ))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impthreads&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 3 = impthreads.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;threads&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;UPPER&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;threads &#39;,resulttext) ) + 8,1))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impreadorwrite&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 3 = impreadorwrite.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;readorwrite&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39; for&#39;,resulttext) ) + 4,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39; secs &#39;,resulttext) ) - (&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39; for&#39;,resulttext) ) - 4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impdurationseconds&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 3 = impdurationseconds.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;durationseconds&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(resulttext,7,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;KB&#39;,resulttext) ) - 7)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impsectorsizekb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 4 = impsectorsizekb.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;sectorsizekb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;KB &#39;,resulttext) ) + 3,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39; IOs&#39;,resulttext) ) - (&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;KB &#39;,resulttext) ) - 3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impiopattern&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&lt;/span&gt;imp.rowid + 4 = impiopattern.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;iopattern&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;with &#39;,resulttext) ) + 5,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39; outstanding&#39;,resulttext) ) - (&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;with &#39;,resulttext) )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 5)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impiosoutstanding&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 5 = impiosoutstanding.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;iosoutstanding&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;REPLACE&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;(resulttext &lt;span style=&quot;color: blue;&quot;&gt;AS NVARCHAR&lt;/span&gt;(50)),&#39;buffering set to &#39;,&#39;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impbuffering&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 6 = impbuffering.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;buffering&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;SUBSTRING&lt;/span&gt;(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;size: &#39;,resulttext) ) + 6,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( &lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39; for &#39;,resulttext) ) - (&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;CHARINDEX&lt;/span&gt;(&#39;size: &#39;,resulttext) ) - 9)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impfilesizemb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp; &lt;/span&gt;imp.rowid + 7 = impfilesizemb.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;filesizemb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;RIGHT(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;LEN&lt;/span&gt;(resulttext) - 10 ))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impios_sec&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 11 = impios_sec.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;ios_sec&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;RIGHT(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;LEN&lt;/span&gt;(resulttext) - 10 ))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import impmbs_sec&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 12 = impmbs_sec.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;mbs_sec&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;RIGHT(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;LEN&lt;/span&gt;(resulttext) - 17 ))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import implatencyms_min&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 14 = implatencyms_min.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;latencyms_min&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;RIGHT(resulttext,(&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;LEN&lt;/span&gt;(resulttext) - 17 ))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; dbo.sqlio_import implatencyms_avg&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 15 = implatencyms_avg.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;latencyms_avg&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,(&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &amp;nbsp; &amp;nbsp;&lt;/span&gt;RIGHT(resulttext,( &lt;span style=&quot;color: magenta;&quot;&gt;LEN&lt;/span&gt;(resulttext) - 17 ))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;FROM &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;dbo.sqlio_import implatencyms_max&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;imp.rowid + 16 = implatencyms_max.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;latencyms_max&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; &amp;nbsp; &amp;nbsp;dbo.sqlio_import imp&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INNER JOIN&lt;/span&gt; dbo.sqlio_import impfulltest &lt;span style=&quot;color: blue;&quot;&gt;ON &lt;/span&gt;imp.rowid + 20 = impfulltest.rowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND impfulltest.resulttext = &#39;&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHERE &amp;nbsp; &lt;/span&gt;imp.rowid = imp.parameterrowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; imp.parameterrowid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; /* Empty out the ETL table */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;DELETE &amp;nbsp;&lt;/span&gt;dbo.sqlio_import&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://allen-mcguire.blogspot.com/feeds/1185653145667613682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/importing-sqlio-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/1185653145667613682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5349971599411036250/posts/default/1185653145667613682'/><link rel='alternate' type='text/html' href='http://allen-mcguire.blogspot.com/2014/01/importing-sqlio-data.html' title='Importing SQLIO Data'/><author><name>@SQLTrooper</name><uri>http://www.blogger.com/profile/00059206167740791657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>