<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/4.1.7" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Torsten Schuessler</title>
		<link>http://www.insidesql.org/blogs/tosc/</link>
		<atom:link rel="self" type="application/rss+xml" href="http://www.insidesql.org/blogs/tosc/?tempskin=_rss2" />
		<description>Torsten Schuessler's SQL-Blog aka tosc</description>
		<language>en-EU</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=4.1.7"/>
		<ttl>60</ttl>
				<item>
			<title>Welcome as a Speaker for SQLSat 230 Rheinland</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/06/06/welcome-as-a-speaker-for-sqlsat-230-rheinland</link>
			<pubDate>Thu, 06 Jun 2013 09:08:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">Community &amp; PASS</category>			<guid isPermaLink="false">3502@http://www.insidesql.org/blogs/</guid>
						<description>&lt;div class=&quot;image_block&quot;&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/SQLSat230.jpg?mtime=1370346048&quot;&gt;&lt;img src=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/SQLSat230.jpg?mtime=1370346048&quot; alt=&quot;&quot; width=&quot;75%&quot; height=&quot;75%&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Yesterday, I received the &quot;&lt;em&gt;Welcome as a Speaker for SQLSat 230 Rheinland&lt;/em&gt;&quot; &amp;#8211; Mail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;BANG!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I am touched ...&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;We are happy to announce the schedule for SQLSaturday #230 Rheinland and welcome you as one of our selected speakers.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What an honor!&lt;/strong&gt; I will talk about performance and manageability of tempdb, from the perspective of a database administrator.&lt;/p&gt;
&lt;p&gt;I am happy about, that there are &lt;a href=&quot;http://www.insidesql.org/blogs/&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;3 InsideSQL&amp;#8217;s&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a title=&quot;cmu&quot; href=&quot;http://www.insidesql.org/blogs/cmu/&quot; target=&quot;_blank&quot;&gt;Christoph Muthmann&lt;/a&gt; with his &amp;#8220;&lt;a href=&quot;http://www.sqlsaturday.com/viewsession.aspx?sat=230&amp;amp;sessionid=14923&quot; target=&quot;_blank&quot;&gt;Einsatzm&amp;#246;glichkeiten von Windows Functions&lt;/a&gt;&amp;#8221;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/andreaswolter/&quot;&gt;Andreas Wolter&lt;/a&gt; with &amp;#8220;&lt;a href=&quot;http://www.sqlsaturday.com/viewsession.aspx?sat=230&amp;amp;sessionid=14807&quot; target=&quot;_blank&quot;&gt;SQL Server under Attack &amp;#8211; Angriffszenarien&lt;/a&gt;&amp;#8221;&lt;/li&gt;
&lt;li&gt;and &lt;a href=&quot;http://www.sqlsaturday.com/viewsession.aspx?sat=230&amp;amp;sessionid=15024&quot; target=&quot;_blank&quot;&gt;my humble self&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before I forget, take a closer look at &lt;a href=&quot;http://sqlsaturday230.eventbrite.de/?ref=ecount&quot; target=&quot;_blank&quot;&gt;Pre-Conference SQLSaturday #230 on Friday&lt;/a&gt;&amp;#8211; very cheap &amp;amp; interesting!&lt;/p&gt;
&lt;p&gt;Are you a photographers? Please get in touch with &lt;a title=&quot;Call for speak&amp;#8230;ehm&amp;#8230; photographers for #SQLSat230!&quot; href=&quot;http://dirkhondong.wordpress.com/2013/04/26/call-for-speakehm-photographers-for-sqlsat230/&quot; target=&quot;_blank&quot;&gt;Dirk Hondong&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CU&lt;/strong&gt; at &lt;a href=&quot;http://www.sqlsaturday.com/230/eventhome.aspx&quot; target=&quot;_blank&quot;&gt;SQLSaturday #230 | Rheinland&lt;/a&gt;!&lt;br /&gt;tosc&amp;#160;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<div class="image_block"><a href="http://www.insidesql.org/blogs/media/blogs/tosc/SQLSat230.jpg?mtime=1370346048"><img src="http://www.insidesql.org/blogs/media/blogs/tosc/SQLSat230.jpg?mtime=1370346048" alt="" width="75%" height="75%" /></a></div>
<p>Yesterday, I received the "<em>Welcome as a Speaker for SQLSat 230 Rheinland</em>" &#8211; Mail.</p>
<p><strong>BANG!</strong></p>
<p><strong>I am touched ...</strong></p>
<blockquote><p>We are happy to announce the schedule for SQLSaturday #230 Rheinland and welcome you as one of our selected speakers.</p></blockquote>
<p><strong>What an honor!</strong> I will talk about performance and manageability of tempdb, from the perspective of a database administrator.</p>
<p>I am happy about, that there are <a href="http://www.insidesql.org/blogs/" target="_blank"><strong>3 InsideSQL&#8217;s</strong></a>:</p>
<ul>
<li><a title="cmu" href="http://www.insidesql.org/blogs/cmu/" target="_blank">Christoph Muthmann</a> with his &#8220;<a href="http://www.sqlsaturday.com/viewsession.aspx?sat=230&amp;sessionid=14923" target="_blank">Einsatzm&#246;glichkeiten von Windows Functions</a>&#8221;</li>
<li><a href="http://www.insidesql.org/blogs/andreaswolter/">Andreas Wolter</a> with &#8220;<a href="http://www.sqlsaturday.com/viewsession.aspx?sat=230&amp;sessionid=14807" target="_blank">SQL Server under Attack &#8211; Angriffszenarien</a>&#8221;</li>
<li>and <a href="http://www.sqlsaturday.com/viewsession.aspx?sat=230&amp;sessionid=15024" target="_blank">my humble self</a>.</li>
</ul>
<p>Before I forget, take a closer look at <a href="http://sqlsaturday230.eventbrite.de/?ref=ecount" target="_blank">Pre-Conference SQLSaturday #230 on Friday</a>&#8211; very cheap &amp; interesting!</p>
<p>Are you a photographers? Please get in touch with <a title="Call for speak&#8230;ehm&#8230; photographers for #SQLSat230!" href="http://dirkhondong.wordpress.com/2013/04/26/call-for-speakehm-photographers-for-sqlsat230/" target="_blank">Dirk Hondong</a>!</p>
<p><strong>CU</strong> at <a href="http://www.sqlsaturday.com/230/eventhome.aspx" target="_blank">SQLSaturday #230 | Rheinland</a>!<br />tosc&#160;</p><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/06/06/welcome-as-a-speaker-for-sqlsat-230-rheinland#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3502</wfw:commentRss>
		</item>
				<item>
			<title>New Version of SQL Server Maintenance Solution by Ola Hallengren Now Available</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/06/04/new-version-of-sql-server-maintenance-solution</link>
			<pubDate>Tue, 04 Jun 2013 09:41:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">SQL Server</category>			<guid isPermaLink="false">3498@http://www.insidesql.org/blogs/</guid>
						<description>&lt;p&gt;&lt;a href=&quot;http://ola.hallengren.com/&quot; target=&quot;_blank&quot;&gt;Ola Hallengren&lt;/a&gt; and his ongoing work of his &lt;a href=&quot;http://ola.hallengren.com/&quot; target=&quot;_blank&quot;&gt;SQL Server Maintenance Solution - SQL Server Backup, Integrity Check, and Index and Statistics Maintenance&lt;/a&gt;.The solution is based on stored procedures, functions, the sqlcmd utility, and SQL Server Agent jobs.&lt;/p&gt;
&lt;p&gt;Numerous SQL Server community experts recommend the SQL Server Maintenance Solution, which has been a Gold and Silver winner in the &lt;a title=&quot;Awards&quot; href=&quot;http://www.sqlmag.com/content1/topic/2011-sql-server-magazine-editors-community-choice-awards-140830/catpath/awards/showprivate/1/page/9&quot; target=&quot;_blank&quot;&gt;2011&lt;/a&gt; and &lt;a title=&quot;Awards&quot; href=&quot;http://www.sqlmag.com/content1/topic/2010-sql-server-magazine-editors-best-and-community-choice-awards/catpath/sql-server/page/4&quot; target=&quot;_blank&quot;&gt;2010&lt;/a&gt; SQL Server Magazine Awards. I love this tool to perform index maintenance on instances with VLDBs - and the best it&#039;s &lt;span style=&quot;color: #ff0000;&quot;&gt;&lt;strong&gt;&lt;a title=&quot;SQL Server Backup, Integrity Check, and Index and Statistics Maintenance&quot; href=&quot;http://ola.hallengren.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;free&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;!&lt;/p&gt;
&lt;p&gt;The new version supports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;lock timeout settings in DatabaseIntegrityCheck and IndexOptimize&lt;/li&gt;
&lt;li&gt;support for indexes and statistics on objects that are created by internal SQL Server components&lt;/li&gt;
&lt;li&gt;... and so on :-)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It can be uses like this:&lt;/p&gt;
&lt;pre&gt;&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXECUTE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;dbo.IndexOptimize &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@Databases &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;AdventureWorks&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #434343;&quot;&gt;@LockTimeout &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;600&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new version has some performance optimizations and minor bug fixes&lt;/p&gt;
&lt;p&gt;Download: &lt;a title=&quot;SQL Server Maintenance Solution&quot; href=&quot;http://ola.hallengren.com/scripts/MaintenanceSolution.sql&quot; target=&quot;_blank&quot;&gt;http://ola.hallengren.com/scripts/MaintenanceSolution.sql&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please feel free to &lt;a href=&quot;http://ola.hallengren.com/contact.html&quot; target=&quot;_blank&quot;&gt;contact&lt;/a&gt; him if you have any questions. And I tell you, Ola will consider it!!!&lt;/p&gt;
&lt;p&gt;I wish you a nice&amp;#160; day,&lt;br /&gt;&lt;a href=&quot;http://feeds2.feedburner.com/TorstenSchuessler&quot; target=&quot;_blank&quot;&gt;tosc&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><a href="http://ola.hallengren.com/" target="_blank">Ola Hallengren</a> and his ongoing work of his <a href="http://ola.hallengren.com/" target="_blank">SQL Server Maintenance Solution - SQL Server Backup, Integrity Check, and Index and Statistics Maintenance</a>.The solution is based on stored procedures, functions, the sqlcmd utility, and SQL Server Agent jobs.</p>
<p>Numerous SQL Server community experts recommend the SQL Server Maintenance Solution, which has been a Gold and Silver winner in the <a title="Awards" href="http://www.sqlmag.com/content1/topic/2011-sql-server-magazine-editors-community-choice-awards-140830/catpath/awards/showprivate/1/page/9" target="_blank">2011</a> and <a title="Awards" href="http://www.sqlmag.com/content1/topic/2010-sql-server-magazine-editors-best-and-community-choice-awards/catpath/sql-server/page/4" target="_blank">2010</a> SQL Server Magazine Awards. I love this tool to perform index maintenance on instances with VLDBs - and the best it's <span style="color: #ff0000;"><strong><a title="SQL Server Backup, Integrity Check, and Index and Statistics Maintenance" href="http://ola.hallengren.com/" target="_blank"><span style="color: #ff0000;">free</span></a></strong></span>!</p>
<p>The new version supports:</p>
<ul>
<li>lock timeout settings in DatabaseIntegrityCheck and IndexOptimize</li>
<li>support for indexes and statistics on objects that are created by internal SQL Server components</li>
<li>... and so on :-)</li>
</ul>
<p>It can be uses like this:</p>
<pre><code style="font-size: 12px;"><span style="color: blue;">EXECUTE </span><span style="color: black;">dbo.IndexOptimize </span><span style="color: #434343;">@Databases </span><span style="color: blue;">= </span><span style="color: red;">'AdventureWorks'</span><span style="color: gray;">, </span><span style="color: #434343;">@LockTimeout </span><span style="color: blue;">= </span><span style="color: black;">600</span></code></pre>
<p>The new version has some performance optimizations and minor bug fixes</p>
<p>Download: <a title="SQL Server Maintenance Solution" href="http://ola.hallengren.com/scripts/MaintenanceSolution.sql" target="_blank">http://ola.hallengren.com/scripts/MaintenanceSolution.sql</a></p>
<p>Please feel free to <a href="http://ola.hallengren.com/contact.html" target="_blank">contact</a> him if you have any questions. And I tell you, Ola will consider it!!!</p>
<p>I wish you a nice&#160; day,<br /><a href="http://feeds2.feedburner.com/TorstenSchuessler" target="_blank">tosc</a></p><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/06/04/new-version-of-sql-server-maintenance-solution#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3498</wfw:commentRss>
		</item>
				<item>
			<title>Discrepancy by estimated TEMPDB space for CHECKDB and CHECKALLOC - WITH ESTIMATEONlY</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/05/17/discrepancy-by-estimated-tempdb-space-for-checkdb-and-checkalloc-with-estimateonly</link>
			<pubDate>Fri, 17 May 2013 09:39:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">SQL Server</category>
<category domain="alt">Community &amp; PASS</category>			<guid isPermaLink="false">3487@http://www.insidesql.org/blogs/</guid>
						<description>&lt;p&gt;I came around this problem (depends on SQL Server 2008 R2 jutst to SQL Server 2012) by reading &lt;a href=&quot;http://www.sqlskills.com/blogs/paul&quot; target=&quot;_blank&quot;&gt;Paul S.&amp;#160;Randal&#039;s&lt;/a&gt; and &lt;a href=&quot;https://amihalj.wordpress.com/&quot; target=&quot;_blank&quot;&gt;Ana&#039;s&lt;/a&gt; blog posts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.sqlskills.com/blogs/paul/how-does-dbcc-checkdb-with-estimateonly-work/&quot; target=&quot;_blank&quot;&gt;How does DBCC CHECKDB WITH ESTIMATEONLY work &lt;/a&gt;(Paul)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://amihalj.wordpress.com/2011/11/11/dbcc-checkdb-with-estimateonly-do-you-trust-it/&quot; target=&quot;_blank&quot;&gt;DBCC CHECKDB WITH ESTIMATEONLY: Do you trust it?&lt;/a&gt; (Ana)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms176064.aspx&quot; target=&quot;_blank&quot;&gt;DBCC CHECKDB&lt;/a&gt; runs &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms188422.aspx&quot; target=&quot;_blank&quot;&gt;CHECKALLOC&lt;/a&gt;, &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms174338.aspx&quot; target=&quot;_blank&quot;&gt;CHECKTABLE&lt;/a&gt;, &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms186720.aspx&quot; target=&quot;_blank&quot;&gt;CHECKCATALOG&lt;/a&gt;&amp;#160;etc. against database, tables, views and so on. And I have learnded, however CHECKDB is executed against &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms187837.aspx&quot; target=&quot;_blank&quot;&gt;master database&lt;/a&gt;, a second CHECKDB is also running internally on the &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms190940.aspx&quot; target=&quot;_blank&quot;&gt;mssqlsystemressource&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So in my way, I want only&amp;#160;make consistency check of disk space allocation&amp;#160;by DBCC CHECKALLOC WITH ESTIMATEONLY against a ~ 200GB database, to know the estimated amount of &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ms190768.aspx&quot; target=&quot;_blank&quot;&gt;tempdb&lt;/a&gt; space.&lt;/p&gt;
&lt;p&gt;I run following DBCC command on SQL Server 2012 Enterprise Edition:&lt;/p&gt;
&lt;pre&gt;&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DBCC &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;CHECKALLOC &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WITH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ESTIMATEONLY&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TABLERESULTS&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And I get this result&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Estimated TEMPDB space (in KB) needed for CHECKALLOC on database XXX = 35383596.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;OK, nothing special - but I thought about the posts of Ana and Paul, and a blog entry of &lt;a href=&quot;http://blogs.msdn.com/b/saponsqlserver/&quot; target=&quot;_blank&quot;&gt;Running SQP on SQL Server Blog&lt;/a&gt; - &lt;a href=&quot;http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx&quot; target=&quot;_blank&quot;&gt;Faster DBCC CHECKDB Released in SQL 2008 R2 SP1 CU4 : Traceflag 2562 &amp;amp; 2549&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So next shot comparing CHECKDB and CHECKALLOC:&lt;/p&gt;
&lt;pre&gt;&lt;code style=&quot;font-size: 12px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;DBCC &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;CHECKDB &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WITH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ESTIMATEONLY&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TABLERESULTS&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;; &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DBCC &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;CHECKALLOC &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WITH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ESTIMATEONLY&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TABLERESULTS&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the results are diffrent!&lt;br /&gt;For CHECKDB:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Estimated TEMPDB space (in KB) needed for CHECKDB on database XXX = &lt;strong&gt;27165&lt;/strong&gt;.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And for CHECKALLOC:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Estimated TEMPDB space (in KB) needed for CHECKALLOC on database XXX = &lt;strong&gt;35383596&lt;/strong&gt;.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This isn&#039;t an expected result - what a &lt;strong&gt;discrepancy&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;By the way I have made a &lt;a href=&quot;http://connect.microsoft.com/&quot; target=&quot;_blank&quot;&gt;Microsoft Connect&lt;/a&gt; entry:&lt;a href=&quot;https://connect.microsoft.com/SQLServer/feedback/details/787049/discrepancy-by-estimated-tempdb-space-for-checkdb-and-checkalloc-with-estimateonly&quot; target=&quot;_blank&quot;&gt; http://connect.microsoft.com/SQLServer/feedback/details/787049/discrepancy-by-estimated-tempdb-space-for-checkdb-and-checkalloc-with-estimateonly&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So feel free to vote.&lt;/p&gt;
&lt;p&gt;I wish you a nice day,&lt;br /&gt;&lt;a href=&quot;http://feeds2.feedburner.com/TorstenSchuessler&quot; target=&quot;_blank&quot;&gt;tosc&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;image_block&quot;&gt;&lt;a href=&quot;http://feeds.feedburner.com/~r/TorstenSchuessler/~6/1&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;border: 0;&quot; src=&quot;http://feeds.feedburner.com/TorstenSchuessler.1.gif&quot; alt=&quot;Torsten Schuessler&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I came around this problem (depends on SQL Server 2008 R2 jutst to SQL Server 2012) by reading <a href="http://www.sqlskills.com/blogs/paul" target="_blank">Paul S.&#160;Randal's</a> and <a href="https://amihalj.wordpress.com/" target="_blank">Ana's</a> blog posts:</p>
<ul>
<li><a href="http://www.sqlskills.com/blogs/paul/how-does-dbcc-checkdb-with-estimateonly-work/" target="_blank">How does DBCC CHECKDB WITH ESTIMATEONLY work </a>(Paul)</li>
<li><a href="https://amihalj.wordpress.com/2011/11/11/dbcc-checkdb-with-estimateonly-do-you-trust-it/" target="_blank">DBCC CHECKDB WITH ESTIMATEONLY: Do you trust it?</a> (Ana)</li>
</ul>
<p><a href="http://technet.microsoft.com/en-us/library/ms176064.aspx" target="_blank">DBCC CHECKDB</a> runs <a href="http://technet.microsoft.com/en-us/library/ms188422.aspx" target="_blank">CHECKALLOC</a>, <a href="http://technet.microsoft.com/en-us/library/ms174338.aspx" target="_blank">CHECKTABLE</a>, <a href="http://technet.microsoft.com/en-us/library/ms186720.aspx" target="_blank">CHECKCATALOG</a>&#160;etc. against database, tables, views and so on. And I have learnded, however CHECKDB is executed against <a href="http://technet.microsoft.com/en-us/library/ms187837.aspx" target="_blank">master database</a>, a second CHECKDB is also running internally on the <a href="http://technet.microsoft.com/en-us/library/ms190940.aspx" target="_blank">mssqlsystemressource</a>.</p>
<p>So in my way, I want only&#160;make consistency check of disk space allocation&#160;by DBCC CHECKALLOC WITH ESTIMATEONLY against a ~ 200GB database, to know the estimated amount of <a href="http://technet.microsoft.com/en-us/library/ms190768.aspx" target="_blank">tempdb</a> space.</p>
<p>I run following DBCC command on SQL Server 2012 Enterprise Edition:</p>
<pre><code style="font-size: 12px;"><span style="color: blue;">DBCC </span><span style="color: black;">CHECKALLOC </span><span style="color: gray;">() </span><span style="color: blue;">WITH </span><span style="color: black;">ESTIMATEONLY</span><span style="color: gray;">, </span><span style="color: black;">TABLERESULTS</span><span style="color: gray;">;<br /></span><span style="color: black;">GO</span></code></pre>
<p>And I get this result</p>
<pre><code>Estimated TEMPDB space (in KB) needed for CHECKALLOC on database XXX = 35383596.</code></pre>
<p>OK, nothing special - but I thought about the posts of Ana and Paul, and a blog entry of <a href="http://blogs.msdn.com/b/saponsqlserver/" target="_blank">Running SQP on SQL Server Blog</a> - <a href="http://blogs.msdn.com/b/saponsqlserver/archive/2011/12/22/faster-dbcc-checkdb-released-in-sql-2008-r2-sp1-traceflag-2562-amp-2549.aspx" target="_blank">Faster DBCC CHECKDB Released in SQL 2008 R2 SP1 CU4 : Traceflag 2562 &amp; 2549</a></p>
<p>So next shot comparing CHECKDB and CHECKALLOC:</p>
<pre><code style="font-size: 12px;"><span style="color: blue;">DBCC </span><span style="color: black;">CHECKDB </span><span style="color: blue;">WITH </span><span style="color: black;">ESTIMATEONLY</span><span style="color: gray;">, </span><span style="color: black;">TABLERESULTS</span><span style="color: gray;">; <br /></span><span style="color: black;">GO<br /><br /></span><span style="color: blue;">DBCC </span><span style="color: black;">CHECKALLOC </span><span style="color: blue;">WITH </span><span style="color: black;">ESTIMATEONLY</span><span style="color: gray;">, </span><span style="color: black;">TABLERESULTS</span><span style="color: gray;">;<br /></span><span style="color: black;">GO<br /></span></code></pre>
<p>And the results are diffrent!<br />For CHECKDB:</p>
<pre><code>Estimated TEMPDB space (in KB) needed for CHECKDB on database XXX = <strong>27165</strong>.</code></pre>
<p>And for CHECKALLOC:</p>
<pre><code>Estimated TEMPDB space (in KB) needed for CHECKALLOC on database XXX = <strong>35383596</strong>.</code></pre>
<p>This isn't an expected result - what a <strong>discrepancy</strong>!</p>
<p>By the way I have made a <a href="http://connect.microsoft.com/" target="_blank">Microsoft Connect</a> entry:<a href="https://connect.microsoft.com/SQLServer/feedback/details/787049/discrepancy-by-estimated-tempdb-space-for-checkdb-and-checkalloc-with-estimateonly" target="_blank"> http://connect.microsoft.com/SQLServer/feedback/details/787049/discrepancy-by-estimated-tempdb-space-for-checkdb-and-checkalloc-with-estimateonly</a></p>
<p>So feel free to vote.</p>
<p>I wish you a nice day,<br /><a href="http://feeds2.feedburner.com/TorstenSchuessler" target="_blank">tosc</a></p>
<div class="image_block"><a href="http://feeds.feedburner.com/~r/TorstenSchuessler/~6/1" target="_blank"><img style="border: 0;" src="http://feeds.feedburner.com/TorstenSchuessler.1.gif" alt="Torsten Schuessler" /></a></div><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/05/17/discrepancy-by-estimated-tempdb-space-for-checkdb-and-checkalloc-with-estimateonly#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3487</wfw:commentRss>
		</item>
				<item>
			<title>SQL Server 2012 Tempdb File Size Change tracked with Extended Events</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/05/02/sql-server-tempdb-file-size-change-tracked-with-extended-events</link>
			<pubDate>Thu, 02 May 2013 11:51:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">SQL Server</category>			<guid isPermaLink="false">3479@http://www.insidesql.org/blogs/</guid>
						<description>&lt;p&gt;We are using SQL Server 2012 and the tempdb is growing so fast. How do I effectively find what&amp;#8217;s causing my tempdb growing. Can I monitor the file size change with Extended Events to find out the ...&lt;/p&gt;&lt;p&gt;The tempdb system database is a global resource that is available to all users connected to the instance of SQL Server. tempdb is re-created every time is started so that the system always starts with a clean copy of the database. The database engine uses tempdb for:&lt;/p&gt;
&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;Temporary user objects (temp tables, table variables ...)&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Internal objects (work tables/work files/ intermediate results ...)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Version store for data modification transactions (Online indexes, After trigges, Snapshot, MARS ...)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Service Broker, database mail ...&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;But this is another deep dive topic of tempdb latch contention on allocation pages... :-)&lt;br /&gt;For now I only want to know&lt;/p&gt;
&lt;h3&gt;What&#039;s causing that my tempdb is growing so fast?&lt;/h3&gt;
&lt;p&gt;I usually look first to the tempdb file size and autogrow settings, you know something like this:&lt;/p&gt;
&lt;pre align=&quot;left&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;--&amp;gt; SQL Server tempdb file size and autogrow information &amp;lt;--&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET NOCOUNT ON&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&amp;#160;&amp;#160;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;USE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[master]&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- Check for trace flag 1117/1118 or any other trace flag&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DBCC &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TRACESTATUS &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1117&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WITH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;NO_INFOMSGS&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- Grows all data files at once, else it goes in turns.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DBCC &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TRACESTATUS &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1118&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WITH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;NO_INFOMSGS&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- Switches allocations in tempDB from 1pg at a time (for first 8 pages) to one extent&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DBCC &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TRACESTATUS &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WITH &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;NO_INFOMSGS&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;old.physical_name &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;FileName&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;old.name &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;LogicalName&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;old.size &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;* &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;8.0 &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;/ &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1024.0 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;OriginalSizeInMB&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.size &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;* &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;8.0 &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;/ &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1024.0 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;CurrentSizeInMB&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;GrowthType&#039; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;CASE&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.growth &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;File is fixed size and will not grow.&#039;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.growth &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.is_percent_growth &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;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;Growth increment is in units of 8-KB pages, rounded to the nearest 64 KB&#039;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ELSE &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;Growth increment is expressed as a whole number percentage.&#039;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;GrowthIncrement&#039; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;CASE&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.is_percent_growth &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;CAST&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.growth &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;* &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;8 &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;/ &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1024&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)) + &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;MB&#039; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ELSE &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;CAST &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.growth &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)) + &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;%&#039;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;MaximumFileSize&#039; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;CASE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.max_size &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- file size, in 8-KB pages&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;No growth is allowed.&#039;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;File will grow until the disk is full.&#039;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- !Databases that are upgraded with an unlimited log file size will report -1 for the maximum size of the log file!&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHEN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;268435456 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;THEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;Log file will grow to a maximum size of 2 TB.&#039; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ELSE &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;CAST &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.max_size &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;* &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;8.0 &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;/ &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1024.0 &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)) + &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;MB&#039;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;br /&gt;FROM&lt;br /&gt;&amp;#160;&amp;#160; MASTER&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.sys.master_files old &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INNER JOIN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;tempdb.sys.database_files new &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;old.&lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;FILE_ID &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.&lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;FILE_ID&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;database_id &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;DB_ID&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;tempdb&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)&lt;br /&gt;&amp;#160;&amp;#160; AND &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;old.size &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;&amp;lt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;new.size&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;In fact, this is a good starting point to presize tempdb, for peak periods or set autogrow to be rare but &quot;big enough&quot;, but I want to know what&#039;s causing my tempdb to grow so fast.&lt;/p&gt;
&lt;p&gt;So I came out on &lt;a title=&quot;Extended Events&quot; href=&quot;http://msdn.microsoft.com/en-us/library/bb630282.aspx&quot; target=&quot;_blank&quot;&gt;Extended Events&lt;/a&gt;. Extended Events are a new mechanism introduced in SQL Server 2008 to capture SQL Server performance data with low overhead compared to SQL Server profiler, server side tracing, DBCC commands and other utilities. The scope of Extended Events is far beyond this tip and please refer to the articles below for better understanding of this feature. Extended Events allow more granular level tracking that was impossible in prior SQL Server versions. Extended Events in SQL Server 2012, XE in short, allows you capturing performance monitoring data at individual database level or per session level and for this post I will track information at the database level for tempdb.&lt;/p&gt;
&lt;p&gt;The code snippet below creates the session to track tempdb file size changed and some informations of client application, session id, client hostname and so on.&lt;/p&gt;
&lt;pre align=&quot;left&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;--Drop the event if it already exists&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;EXISTS(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;* &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sys.server_event_sessions &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;name &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;tempdb_file_size_changed&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DROP &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;EVENT SESSION [tempdb_file_size_changed] &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;SERVER&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;-- Create event&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;EVENT SESSION [tempdb_file_size_changed] &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;SERVER &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ADD &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;EVENT sqlserver.database_file_size_change&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;collect_database_name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ACTION&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sqlserver.client_app_name&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sqlserver.client_hostname&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sqlserver.database_id&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sqlserver.session_id&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sqlserver.session_nt_username&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sqlserver.username&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[database_id]&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;))) &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ADD &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;TARGET package0.event_file&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;filename&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;N&#039;C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\tempdb_file_size_changed.xel&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;WITH &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;MAX_DISPATCH_LATENCY&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1 SECONDS&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Once the script is completed and started I can wait for my tempdb rumbling.&lt;/p&gt;
&lt;p&gt;To summarize the file size change, I ran these following queries:&lt;/p&gt;
&lt;pre align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET NOCOUNT ON&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&amp;#160;&amp;#160;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;USE &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[master]&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GO&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;database_name &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;DatabaseName&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;file_type &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;FileType&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;SUM &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;size_change_kb&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Total_Size_Change_KB&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;SUM &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;duration&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Total_Duration&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;client_app_name &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Client_Application&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;session_id &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;SessionID&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;n.value &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;(data[@name=&quot;size_change_kb&quot;]/value)[1]&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;int&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;size_change_kb&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;n.value &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;(data[@name=&quot;database_name&quot;]/value)[1]&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;nvarchar(50)&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;database_name&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;n.value &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;(data[@name=&quot;duration&quot;]/value)[1]&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;int&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;duration&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;n.value &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;(data[@name=&quot;file_type&quot;]/text)[1]&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;nvarchar(50)&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;file_type&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;n.value &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;(action[@name=&quot;client_app_name&quot;]/value)[1]&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;nvarchar(50)&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;client_app_name&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;n.value &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;(action[@name=&quot;session_id&quot;]/value)[1]&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;nvarchar(50)&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;session_id&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: #ff00ff;&quot;&gt;CAST&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;event_data &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS XML&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;event_data&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;sys.&lt;/span&gt;&lt;span style=&quot;color: #8b0000;&quot;&gt;fn_xe_file_target_read_file&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;N&#039;C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\tempdb_file_size_changed*.xel&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;,&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NULL,&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NULL,&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NULL)&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;tab&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;CROSS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;APPLY event_data.nodes&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;event&#039;&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;q&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;)) &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;xyz&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;GROUP BY &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;client_app_name&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;database_name&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;file_type&lt;/span&gt;&lt;span style=&quot;color: gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;session_id&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;client_app_name&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;div class=&quot;image_block&quot;&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_file_size_changed.png?mtime=1367327315&quot;&gt;&lt;img src=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_file_size_changed.png?mtime=1367327315&quot; alt=&quot;&quot; width=&quot;736&quot; height=&quot;85&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;And what was causing my tempdb, it was me by Microsoft SQL Server Management Studio :-( - only for this blog entry.&lt;/p&gt;
&lt;p&gt;Feel free to download these scripts:&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/autogrow_settings_tempdb.sql?mtime=1367329101&quot;&gt;autogrow_settings_tempdb.sql&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_file_size_extended_events.sql?mtime=1367329420&quot;&gt;tempdb_file_size_extended_events.sql&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_xml_event_data.sql?mtime=1367329420&quot;&gt;tempdb_xml_event_data.sql&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/p&gt;
&lt;p&gt;I wish you a nice&amp;#160; day,&lt;br /&gt;&lt;a href=&quot;http://feeds2.feedburner.com/TorstenSchuessler&quot; target=&quot;_blank&quot;&gt;tosc&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;image_block&quot;&gt;&lt;a href=&quot;http://feeds.feedburner.com/~r/TorstenSchuessler/~6/1&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;border: 0;&quot; src=&quot;http://feeds.feedburner.com/TorstenSchuessler.1.gif&quot; alt=&quot;Torsten Schuessler&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>We are using SQL Server 2012 and the tempdb is growing so fast. How do I effectively find what&#8217;s causing my tempdb growing. Can I monitor the file size change with Extended Events to find out the ...</p><p>The tempdb system database is a global resource that is available to all users connected to the instance of SQL Server. tempdb is re-created every time is started so that the system always starts with a clean copy of the database. The database engine uses tempdb for:</p>
<ul>
<ul>
<li>Temporary user objects (temp tables, table variables ...)</li>
<li><span>Internal objects (work tables/work files/ intermediate results ...)</span></li>
<li><span>Version store for data modification transactions (Online indexes, After trigges, Snapshot, MARS ...)</span></li>
<li><span>Service Broker, database mail ...</span></li>
</ul>
</ul>
<p>But this is another deep dive topic of tempdb latch contention on allocation pages... :-)<br />For now I only want to know</p>
<h3>What's causing that my tempdb is growing so fast?</h3>
<p>I usually look first to the tempdb file size and autogrow settings, you know something like this:</p>
<pre align="left"><span style="color: green;">--&gt; SQL Server tempdb file size and autogrow information &lt;--<br /></span><span style="color: blue;">SET NOCOUNT ON</span><span style="color: gray;">;<br /></span><span style="color: black;">GO&#160;&#160;<br /></span><span style="color: blue;">USE </span><span style="color: black;">[master]</span><span style="color: gray;">;<br /></span><span style="color: black;">GO<br /></span><span style="color: green;">-- Check for trace flag 1117/1118 or any other trace flag<br /></span><span style="color: blue;">DBCC </span><span style="color: black;">TRACESTATUS </span><span style="color: gray;">(</span><span style="color: black;">1117</span><span style="color: gray;">) </span><span style="color: blue;">WITH </span><span style="color: black;">NO_INFOMSGS</span><span style="color: gray;">; </span><span style="color: green;">-- Grows all data files at once, else it goes in turns.<br /></span><span style="color: blue;">DBCC </span><span style="color: black;">TRACESTATUS </span><span style="color: gray;">(</span><span style="color: black;">1118</span><span style="color: gray;">) </span><span style="color: blue;">WITH </span><span style="color: black;">NO_INFOMSGS</span><span style="color: gray;">; </span><span style="color: green;">-- Switches allocations in tempDB from 1pg at a time (for first 8 pages) to one extent<br /></span><span style="color: blue;">DBCC </span><span style="color: black;">TRACESTATUS </span><span style="color: gray;">() </span><span style="color: blue;">WITH </span><span style="color: black;">NO_INFOMSGS</span><span style="color: gray;">;<br /><br /></span><span style="color: blue;">SELECT<br />&#160;&#160; </span><span style="color: black;">old.physical_name </span><span style="color: blue;">AS </span><span style="color: red;">'FileName'</span><span style="color: gray;">,<br />&#160;&#160; </span><span style="color: black;">old.name </span><span style="color: blue;">AS </span><span style="color: red;">'LogicalName'</span><span style="color: gray;">,<br />&#160;&#160; </span><span style="color: black;">old.size </span><span style="color: gray;">* </span><span style="color: black;">8.0 </span><span style="color: gray;">/ </span><span style="color: black;">1024.0 </span><span style="color: blue;">AS </span><span style="color: red;">'OriginalSizeInMB'</span><span style="color: gray;">,<br />&#160;&#160; </span><span style="color: black;">new.size </span><span style="color: gray;">* </span><span style="color: black;">8.0 </span><span style="color: gray;">/ </span><span style="color: black;">1024.0 </span><span style="color: blue;">AS </span><span style="color: red;">'CurrentSizeInMB'</span><span style="color: gray;">,<br />&#160;&#160; </span><span style="color: red;">'GrowthType' </span><span style="color: blue;">= <br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #ff00ff;">CASE<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">WHEN </span><span style="color: black;">new.growth </span><span style="color: blue;">= </span><span style="color: black;">0 </span><span style="color: blue;">THEN </span><span style="color: red;">'File is fixed size and will not grow.'<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">WHEN </span><span style="color: black;">new.growth </span><span style="color: gray;">&gt; </span><span style="color: black;">0 </span><span style="color: gray;">AND </span><span style="color: black;">new.is_percent_growth </span><span style="color: blue;">= </span><span style="color: black;">0 <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">THEN </span><span style="color: red;">'Growth increment is in units of 8-KB pages, rounded to the nearest 64 KB'<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">ELSE </span><span style="color: red;">'Growth increment is expressed as a whole number percentage.'<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">END</span><span style="color: gray;">,<br />&#160;&#160; </span><span style="color: red;">'GrowthIncrement' </span><span style="color: blue;">=<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #ff00ff;">CASE<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">WHEN </span><span style="color: black;">new.is_percent_growth </span><span style="color: blue;">= </span><span style="color: black;">0 </span><span style="color: blue;">THEN </span><span style="color: #ff00ff;">CAST</span><span style="color: gray;">((</span><span style="color: black;">new.growth </span><span style="color: gray;">* </span><span style="color: black;">8 </span><span style="color: gray;">/ </span><span style="color: black;">1024</span><span style="color: gray;">) </span><span style="color: blue;">AS NVARCHAR</span><span style="color: gray;">(</span><span style="color: black;">30</span><span style="color: gray;">)) + </span><span style="color: red;">'MB' <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">ELSE </span><span style="color: #ff00ff;">CAST </span><span style="color: gray;">(</span><span style="color: black;">new.growth </span><span style="color: blue;">AS NVARCHAR</span><span style="color: gray;">(</span><span style="color: black;">30</span><span style="color: gray;">)) + </span><span style="color: red;">'%'<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">END</span><span style="color: gray;">, <br />&#160;&#160; </span><span style="color: red;">'MaximumFileSize' </span><span style="color: blue;">=<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #ff00ff;">CASE </span><span style="color: black;">new.max_size </span><span style="color: green;">-- file size, in 8-KB pages<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">WHEN </span><span style="color: black;">0 </span><span style="color: blue;">THEN </span><span style="color: red;">'No growth is allowed.'<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">WHEN </span><span style="color: gray;">-</span><span style="color: black;">1 </span><span style="color: blue;">THEN </span><span style="color: red;">'File will grow until the disk is full.'<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: green;">-- !Databases that are upgraded with an unlimited log file size will report -1 for the maximum size of the log file!<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">WHEN </span><span style="color: black;">268435456 </span><span style="color: blue;">THEN </span><span style="color: red;">'Log file will grow to a maximum size of 2 TB.' <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">ELSE </span><span style="color: #ff00ff;">CAST </span><span style="color: gray;">(</span><span style="color: black;">new.max_size </span><span style="color: gray;">* </span><span style="color: black;">8.0 </span><span style="color: gray;">/ </span><span style="color: black;">1024.0 </span><span style="color: blue;">AS NVARCHAR</span><span style="color: gray;">(</span><span style="color: black;">30</span><span style="color: gray;">)) + </span><span style="color: red;">'MB'<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">END<br />FROM<br />&#160;&#160; MASTER</span><span style="color: black;">.sys.master_files old </span><span style="color: blue;">INNER JOIN </span><span style="color: black;">tempdb.sys.database_files new </span><span style="color: blue;">ON<br />&#160;&#160; </span><span style="color: black;">old.</span><span style="color: #ff00ff;">FILE_ID </span><span style="color: blue;">= </span><span style="color: black;">new.</span><span style="color: #ff00ff;">FILE_ID<br /></span><span style="color: blue;">WHERE<br />&#160;&#160; </span><span style="color: black;">database_id </span><span style="color: blue;">= </span><span style="color: #ff00ff;">DB_ID</span><span style="color: gray;">(</span><span style="color: red;">'tempdb'</span><span style="color: gray;">)<br />&#160;&#160; AND </span><span style="color: black;">old.size </span><span style="color: gray;">&lt;&gt; </span><span style="color: black;">new.size</span></pre>
<p>In fact, this is a good starting point to presize tempdb, for peak periods or set autogrow to be rare but "big enough", but I want to know what's causing my tempdb to grow so fast.</p>
<p>So I came out on <a title="Extended Events" href="http://msdn.microsoft.com/en-us/library/bb630282.aspx" target="_blank">Extended Events</a>. Extended Events are a new mechanism introduced in SQL Server 2008 to capture SQL Server performance data with low overhead compared to SQL Server profiler, server side tracing, DBCC commands and other utilities. The scope of Extended Events is far beyond this tip and please refer to the articles below for better understanding of this feature. Extended Events allow more granular level tracking that was impossible in prior SQL Server versions. Extended Events in SQL Server 2012, XE in short, allows you capturing performance monitoring data at individual database level or per session level and for this post I will track information at the database level for tempdb.</p>
<p>The code snippet below creates the session to track tempdb file size changed and some informations of client application, session id, client hostname and so on.</p>
<pre align="left"><span style="color: green;">--Drop the event if it already exists<br /></span><span style="color: blue;">IF </span><span style="color: gray;">EXISTS(</span><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: blue;">FROM </span><span style="color: black;">sys.server_event_sessions </span><span style="color: blue;">WHERE </span><span style="color: black;">name </span><span style="color: blue;">= </span><span style="color: red;">'tempdb_file_size_changed'</span><span style="color: gray;">)<br />&#160;&#160;&#160;&#160;</span><span style="color: blue;">DROP </span><span style="color: black;">EVENT SESSION [tempdb_file_size_changed] </span><span style="color: blue;">ON </span><span style="color: black;">SERVER</span><span style="color: gray;">;<br /></span><span style="color: black;">GO<br /><br /></span><span style="color: green;">-- Create event<br /></span><span style="color: blue;">CREATE </span><span style="color: black;">EVENT SESSION [tempdb_file_size_changed] </span><span style="color: blue;">ON </span><span style="color: black;">SERVER <br /></span><span style="color: blue;">ADD </span><span style="color: black;">EVENT sqlserver.database_file_size_change</span><span style="color: gray;">(</span><span style="color: blue;">SET </span><span style="color: black;">collect_database_name</span><span style="color: blue;">=</span><span style="color: gray;">(</span><span style="color: black;">1</span><span style="color: gray;">)<br />&#160;&#160;&#160;&#160;</span><span style="color: black;">ACTION<br />&#160;&#160; </span><span style="color: gray;">(</span><span style="color: black;">sqlserver.client_app_name</span><span style="color: gray;">,</span><span style="color: black;">sqlserver.client_hostname</span><span style="color: gray;">, </span><span style="color: black;">sqlserver.database_id</span><span style="color: gray;">,</span><span style="color: black;">sqlserver.session_id</span><span style="color: gray;">,<br />&#160;&#160; </span><span style="color: black;">sqlserver.session_nt_username</span><span style="color: gray;">,</span><span style="color: black;">sqlserver.username</span><span style="color: gray;">) </span><span style="color: blue;">WHERE </span><span style="color: gray;">(</span><span style="color: black;">[database_id]</span><span style="color: blue;">=</span><span style="color: gray;">(</span><span style="color: black;">2</span><span style="color: gray;">))) <br /></span><span style="color: blue;">ADD </span><span style="color: black;">TARGET package0.event_file<br /></span><span style="color: gray;">(</span><span style="color: blue;">SET </span><span style="color: black;">filename</span><span style="color: blue;">=</span><span style="color: red;">N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\tempdb_file_size_changed.xel'</span><span style="color: gray;">)<br /></span><span style="color: blue;">WITH </span><span style="color: gray;">(</span><span style="color: black;">MAX_DISPATCH_LATENCY</span><span style="color: blue;">=</span><span style="color: black;">1 SECONDS</span><span style="color: gray;">)<br /></span><span style="color: black;">GO</span></pre>
<p>Once the script is completed and started I can wait for my tempdb rumbling.</p>
<p>To summarize the file size change, I ran these following queries:</p>
<pre align="left"><span style="color: blue;">SET NOCOUNT ON</span><span style="color: gray;">;<br /></span><span style="color: black;">GO&#160;&#160;<br /></span><span style="color: blue;">USE </span><span style="color: black;">[master]</span><span style="color: gray;">;<br /></span><span style="color: black;">GO<br /></span><span style="color: blue;">SELECT<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: black;">database_name </span><span style="color: blue;">AS </span><span style="color: black;">DatabaseName<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">file_type </span><span style="color: blue;">AS </span><span style="color: black;">FileType<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: #ff00ff;">SUM </span><span style="color: gray;">(</span><span style="color: black;">size_change_kb</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">Total_Size_Change_KB<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: #ff00ff;">SUM </span><span style="color: gray;">(</span><span style="color: black;">duration</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">Total_Duration<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">client_app_name </span><span style="color: blue;">AS </span><span style="color: black;">Client_Application<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">session_id </span><span style="color: blue;">AS </span><span style="color: black;">SessionID<br />&#160;&#160;&#160;&#160;&#160;&#160; <br /></span><span style="color: blue;">FROM </span><span style="color: gray;">(<br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">SELECT<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: black;">n.value </span><span style="color: gray;">(</span><span style="color: red;">'(data[@name="size_change_kb"]/value)[1]'</span><span style="color: gray;">, </span><span style="color: red;">'int'</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">size_change_kb<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">n.value </span><span style="color: gray;">(</span><span style="color: red;">'(data[@name="database_name"]/value)[1]'</span><span style="color: gray;">, </span><span style="color: red;">'nvarchar(50)'</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">database_name<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">n.value </span><span style="color: gray;">(</span><span style="color: red;">'(data[@name="duration"]/value)[1]'</span><span style="color: gray;">, </span><span style="color: red;">'int'</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">duration<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">n.value </span><span style="color: gray;">(</span><span style="color: red;">'(data[@name="file_type"]/text)[1]'</span><span style="color: gray;">,</span><span style="color: red;">'nvarchar(50)'</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">file_type<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">n.value </span><span style="color: gray;">(</span><span style="color: red;">'(action[@name="client_app_name"]/value)[1]'</span><span style="color: gray;">,</span><span style="color: red;">'nvarchar(50)'</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">client_app_name<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">, </span><span style="color: black;">n.value </span><span style="color: gray;">(</span><span style="color: red;">'(action[@name="session_id"]/value)[1]'</span><span style="color: gray;">,</span><span style="color: red;">'nvarchar(50)'</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">session_id<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">FROM <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: gray;">(&#160;&#160; </span><span style="color: blue;">SELECT </span><span style="color: #ff00ff;">CAST</span><span style="color: gray;">(</span><span style="color: black;">event_data </span><span style="color: blue;">AS XML</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">event_data<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue;">FROM </span><span style="color: black;">sys.</span><span style="color: #8b0000;">fn_xe_file_target_read_file</span><span style="color: gray;">(<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: red;">N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\tempdb_file_size_changed*.xel'</span><span style="color: gray;">,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NULL,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NULL,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; NULL)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ) </span><span style="color: blue;">AS </span><span style="color: black;">tab<br /></span><span style="color: gray;">CROSS </span><span style="color: black;">APPLY event_data.nodes</span><span style="color: gray;">(</span><span style="color: red;">'event'</span><span style="color: gray;">) </span><span style="color: blue;">AS </span><span style="color: black;">q</span><span style="color: gray;">(</span><span style="color: black;">n</span><span style="color: gray;">)) </span><span style="color: black;">xyz<br /></span><span style="color: blue;">GROUP BY </span><span style="color: black;">client_app_name</span><span style="color: gray;">, </span><span style="color: black;">database_name</span><span style="color: gray;">, </span><span style="color: black;">file_type</span><span style="color: gray;">, </span><span style="color: black;">session_id<br /></span><span style="color: blue;">ORDER BY </span><span style="color: black;">client_app_name</span></pre>
<p>&#160;</p>
<div class="image_block"><a href="http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_file_size_changed.png?mtime=1367327315"><img src="http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_file_size_changed.png?mtime=1367327315" alt="" width="736" height="85" /></a></div>
<p>And what was causing my tempdb, it was me by Microsoft SQL Server Management Studio :-( - only for this blog entry.</p>
<p>Feel free to download these scripts:<ul>
<li><a href="http://www.insidesql.org/blogs/media/blogs/tosc/autogrow_settings_tempdb.sql?mtime=1367329101">autogrow_settings_tempdb.sql</a></li><li><a href="http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_file_size_extended_events.sql?mtime=1367329420">tempdb_file_size_extended_events.sql</a></li>
<li><a href="http://www.insidesql.org/blogs/media/blogs/tosc/tempdb_xml_event_data.sql?mtime=1367329420">tempdb_xml_event_data.sql</a></li>
</ul></p>
<p>I wish you a nice&#160; day,<br /><a href="http://feeds2.feedburner.com/TorstenSchuessler" target="_blank">tosc</a></p>
<div class="image_block"><a href="http://feeds.feedburner.com/~r/TorstenSchuessler/~6/1" target="_blank"><img style="border: 0;" src="http://feeds.feedburner.com/TorstenSchuessler.1.gif" alt="Torsten Schuessler" /></a></div><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/05/02/sql-server-tempdb-file-size-change-tracked-with-extended-events#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3479</wfw:commentRss>
		</item>
				<item>
			<title>Inappropriate?</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/04/17/inappropriate</link>
			<pubDate>Wed, 17 Apr 2013 12:18:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">Miscellaneous</category>			<guid isPermaLink="false">3469@http://www.insidesql.org/blogs/</guid>
						<description>&lt;div class=&quot;image_block&quot;&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/d85a84f2-a751-11e2-9e5b-22000a98b3f2-original.jpg?mtime=1366200775&quot;&gt;&lt;img src=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/d85a84f2-a751-11e2-9e5b-22000a98b3f2-original.jpg?mtime=1366200775&quot; alt=&quot;&quot; width=&quot;100%&quot; height=&quot;100%&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<div class="image_block"><a href="http://www.insidesql.org/blogs/media/blogs/tosc/d85a84f2-a751-11e2-9e5b-22000a98b3f2-original.jpg?mtime=1366200775"><img src="http://www.insidesql.org/blogs/media/blogs/tosc/d85a84f2-a751-11e2-9e5b-22000a98b3f2-original.jpg?mtime=1366200775" alt="" width="100%" height="100%" /></a></div><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/04/17/inappropriate#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3469</wfw:commentRss>
		</item>
				<item>
			<title>Kostenloser PASS-Vortrag "From Locks to Dead-locks.  &#8211; Concurrency in SQL Server&#8220; - 19.03.2013 - N&#252;rnberg;</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/03/16/kostenloser-pass-vortrag-from-locks-to-dead-locks-concurrency-in-sql-server-19-03-2013-nuernberg</link>
			<pubDate>Sat, 16 Mar 2013 18:58:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">Community &amp; PASS</category>			<guid isPermaLink="false">3441@http://www.insidesql.org/blogs/</guid>
						<description>&lt;table style=&quot;border: 0px solid #003399;&quot; border=&quot;0&quot; frame=&quot;border&quot; align=&quot;center&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div class=&quot;image_block&quot;&gt;&lt;a title=&quot;PASS Deutschland e.V.&quot; href=&quot;http://www.sqlpass.de&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;vertical-align: middle;&quot; src=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/pass_sqlpass_de.png?mtime=1333361728&quot; alt=&quot;www.sqlpass.de&quot; width=&quot;100%&quot; height=&quot;100%&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;&lt;p&gt;&amp;#160;Hallo &lt;strong&gt;PASS&amp;#8216;ler&lt;/strong&gt;,&lt;/p&gt;
&lt;p class=&quot;ecxmsonormal&quot; align=&quot;center&quot;&gt;hiermit m&amp;#246;chten wir euch zum n&amp;#228;chsten Treffen - ein wirkliches Highlight - &amp;#160;der Regionalgruppe&amp;#160;&lt;strong&gt;Franken&lt;/strong&gt; in&amp;#160;N&amp;#252;rnberg&amp;#160;am&amp;#160;&lt;br /&gt; &lt;strong&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;Dienstag, 19. M&amp;#228;rz 2013&lt;/span&gt;,&amp;#160;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt; &lt;/strong&gt;18:30 bis ca. 20:30&lt;strong&gt;&lt;br /&gt; &lt;/strong&gt;zum&amp;#160;&lt;br /&gt; kostenlosen Vortrag&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #003399;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-US&quot;&gt;From Locks to Dead-locks. &amp;#160;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span&gt;&amp;#8211; Concurrency in SQL Server&lt;/span&gt;&lt;/strong&gt;&amp;#160;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;background-color: #003399;&quot; align=&quot;left&quot; valign=&quot;middle&quot;&gt;&amp;#160;&lt;span style=&quot;color: #ffffff;&quot;&gt;&lt;strong&gt;&lt;span lang=&quot;EN-US&quot;&gt;From Locks to Dead-locks. &amp;#160;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&amp;#8211; Concurrency in SQL Server&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p class=&quot;ecxMsoNormal&quot;&gt;&amp;#160;&lt;/p&gt;
&lt;p class=&quot;ecxMsoNormal&quot;&gt;In diesem Vortrag geht es um essentielle Mechanismen im SQL Server, die sowohl Administratoren als auch Entwickler beeinflussen und kennen sollten: Warum muss SQL Server Objekte sperren, welche Auswirkungen kann das haben (Performance und Datenintegrit&amp;#228;t) und wie wir darauf Einfluss nehmen k&amp;#246;nnen.&amp;#160;&lt;/p&gt;
&lt;p class=&quot;ecxMsoListParagraph&quot;&gt;&amp;#183;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;K&amp;#246;nnen Indexe Blockaden verhindern?&lt;br /&gt;&amp;#183;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Warum NOLOCK bei gesch&amp;#228;ftskritischen Daten keine gute Idee ist.&lt;br /&gt;&amp;#183;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Wann und was passiert bei Lock-Escalation?&lt;br /&gt;&amp;#183;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Was passiert bei zu vielen Sperren auf ein Object? Was ist zu viel?&lt;br /&gt;&amp;#183;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Was hat Table-Design mit Sperren zu tun? (Stichwort &quot;Large Databases&quot;)&lt;br /&gt;&amp;#183;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Warum man Fehler Nummer 1205 kennen sollte. - Wie und wobei Deadlocks auftreten k&amp;#246;nnen und wie man sie beheben kann.&lt;br /&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;#183;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;Wie ist &amp;#8222;Optimistic Concurrency&amp;#8220; SQL Server implementiert?&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;ecxMsoNormal&quot;&gt;Das Ganze nat&amp;#252;rlich wie immer reich an Demos!!!&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;background-color: #003399;&quot; align=&quot;left&quot; valign=&quot;middle&quot;&gt;&amp;#160;&lt;span style=&quot;color: #ffffff;&quot;&gt;&lt;strong&gt;Sprecher&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&amp;#160;
&lt;table border=&quot;0&quot; frame=&quot;void&quot; align=&quot;left&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/andreas_wolter.jpg?mtime=1362725070&quot;&gt;&lt;img src=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/andreas_wolter.jpg?mtime=1362725070&quot; alt=&quot;&quot; width=&quot;140&quot; height=&quot;185&quot; /&gt;&lt;/a&gt;&amp;#160;&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;strong&gt;Andreas Wolter&lt;/strong&gt;&amp;#160;ist einer von weltweit derzeit weniger als 100&amp;#160;&lt;a href=&quot;http://www.microsoft.com/learning/en/us/certification/master-sql.aspx&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;Microsoft Certified Master SQL Server 2008 (MCM)&lt;/strong&gt;&lt;/a&gt;&amp;#160;und in Deutschland bislang der einzige von Microsoft unabh&amp;#228;ngige; au&amp;#223;erdem MCT, MCITP:DD/DA/BID, MCDBA, MCSA und kann auf &amp;#252;ber zehn Jahre Erfahrung als Trainer, Consultant und Architekt f&amp;#252;r SQL Server Datenbanksysteme zur&amp;#252;ckblicken.&lt;/p&gt;
&lt;p&gt;Seit einigen Jahren ist er aktives Mitglied der PASS und Sprecher auf Fachkonferenzen in Deutschland und den USA. Mit seiner Firma &lt;strong&gt;SARPEDON Quality Lab&lt;/strong&gt; (&lt;a title=&quot;SARPEDON&quot; href=&quot;http://www.sarpedonqualitylab.com/&quot; target=&quot;_blank&quot;&gt;www.SarpedonQualityLab.com&lt;/a&gt;) hat er sich besonders auf die Entwicklung und Optimierung von Datenbank- und Datawarehouse-Architekturen spezialisiert und bietet auch intensive Trainings und Coaching an.&amp;#160;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img style=&quot;vertical-align: middle;&quot; src=&quot;http://www.sarpedonqualitylab.com/sql-images/Microsoft-Certified-Master-SQL-Server2008-MCM.png&quot; alt=&quot;&quot; width=&quot;238&quot; height=&quot;79&quot; /&gt;&lt;/td&gt;
&lt;td&gt;&amp;#160;Sein Blog ist unter&amp;#160;&lt;a href=&quot;http://www.vb-magazin.de/forums/blogs/andreaswolter&quot; target=&quot;_blank&quot;&gt;http://www.vb-magazin.de/forums/blogs/andreaswolter&lt;/a&gt;&amp;#160;zu finden.&amp;#160;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;/td&gt;&lt;br /&gt;
&lt;/tr&gt;
&lt;p&gt;&lt;/p&gt;&lt;tr&gt;
&lt;td style=&quot;background-color: #003399;&quot; align=&quot;left&quot; valign=&quot;middle&quot;&gt;&amp;#160;&lt;span style=&quot;color: #ffffff;&quot;&gt;&lt;strong&gt;Veranstaltungsort und Anmeldung&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;p&gt;&lt;/p&gt;&lt;tr&gt;
&lt;td&gt;&lt;p&gt;&amp;#160;&lt;br /&gt;&amp;#160;&lt;strong&gt;New Elements GmbH / it-schulungen.com&lt;/strong&gt;&lt;/p&gt;
&lt;p class=&quot;ecxmsonormal&quot;&gt;&lt;a href=&quot;http://www.it-schulungen.com/&quot; target=&quot;_blank&quot;&gt;www.it-schulungen.com&lt;br /&gt;&lt;/a&gt;Thurn-und-Taxis-Stra&amp;#223;e 10&lt;br /&gt;(Alcatel-Lucent Geb&amp;#228;ude im Nordostpark)&lt;br /&gt;D - 90411 N&amp;#252;rnberg&lt;br /&gt;Fon: 0911 - 65 00 83 - 25&amp;#160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kostenfreie Parkpl&amp;#228;tze&lt;/strong&gt;&amp;#160;sind vorhanden.&lt;br /&gt;&lt;/p&gt;
&lt;p class=&quot;ecxmsonormal&quot;&gt;&amp;#220;ber Euer Kommen freuen wir uns sehr. Bitte teilt uns zwecks Planung der R&amp;#228;umlichkeiten mit, ob Ihr kommt.&lt;br /&gt;Gerne k&amp;#246;nnt Ihr die&amp;#160;Einladung&amp;#160;an Kollegen und Mitarbeiter weitergeben.&lt;br /&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #ff0000;&quot;&gt;&lt;strong&gt;Wir bitten um eine vorherige Anmeldung per XING&lt;/strong&gt;&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;#160;&lt;/span&gt;&lt;a title=&quot;Hier geht&#039;s zur Anmeldung&quot; href=&quot;http://www.xing.com/events/1216055&quot; target=&quot;_blank&quot;&gt;www.xing.com/events&lt;/a&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;#160;&lt;/span&gt;&lt;strong&gt;oder per Email an:&lt;/strong&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;#160;&lt;/span&gt;&lt;a href=&quot;http://www.insidesql.orgmailto:mde@sqlpass.de&quot;&gt;mde@sqlpass.de&lt;/a&gt;.&lt;/p&gt;
&lt;p class=&quot;ecxmsonormal&quot;&gt;&lt;span&gt;Wir freuen uns auf eine rege Runde &amp;#8211;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;und wer Lust hat bringt Zeit mit, den Abend gemeinsam&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;beim Italiener&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;#160;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;ausklingen zu lassen.&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;ecxmsonormal&quot;&gt;&lt;span&gt;Torsten Sch&amp;#252;&amp;#223;ler und&amp;#160;Michael Deinhard&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;p&gt;&lt;/p&gt;&lt;tr&gt;
&lt;td style=&quot;background-color: #003399;&quot; align=&quot;left&quot; valign=&quot;middle&quot;&gt;&amp;#160;&lt;strong&gt;&lt;span style=&quot;color: #ffffff;&quot;&gt;Kontakt&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;p&gt;&lt;/p&gt;&lt;tr&gt;
&lt;td&gt;&amp;#160;&lt;br /&gt;&amp;#160;PASS Deutschland e.V.&lt;br /&gt; &lt;a href=&quot;http://www.sqlpass.de/&quot; target=&quot;_blank&quot;&gt;http://www.sqlpass.de&lt;/a&gt;&amp;#160;&lt;br /&gt; &lt;br /&gt; Regionalgruppe&amp;#160;Franken&lt;br /&gt; &lt;a href=&quot;http://www.sqlpass.de/Regionalgruppen/Franken/tabid/71/Default.aspx&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;http://www.sqlpass.de/Regionalgruppen/Franken/tabid/71/Default.aspx&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;br /&gt;
&lt;/tbody&gt;&lt;br /&gt;
&lt;/table&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<table style="border: 0px solid #003399;" border="0" frame="border" align="center">
<tbody>
<tr>
<td>
<div class="image_block"><a title="PASS Deutschland e.V." href="http://www.sqlpass.de" target="_blank"><img style="vertical-align: middle;" src="http://www.insidesql.org/blogs/media/blogs/tosc/pass_sqlpass_de.png?mtime=1333361728" alt="www.sqlpass.de" width="100%" height="100%" /></a></div>
</td>
</tr>
<tr>
<td style="text-align: center;"><p>&#160;Hallo <strong>PASS&#8216;ler</strong>,</p>
<p class="ecxmsonormal" align="center">hiermit m&#246;chten wir euch zum n&#228;chsten Treffen - ein wirkliches Highlight - &#160;der Regionalgruppe&#160;<strong>Franken</strong> in&#160;N&#252;rnberg&#160;am&#160;<br /> <strong><span style="color: #ff0000;">Dienstag, 19. M&#228;rz 2013</span>,&#160;</strong><strong><br /> </strong>18:30 bis ca. 20:30<strong><br /> </strong>zum&#160;<br /> kostenlosen Vortrag</p>
<p><span style="color: #0000ff;"><strong><span style="color: #003399;"><strong><span lang="EN-US">From Locks to Dead-locks. &#160;</span></strong><strong><span>&#8211; Concurrency in SQL Server</span></strong>&#160;</span><br />&#160;</strong></span></p></td>
</tr>
<tr>
<td style="background-color: #003399;" align="left" valign="middle">&#160;<span style="color: #ffffff;"><strong><span lang="EN-US">From Locks to Dead-locks. &#160;</span></strong><strong>&#8211; Concurrency in SQL Server</strong></span></td>
</tr>
<tr>
<td>
<p class="ecxMsoNormal">&#160;</p>
<p class="ecxMsoNormal">In diesem Vortrag geht es um essentielle Mechanismen im SQL Server, die sowohl Administratoren als auch Entwickler beeinflussen und kennen sollten: Warum muss SQL Server Objekte sperren, welche Auswirkungen kann das haben (Performance und Datenintegrit&#228;t) und wie wir darauf Einfluss nehmen k&#246;nnen.&#160;</p>
<p class="ecxMsoListParagraph">&#183;<span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</span>K&#246;nnen Indexe Blockaden verhindern?<br />&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Warum NOLOCK bei gesch&#228;ftskritischen Daten keine gute Idee ist.<br />&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Wann und was passiert bei Lock-Escalation?<br />&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Was passiert bei zu vielen Sperren auf ein Object? Was ist zu viel?<br />&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Was hat Table-Design mit Sperren zu tun? (Stichwort "Large Databases")<br />&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Warum man Fehler Nummer 1205 kennen sollte. - Wie und wobei Deadlocks auftreten k&#246;nnen und wie man sie beheben kann.<br /><span lang="EN-US">&#183;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</span><span lang="EN-US">Wie ist &#8222;Optimistic Concurrency&#8220; SQL Server implementiert?</span></p>
<p class="ecxMsoNormal">Das Ganze nat&#252;rlich wie immer reich an Demos!!!</p>
</td>
</tr>
<tr>
<td style="background-color: #003399;" align="left" valign="middle">&#160;<span style="color: #ffffff;"><strong>Sprecher</strong></span></td>
</tr>
<tr>
<td>&#160;
<table border="0" frame="void" align="left">
<tbody>
<tr>
<td><a href="http://www.insidesql.org/blogs/media/blogs/tosc/andreas_wolter.jpg?mtime=1362725070"><img src="http://www.insidesql.org/blogs/media/blogs/tosc/andreas_wolter.jpg?mtime=1362725070" alt="" width="140" height="185" /></a>&#160;</td>
<td>
<p><strong>Andreas Wolter</strong>&#160;ist einer von weltweit derzeit weniger als 100&#160;<a href="http://www.microsoft.com/learning/en/us/certification/master-sql.aspx" target="_blank"><strong>Microsoft Certified Master SQL Server 2008 (MCM)</strong></a>&#160;und in Deutschland bislang der einzige von Microsoft unabh&#228;ngige; au&#223;erdem MCT, MCITP:DD/DA/BID, MCDBA, MCSA und kann auf &#252;ber zehn Jahre Erfahrung als Trainer, Consultant und Architekt f&#252;r SQL Server Datenbanksysteme zur&#252;ckblicken.</p>
<p>Seit einigen Jahren ist er aktives Mitglied der PASS und Sprecher auf Fachkonferenzen in Deutschland und den USA. Mit seiner Firma <strong>SARPEDON Quality Lab</strong> (<a title="SARPEDON" href="http://www.sarpedonqualitylab.com/" target="_blank">www.SarpedonQualityLab.com</a>) hat er sich besonders auf die Entwicklung und Optimierung von Datenbank- und Datawarehouse-Architekturen spezialisiert und bietet auch intensive Trainings und Coaching an.&#160;</p>
</td>
</tr>
<tr>
<td><img style="vertical-align: middle;" src="http://www.sarpedonqualitylab.com/sql-images/Microsoft-Certified-Master-SQL-Server2008-MCM.png" alt="" width="238" height="79" /></td>
<td>&#160;Sein Blog ist unter&#160;<a href="http://www.vb-magazin.de/forums/blogs/andreaswolter" target="_blank">http://www.vb-magazin.de/forums/blogs/andreaswolter</a>&#160;zu finden.&#160;</td>
</tr>
</tbody>
</table>
<p><br /></p>
<p>&#160;</p>
<p>&#160;</p>
</td><br />
</tr>
<p></p><tr>
<td style="background-color: #003399;" align="left" valign="middle">&#160;<span style="color: #ffffff;"><strong>Veranstaltungsort und Anmeldung</strong></span></td>
</tr>
<p></p><tr>
<td><p>&#160;<br />&#160;<strong>New Elements GmbH / it-schulungen.com</strong></p>
<p class="ecxmsonormal"><a href="http://www.it-schulungen.com/" target="_blank">www.it-schulungen.com<br /></a>Thurn-und-Taxis-Stra&#223;e 10<br />(Alcatel-Lucent Geb&#228;ude im Nordostpark)<br />D - 90411 N&#252;rnberg<br />Fon: 0911 - 65 00 83 - 25&#160;</p>
<p><strong>Kostenfreie Parkpl&#228;tze</strong>&#160;sind vorhanden.<br /></p>
<p class="ecxmsonormal">&#220;ber Euer Kommen freuen wir uns sehr. Bitte teilt uns zwecks Planung der R&#228;umlichkeiten mit, ob Ihr kommt.<br />Gerne k&#246;nnt Ihr die&#160;Einladung&#160;an Kollegen und Mitarbeiter weitergeben.<br /><br />&#160;<span style="color: #ff0000;"><strong>Wir bitten um eine vorherige Anmeldung per XING</strong></span><span class="apple-converted-space">&#160;</span><a title="Hier geht's zur Anmeldung" href="http://www.xing.com/events/1216055" target="_blank">www.xing.com/events</a><span class="apple-converted-space">&#160;</span><strong>oder per Email an:</strong><span class="apple-converted-space">&#160;</span><a href="http://www.insidesql.orgmailto:mde@sqlpass.de">mde@sqlpass.de</a>.</p>
<p class="ecxmsonormal"><span>Wir freuen uns auf eine rege Runde &#8211;<span class="apple-converted-space"><strong>&#160;</strong></span></span><span>und wer Lust hat bringt Zeit mit, den Abend gemeinsam<span class="apple-converted-space">&#160;</span></span><span>beim Italiener<span class="apple-converted-space">&#160;</span></span><span>ausklingen zu lassen.</span></p>
<p class="ecxmsonormal"><span>Torsten Sch&#252;&#223;ler und&#160;Michael Deinhard</span></p>
</td>
</tr>
<p></p><tr>
<td style="background-color: #003399;" align="left" valign="middle">&#160;<strong><span style="color: #ffffff;">Kontakt</span></strong></td>
</tr>
<p></p><tr>
<td>&#160;<br />&#160;PASS Deutschland e.V.<br /> <a href="http://www.sqlpass.de/" target="_blank">http://www.sqlpass.de</a>&#160;<br /> <br /> Regionalgruppe&#160;Franken<br /> <a href="http://www.sqlpass.de/Regionalgruppen/Franken/tabid/71/Default.aspx" target="_blank"><strong>http://www.sqlpass.de/Regionalgruppen/Franken/tabid/71/Default.aspx</strong></a><br /><br /></td>
</tr><br />
</tbody><br />
</table><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/03/16/kostenloser-pass-vortrag-from-locks-to-dead-locks-concurrency-in-sql-server-19-03-2013-nuernberg#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3441</wfw:commentRss>
		</item>
				<item>
			<title>PASS Deutschland e.V. auf den Frankfurter Datenbanktagen 2013</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/03/13/pass-deutschland-e-v-auf-den-frankfurter-datenbanktagen-2013</link>
			<pubDate>Wed, 13 Mar 2013 08:14:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">Community &amp; PASS</category>			<guid isPermaLink="false">3417@http://www.insidesql.org/blogs/</guid>
						<description>&lt;p&gt;&amp;#160;&lt;a href=&quot;http://www.frankfurter-datenbanktage.de/index.php&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.frankfurter-datenbanktage.de/images/logo_small.png&quot; alt=&quot;Frankfurter Datenbanktage 2013&quot; width=&quot;244&quot; height=&quot;100&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Die &lt;a title=&quot;Frankfurter Datenbanktage&quot; href=&quot;http://www.frankfurter-datenbanktage.de/&quot; target=&quot;_blank&quot;&gt;Frankfurter Datenbanktage&lt;/a&gt; finden im Fr&amp;#252;hjahr 2013 vom 14. bis 15. M&amp;#228;rz statt. An zwei Konferenztagen werden Datenbankthemen aus der Welt von IBM, Oracle, Microsoft und Open Source-Datenbanken in f&amp;#252;nf parallelen Vortragstracks und rund 60 intensiven Sessions behandelt.&lt;/p&gt;
&lt;p&gt;Am Vortag der Konferenz, am 13. M&amp;#228;rz gibt es einen optional buchbaren Schulungstag zu &amp;#8222;Virtualisierung, Cloud Computing und Hochverf&amp;#252;gbarkeit mit SQL Server&amp;#8220;. Maic Beher und &lt;a title=&quot;Uwe Ricken&quot; href=&quot;http://www.insidesql.org/blogs/uricken/&quot; target=&quot;_self&quot;&gt;Uwe Ricken&lt;/a&gt; zeigen die technischen M&amp;#246;glichkeiten, mit Hilfe von HyperV, SCOM und SQL Server komplexe Cloud-L&amp;#246;sungen zu realisieren. AlwaysOn, Mirroring und Replikation sind weitere Themen des Hands on Trainings.&lt;/p&gt;
&lt;p&gt;Ruprecht Dr&amp;#246;ge zeigt in seiner Session einen Praxisvergleich der Hochverf&amp;#252;gbarkeitsl&amp;#246;sungen mit MS SQL Server. Er ist ist Autor der B&amp;#252;cher &amp;#8222;SQL Server 2012&amp;#8243;, &amp;#8222;SQL Server 2008&amp;#8243; und &amp;#8222;SQL Server 2005&amp;#8220;, die bei Microsoft Press erschienen sind. Lars Platzdasch geht auf Internals zur IO-Infrastrukturplanung von MS SQL Server-Umgebungen ein: IO-Diagnose, IO-Stresstests, Tools zur Problemerkennung und SAN-Optimierung. &amp;#8222;SQL Server 2012 Express - M&amp;#246;glichkeiten und Grenzen&amp;#8220; ist das Thema von Robert Panther. Der mehrfach zertifizierte Datenbank-Experte, Trainer und Buchautor ver&amp;#246;ffentlichte im Mai 2012 bei Microsoft Press in der Reihe &quot;Richtig einsteigen&quot; eines der ersten deutschsprachigen B&amp;#252;cher zu SQL Server 2012. Anfang 2010 erschien bei entwickler.press sein SQL Server Performance-Ratgeber. Daniel Caesar, Autor des Buches &quot;SQL Server 2008 R2 Einf&amp;#252;hrung f&amp;#252;r Administratoren und Entwickler&quot;, das 2010 bei Galileo erschienen ist, spricht &amp;#252;ber MS SQL Server 2012: Er wird neue Funktionen des MS SQL Server 2012 aus Sicht einer SharePoint 2010 Plattform vorstellen und bewerten.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitglieder der &lt;a title=&quot;PASS Deutschland e.V.&quot; href=&quot;http://www.sqlpass.de/&quot; target=&quot;_blank&quot;&gt;PASS Deutschland e.V.&lt;/a&gt; erhalten die M&amp;#246;glichkeit, einen Rabatt von 20% auf alle Teilnehmerpakete zu nutzen!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;#160;Nat&amp;#252;rlich gibt es auch die M&amp;#246;glichkeit die PASS vor Ort kennen zu lernen. &lt;a title=&quot;Christoph Muthmann&quot; href=&quot;http://www.insidesql.org/blogs/cmu/&quot; target=&quot;_self&quot;&gt;Christoph Muthmann&lt;/a&gt;(MVP) und &lt;a title=&quot;Torsten Sch&amp;#252;&amp;#223;ler aka tosc&quot; href=&quot;http://www.insidesql.org/blogs/tosc/&quot; target=&quot;_self&quot;&gt;Torsten Sch&amp;#252;&amp;#223;ler&lt;/a&gt; beantworten gerne Eure Fragen - wir freuen uns auf Euch!&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>&#160;<a href="http://www.frankfurter-datenbanktage.de/index.php" target="_blank"><img src="http://www.frankfurter-datenbanktage.de/images/logo_small.png" alt="Frankfurter Datenbanktage 2013" width="244" height="100" /></a></p>
<p>Die <a title="Frankfurter Datenbanktage" href="http://www.frankfurter-datenbanktage.de/" target="_blank">Frankfurter Datenbanktage</a> finden im Fr&#252;hjahr 2013 vom 14. bis 15. M&#228;rz statt. An zwei Konferenztagen werden Datenbankthemen aus der Welt von IBM, Oracle, Microsoft und Open Source-Datenbanken in f&#252;nf parallelen Vortragstracks und rund 60 intensiven Sessions behandelt.</p>
<p>Am Vortag der Konferenz, am 13. M&#228;rz gibt es einen optional buchbaren Schulungstag zu &#8222;Virtualisierung, Cloud Computing und Hochverf&#252;gbarkeit mit SQL Server&#8220;. Maic Beher und <a title="Uwe Ricken" href="http://www.insidesql.org/blogs/uricken/" target="_self">Uwe Ricken</a> zeigen die technischen M&#246;glichkeiten, mit Hilfe von HyperV, SCOM und SQL Server komplexe Cloud-L&#246;sungen zu realisieren. AlwaysOn, Mirroring und Replikation sind weitere Themen des Hands on Trainings.</p>
<p>Ruprecht Dr&#246;ge zeigt in seiner Session einen Praxisvergleich der Hochverf&#252;gbarkeitsl&#246;sungen mit MS SQL Server. Er ist ist Autor der B&#252;cher &#8222;SQL Server 2012&#8243;, &#8222;SQL Server 2008&#8243; und &#8222;SQL Server 2005&#8220;, die bei Microsoft Press erschienen sind. Lars Platzdasch geht auf Internals zur IO-Infrastrukturplanung von MS SQL Server-Umgebungen ein: IO-Diagnose, IO-Stresstests, Tools zur Problemerkennung und SAN-Optimierung. &#8222;SQL Server 2012 Express - M&#246;glichkeiten und Grenzen&#8220; ist das Thema von Robert Panther. Der mehrfach zertifizierte Datenbank-Experte, Trainer und Buchautor ver&#246;ffentlichte im Mai 2012 bei Microsoft Press in der Reihe "Richtig einsteigen" eines der ersten deutschsprachigen B&#252;cher zu SQL Server 2012. Anfang 2010 erschien bei entwickler.press sein SQL Server Performance-Ratgeber. Daniel Caesar, Autor des Buches "SQL Server 2008 R2 Einf&#252;hrung f&#252;r Administratoren und Entwickler", das 2010 bei Galileo erschienen ist, spricht &#252;ber MS SQL Server 2012: Er wird neue Funktionen des MS SQL Server 2012 aus Sicht einer SharePoint 2010 Plattform vorstellen und bewerten.</p>
<p><strong>Mitglieder der <a title="PASS Deutschland e.V." href="http://www.sqlpass.de/" target="_blank">PASS Deutschland e.V.</a> erhalten die M&#246;glichkeit, einen Rabatt von 20% auf alle Teilnehmerpakete zu nutzen!</strong></p>
<p>&#160;Nat&#252;rlich gibt es auch die M&#246;glichkeit die PASS vor Ort kennen zu lernen. <a title="Christoph Muthmann" href="http://www.insidesql.org/blogs/cmu/" target="_self">Christoph Muthmann</a>(MVP) und <a title="Torsten Sch&#252;&#223;ler aka tosc" href="http://www.insidesql.org/blogs/tosc/" target="_self">Torsten Sch&#252;&#223;ler</a> beantworten gerne Eure Fragen - wir freuen uns auf Euch!</p><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/03/13/pass-deutschland-e-v-auf-den-frankfurter-datenbanktagen-2013#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3417</wfw:commentRss>
		</item>
				<item>
			<title>SQL Server Information</title>
			<link>http://www.insidesql.org/blogs/tosc/2013/02/20/sql-server-information</link>
			<pubDate>Wed, 20 Feb 2013 13:13:00 +0000</pubDate>			<dc:creator>Torsten Schuessler</dc:creator>
			<category domain="main">SQL Server</category>			<guid isPermaLink="false">3413@http://www.insidesql.org/blogs/</guid>
						<description>&lt;p&gt;Only a short script to get informations about your SQL Server enviroment, like machine name, instance name, edition, version, level, cluster security, user mode, collation and login. I use it as a piece on my whole admin scripts.&lt;/p&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier New; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: green;&quot;&gt;&lt;em&gt;--&amp;gt;&amp;#160;SQL&amp;#160;Server&amp;#160;Information&amp;#160;&amp;lt;--&lt;/em&gt;&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;nocount&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;go&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;USE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;[master]&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;go&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;MachineName&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;MACHINE&amp;#160;NAME&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ServerName&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;SQL&amp;#160;SERVER&amp;#160;NAME&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;CASE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;InstanceName&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;IS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;NULL&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;Default&amp;#160;Instance&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;InstanceName&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;INSTANCE&amp;#160;NAME&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;EDITION&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;EDITION&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ProductVersion&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;PRODUCT&amp;#160;VERSION&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ProductLevel&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;PRODUCT&amp;#160;LEVEL&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;CASE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ISClustered&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: silver;&quot;&gt;=&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: black;&quot;&gt;1&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;Clustered&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ISClustered&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: silver;&quot;&gt;=&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: black;&quot;&gt;0&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;NOT&amp;#160;Clustered&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;INVALID&amp;#160;INPUT/ERROR&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;FAILOVER&amp;#160;CLUSTERED&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;CASE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ISIntegratedSecurityOnly&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: silver;&quot;&gt;=&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: black;&quot;&gt;1&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;Integrated&amp;#160;Security&amp;#160;&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ISIntegratedSecurityOnly&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: silver;&quot;&gt;=&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: black;&quot;&gt;0&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;SQL&amp;#160;Server&amp;#160;Security&amp;#160;&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;INVALID&amp;#160;INPUT/ERROR&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;SECURITY&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;CASE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ISSingleUser&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: silver;&quot;&gt;=&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: black;&quot;&gt;1&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;Single&amp;#160;User&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;ISSingleUser&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: silver;&quot;&gt;=&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: black;&quot;&gt;0&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;Multi&amp;#160;User&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;INVALID&amp;#160;INPUT/ERROR&#039;&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;USER&amp;#160;MODE&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;CONVERT&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;em&gt;CHAR&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;30&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Serverproperty&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#039;COLLATION&#039;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;COLLATION&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: fuchsia;&quot;&gt;&lt;em&gt;Getdate&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;)&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: maroon;&quot;&gt;RunTime&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: #8000ff;&quot;&gt;@@SPID&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;ID&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;SYSTEM_USER&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;Login&amp;#160;Name?&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;,&lt;/span&gt; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;USER&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;#160;&lt;span style=&quot;color: red;&quot;&gt;&#039;User&amp;#160;Name&#039;&lt;/span&gt;&lt;span style=&quot;color: silver;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;go&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;em&gt;--&amp;#160;END&amp;#160;SQL&amp;#160;Server&amp;#160;Information&amp;#160;--&lt;/em&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;http://www.insidesql.org/blogs/media/blogs/tosc/sql_server_informations.sql?mtime=1361375299&quot;&gt;sql_server_informations.sql&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;&quot;Try not to become a man of success but rather to become a man of value.&quot;&lt;/em&gt;&lt;br /&gt;Albert Einstein&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Only a short script to get informations about your SQL Server enviroment, like machine name, instance name, edition, version, level, cluster security, user mode, collation and login. I use it as a piece on my whole admin scripts.</p>
<div><span style="font-family: Courier New; font-size: 10pt;"> <span style="color: green;"><em>--&gt;&#160;SQL&#160;Server&#160;Information&#160;&lt;--</em></span> <br /><span style="color: blue;">SET</span>&#160;<span style="color: maroon;">nocount</span>&#160;<span style="color: blue;">ON</span><span style="color: silver;">;</span><span style="color: maroon;">go</span><span style="color: blue;">USE</span>&#160;<span style="color: maroon;">[master]</span><span style="color: silver;">;</span><span style="color: maroon;">go</span><span style="color: blue;">SELECT</span> <br />&#160;&#160;&#160;&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">100</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'MachineName'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'MACHINE&#160;NAME'</span><span style="color: silver;">,</span> <br />&#160;&#160;&#160;&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">50</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ServerName'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'SQL&#160;SERVER&#160;NAME'</span><span style="color: silver;">,</span> <br /> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: maroon;">(</span><span style="color: blue;">CASE</span>&#160;<span style="color: blue;">WHEN</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">50</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'InstanceName'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">IS</span>&#160;<span style="color: blue;">NULL</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">THEN</span>&#160;<span style="color: red;">'Default&#160;Instance'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">ELSE</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">50</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'InstanceName'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">END</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'INSTANCE&#160;NAME'</span><span style="color: silver;">,</span> <br /> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'EDITION'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: maroon;">EDITION</span><span style="color: silver;">,</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ProductVersion'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'PRODUCT&#160;VERSION'</span><span style="color: silver;">,</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ProductLevel'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'PRODUCT&#160;LEVEL'</span><span style="color: silver;">,</span> <br /> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: maroon;">(</span><span style="color: blue;">CASE</span>&#160;<span style="color: blue;">WHEN</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ISClustered'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: silver;">=</span>&#160;<span style="color: black;">1</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">THEN</span>&#160;<span style="color: red;">'Clustered'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">WHEN</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ISClustered'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: silver;">=</span>&#160;<span style="color: black;">0</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">THEN</span>&#160;<span style="color: red;">'NOT&#160;Clustered'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">ELSE</span>&#160;<span style="color: red;">'INVALID&#160;INPUT/ERROR'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">END</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'FAILOVER&#160;CLUSTERED'</span><span style="color: silver;">,</span> <br /> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: maroon;">(</span><span style="color: blue;">CASE</span>&#160;<span style="color: blue;">WHEN</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ISIntegratedSecurityOnly'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: silver;">=</span>&#160;<span style="color: black;">1</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">THEN</span>&#160;<span style="color: red;">'Integrated&#160;Security&#160;'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">WHEN</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ISIntegratedSecurityOnly'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: silver;">=</span>&#160;<span style="color: black;">0</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">THEN</span>&#160;<span style="color: red;">'SQL&#160;Server&#160;Security&#160;'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">ELSE</span>&#160;<span style="color: red;">'INVALID&#160;INPUT/ERROR'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">END</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'SECURITY'</span><span style="color: silver;">,</span> <br /> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: maroon;">(</span><span style="color: blue;">CASE</span>&#160;<span style="color: blue;">WHEN</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ISSingleUser'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: silver;">=</span>&#160;<span style="color: black;">1</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">THEN</span>&#160;<span style="color: red;">'Single&#160;User'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">WHEN</span>&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'ISSingleUser'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: silver;">=</span>&#160;<span style="color: black;">0</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">THEN</span>&#160;<span style="color: red;">'Multi&#160;User'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">ELSE</span>&#160;<span style="color: red;">'INVALID&#160;INPUT/ERROR'</span> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: blue;">END</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'USER&#160;MODE'</span><span style="color: silver;">,</span> <br /> <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: fuchsia;"><em>CONVERT</em></span><span style="color: maroon;">(</span><span style="color: black;"><em>CHAR</em></span><span style="color: maroon;">(</span><span style="color: black;">30</span><span style="color: maroon;">)</span><span style="color: silver;">,</span>&#160;<span style="color: fuchsia;"><em>Serverproperty</em></span><span style="color: maroon;">(</span><span style="color: red;">'COLLATION'</span><span style="color: maroon;">)</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: maroon;">COLLATION</span><span style="color: silver;">,</span> <br />&#160;&#160;&#160;&#160;<span style="color: fuchsia;"><em>Getdate</em></span><span style="color: maroon;">(</span><span style="color: maroon;">)</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: maroon;">RunTime</span><span style="color: silver;">,</span> <br />&#160;&#160;&#160;&#160;<span style="color: #8000ff;">@@SPID</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'ID'</span><span style="color: silver;">,</span> <br />&#160;&#160;&#160;&#160;<span style="color: blue;">SYSTEM_USER</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'Login&#160;Name?'</span><span style="color: silver;">,</span> <br />&#160;&#160;&#160;&#160;<span style="color: blue;">USER</span>&#160;<span style="color: blue;">AS</span>&#160;<span style="color: red;">'User&#160;Name'</span><span style="color: silver;">;</span><span style="color: maroon;">go</span> <br /><span style="color: green;"><em>--&#160;END&#160;SQL&#160;Server&#160;Information&#160;--</em></span> </span></div>
<p><a href="http://www.insidesql.org/blogs/media/blogs/tosc/sql_server_informations.sql?mtime=1361375299">sql_server_informations.sql</a></p><div class="item_footer"><br /><p><em>"Try not to become a man of success but rather to become a man of value."</em><br />Albert Einstein</p></div>]]></content:encoded>
								<comments>http://www.insidesql.org/blogs/tosc/2013/02/20/sql-server-information#comments</comments>
			<wfw:commentRss>http://www.insidesql.org/blogs/tosc/?tempskin=_rss2&#38;disp=comments&#38;p=3413</wfw:commentRss>
		</item>
			</channel>
</rss>
