<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Smashing a DMV Myth: session_id &amp;gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx</link><description>Ever since I started working with SQL Server, I've been seeing advice to filter system views based on session identifiers, in order to return only user processes. The general advice is to look for session IDs (or SPIDs) greater than 50. And this seems</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26405</link><pubDate>Wed, 23 Jun 2010 16:25:14 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26405</guid><dc:creator>Phil Brammer</dc:creator><description>&lt;p&gt;+1. &amp;nbsp;Thanks for airing this out.&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26406</link><pubDate>Wed, 23 Jun 2010 16:35:06 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26406</guid><dc:creator>Amit Banerjee</dc:creator><description>&lt;p&gt;+1. Good point. A lot of monitoring systems out there are a victim to this assumption!&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26411</link><pubDate>Wed, 23 Jun 2010 18:21:44 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26411</guid><dc:creator>mjswart</dc:creator><description>&lt;p&gt;I did not know this! Thanks for pointing it out Adam.&lt;/p&gt;
&lt;p&gt;I've got to remember hostname &amp;gt; ''&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26414</link><pubDate>Wed, 23 Jun 2010 19:19:52 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26414</guid><dc:creator>Mateus</dc:creator><description>&lt;p&gt;thanks for this tip ;)&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26415</link><pubDate>Wed, 23 Jun 2010 19:33:52 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26415</guid><dc:creator>noeldr</dc:creator><description>&lt;p&gt;Great tip!&lt;/p&gt;
&lt;p&gt;BTW it was not a &amp;quot;myth busting&amp;quot; but a CHANGE ;-)&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26416</link><pubDate>Wed, 23 Jun 2010 19:35:30 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26416</guid><dc:creator>Dan</dc:creator><description>&lt;p&gt;Be careful as that's not always the case! &amp;nbsp;Other applications can also hide host_name from sys.dm_exec_sessions.&lt;/p&gt;
&lt;p&gt;The system processes hostnames are NULL, but, for example, VMWare's Virtual Center does not supply a hostname. &amp;nbsp;Make your statement &amp;quot;is not NULL&amp;quot; instead.&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26417</link><pubDate>Wed, 23 Jun 2010 20:54:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26417</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;Dan,&lt;/p&gt;
&lt;p&gt;System process hostnames are not NULL; they're an empty string. The hostname column is non-nullable... Do you consider the VMWare processes to be system processes? If not, then something else needs to be done to filter this--probably a join to sys.dm_exec_sessions for the is_user_process column.&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26418</link><pubDate>Wed, 23 Jun 2010 20:59:26 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26418</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;Dan, &lt;/p&gt;
&lt;p&gt;Can you check and see if the VMWare processes have a non-blank value in the sys.sysprocesses.hostprocess column? If so, I think that's the best solution given what you said about hostname.&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26419</link><pubDate>Wed, 23 Jun 2010 21:07:42 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26419</guid><dc:creator>Dan</dc:creator><description>&lt;p&gt;Sorry, the NULL/blank was only in sys.dm_exec_sessions. &amp;nbsp;But in sys.sysprocesses, the VMWare processes still do have the blank hostname/program name. &amp;nbsp;The hostprocess however is populated.&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26420</link><pubDate>Wed, 23 Jun 2010 21:30:22 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26420</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;Thanks, Dan! Off to update Who is Active...&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26425</link><pubDate>Thu, 24 Jun 2010 01:38:19 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26425</guid><dc:creator>James Luetkehoelter</dc:creator><description>&lt;p&gt;Nice!&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26429</link><pubDate>Thu, 24 Jun 2010 11:28:36 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26429</guid><dc:creator>Brian Tkatch</dc:creator><description>&lt;p&gt;Ooh, the strike tag. Worth it to read just for a good use of that. :)&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26431</link><pubDate>Thu, 24 Jun 2010 12:25:26 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26431</guid><dc:creator>Mark Broadbent aka </dc:creator><description>&lt;p&gt;Thanks for pointing this out, but I am presuming the the rule the user processes absolutely DONT appear 50 or under is actually still valid? ...because I personally dont care about capturing too much information just that I dont lose what I need.&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26433</link><pubDate>Thu, 24 Jun 2010 14:59:11 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26433</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;Hi Mark,&lt;/p&gt;
&lt;p&gt;That's my understanding, yes. But personally at this point I wouldn't trust the magic number either way, especially given that we have surefire ways of properly filtering the data.&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26452</link><pubDate>Fri, 25 Jun 2010 11:00:35 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26452</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;Yes, hostname is easily spoofable.&lt;/p&gt;
&lt;p&gt;sqlcmd -E -Sservername -H &amp;quot;&amp;quot;&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26474</link><pubDate>Sat, 26 Jun 2010 20:06:16 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26474</guid><dc:creator>David Walker</dc:creator><description>&lt;p&gt;Yes, the DMV (Department of Motor Vehicles) has myths such as &amp;quot;we work efficiently and we'll get to you soon&amp;quot;. &amp;nbsp;It's not true, trust me on this. &amp;nbsp;:-)&lt;/p&gt;
</description></item><item><title>re: Smashing a DMV Myth: session_id &gt; 50 == User Process</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2010/06/23/smashing-a-dmv-myth-session-id-50-user-process.aspx#26553</link><pubDate>Tue, 29 Jun 2010 11:47:33 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:26553</guid><dc:creator>Mark Broadbent</dc:creator><description>&lt;p&gt;Good point Adam, ok thanks will make alterations to my utility procs.&lt;/p&gt;
</description></item></channel></rss>