<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx</link><description>When open TCP/IP properties by following SQL Server Configuration Manager -&amp;gt; SQL Server 2005 Network Configuration -&amp;gt;Protocols -&amp;gt; TCP/IP, you will notice there is new added property named “Keep Alive”, which is not available in SQL Server 2000.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Interesting Finds</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#547019</link><pubDate>Thu, 09 Mar 2006 13:48:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:547019</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#556264</link><pubDate>Tue, 21 Mar 2006 07:54:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:556264</guid><dc:creator>wesclark</dc:creator><description>We are running automated tests that intentionally drop all the connections to the database and make them again. &amp;nbsp;If the tests run quickly, we are disconnecting and connecting very frequently. &amp;nbsp;We notice that after the connection is closed (this is through the JDBC driver, but I'm not sure that matters), the connection port stays open in a wait state for several minutes. &amp;nbsp;If the number gets too high (about 4000), the range of ports is used up, and the tests start to fail.&lt;br&gt;&lt;br&gt;Is there a way to have the TCP/IP port be released on the client immediately, or at least sooner? &amp;nbsp;Is there a way to specify a large range of ports?&lt;br&gt;&lt;br&gt;By change the keep alive setting, do you think the TCP/IP port would close sooner?</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#556801</link><pubDate>Tue, 21 Mar 2006 20:41:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:556801</guid><dc:creator>Matt Neerincx [MSFT]</dc:creator><description>Take a look at this article, it explains the issue pretty well:&lt;br&gt;&lt;br&gt;328476	Description of TCP/IP settings that you may have to adjust when SQL Server connection pooling is disabled&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;328476"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;328476&lt;/a&gt;&lt;br&gt;&lt;br&gt;KeepAlive does not help.&lt;br&gt;</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#556949</link><pubDate>Tue, 21 Mar 2006 22:57:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:556949</guid><dc:creator>wesclark</dc:creator><description>Yes. &amp;nbsp;I found that KB article after posting here. &amp;nbsp;Thanks.</description></item><item><title>"Keep alive" problem / not working</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#606018</link><pubDate>Wed, 24 May 2006 17:51:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:606018</guid><dc:creator>.agony</dc:creator><description>We tried this feature with no success - neither the standard properties nor slightly changed properties worked.&lt;br&gt;&lt;br&gt;We tested like this:&lt;br&gt;SQL Server 2005 - ADO.NET Client&lt;br&gt;The client established an explicit lock on one row at one db. Afterwards we disconnected the client by pulling out the network-cable. We waited about 35 sec for the sessios to close - but nothing happend; we waited another minute but nothing changed. The command line &amp;quot;netstat&amp;quot; told us that the connections are alive ... so what went wrong? Did we miss something? btw we &amp;nbsp;installed the sp1 before all tests!</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#606252</link><pubDate>Wed, 24 May 2006 21:49:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:606252</guid><dc:creator>Nan Tu</dc:creator><description>Did you restarted server after change the setting?&lt;br&gt;Can you ping the server after you unplug the network cable?&lt;br&gt;The ultimate way to monitor if the keepalive is working is to get a netmon trace. You should be able to see the keepalive request and response on a idle connection or only keepalive request on a broken connection.</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#607800</link><pubDate>Fri, 26 May 2006 10:02:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:607800</guid><dc:creator>.agony</dc:creator><description>Yes, we did &amp;quot;serveral* restarts to ensure everything is loaded correctly.&lt;br&gt;Of course we can't ping the server - the cable is unplugged!&lt;br&gt;&lt;br&gt;We will test the keep-alive-packages with netmon. I'll post my results!&lt;br&gt;&lt;br&gt;Thanks</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#607921</link><pubDate>Fri, 26 May 2006 13:54:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:607921</guid><dc:creator>.agony</dc:creator><description>Ok, we testet if acknowledge-keep-alive-packages were sent.&lt;br&gt;The answer is: NO&lt;br&gt;&lt;br&gt;The server behaves like the client computer is online. It sends packages to the client with no responds, but did not disconnect the session.&lt;br&gt;&lt;br&gt;So, what could be the problem source? A missing service? Misconfiguration of the TCP protocol? &amp;nbsp;Something else?&lt;br&gt;&lt;br&gt;Suggestions?&lt;br&gt;&lt;br&gt;Meanwhile: thanks fot the assistance!&lt;br&gt;.agony</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#608264</link><pubDate>Fri, 26 May 2006 22:19:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:608264</guid><dc:creator>Nan Tu</dc:creator><description>&amp;quot;It sends packages to the client with no responds, &amp;quot; &lt;br&gt;&lt;br&gt;[nantu]This looks correct behavior if you unplug the calbe. &lt;br&gt;&lt;br&gt;&amp;quot;but did not disconnect the session. &amp;quot; &lt;br&gt;[nantu] can you see if the session is still alive by following query, &lt;br&gt;&lt;br&gt;&amp;quot;select session_id from sys.dm_exec_connections&amp;quot; to see the the session is closed. &lt;br&gt;&lt;br&gt;Otherwise, what is your OS version, is it xpsp2 or w2k3sp1? &lt;br&gt;&lt;br&gt;Do you have any third party antivirus software? If so, can you try without them. </description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#609881</link><pubDate>Mon, 29 May 2006 10:55:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:609881</guid><dc:creator>.agony</dc:creator><description>yes, the connections are still alive but no keep-alive packages are send to the client computers.&lt;br&gt;Currently my test server is on a xpsp2 computer with EZ Antivirus installed. Hopefully i get an w2k3sp1 server within the next two days.&lt;br&gt;Now I'll try to disable the antivirus software and post the results</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#609932</link><pubDate>Mon, 29 May 2006 11:58:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:609932</guid><dc:creator>.agony</dc:creator><description>ok, disabling the antivirus software was no solution. no different behaviour.</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#610577</link><pubDate>Tue, 30 May 2006 09:47:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:610577</guid><dc:creator>.agony</dc:creator><description>some other ideas?</description></item><item><title>Długotrwałe blokady a rozłączone sesje</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#2375774</link><pubDate>Wed, 02 May 2007 18:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2375774</guid><dc:creator>.:: strefa ::.</dc:creator><description>&lt;p&gt;Transakcyjność zgodna z założeniami wyrażonymi w popularnym akronimie ACID (Atomicity, Consistency, Isolation, Durability) w warunkach wsp&amp;#243;łbieżności i konkurencyjności o zasoby wymaga od silnika bazodanowego odpowiedniej obsługi blokad zasob&amp;#243;&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#3817415</link><pubDate>Wed, 11 Jul 2007 20:15:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3817415</guid><dc:creator>cory</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The article mentions that the tcp/ip keep-alive is NOT on by default on windows OS, but sql server uses it. &amp;nbsp;Is there a way to turn off tcp/ip keep-alive for SQL Server 2005? &amp;nbsp;Was tcp/ip keep-alive on or off for sql server 2000?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#4160935</link><pubDate>Wed, 01 Aug 2007 08:29:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4160935</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;When does the sql server issue the keepalive? Is it when it just finishes answering a query?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#4173827</link><pubDate>Wed, 01 Aug 2007 20:22:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4173827</guid><dc:creator>Nan Tu</dc:creator><description>&lt;p&gt;Keeplive is a TCP feature that SQL Server leverages to detect transport layer failure. In default setting of Windows operating system, it issues keepalive 30 seconds after the connection becomes idle.&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#8793491</link><pubDate>Thu, 31 Jul 2008 18:54:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8793491</guid><dc:creator>pvr_in_msdn</dc:creator><description>&lt;p&gt;Hi Nan Tu, &lt;/p&gt;
&lt;p&gt;What are the settings we need to enable KeepAlive through SqlServer2005. I know there is an option to configure thru Sql server Configuration Manager TCP/IP options. But is that fine or we need to set someting other than that. Please clarify.&lt;/p&gt;
&lt;p&gt;Thanks in Advance,&lt;/p&gt;
&lt;p&gt;Palani&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#8802560</link><pubDate>Sat, 02 Aug 2008 01:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8802560</guid><dc:creator>SQL Protocols</dc:creator><description>&lt;p&gt;Hi Palani,&lt;/p&gt;
&lt;p&gt;Sorry for the lack of clarity in the blog post. &amp;nbsp;SQL Server 2005 enables KeepAlive on all of its connections, and that is sufficient to put KeepAlive to use - there is no need to enable it elsewhere in the OS. &amp;nbsp;Other than to use SQL Server Configuration Manager to potentially change the parameters mentioned above, there should be no configuration necessary to get KeepAlive.&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;Dan Benediktson&lt;/p&gt;
&lt;p&gt;SQL Protocols&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#8841039</link><pubDate>Thu, 07 Aug 2008 16:26:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8841039</guid><dc:creator>praveen</dc:creator><description>&lt;p&gt;We have problem with SQL 2005 in our company. A script is being run to extract the data from SQL server and sometimes server drops the connection when script runs for more than an hour.&lt;/p&gt;
&lt;p&gt;Is there any setting that I can change so that connection will not be dropped.&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#8993467</link><pubDate>Fri, 10 Oct 2008 02:30:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8993467</guid><dc:creator>Peter</dc:creator><description>&lt;p&gt;How to use netmon to trace keepalive packets?&lt;/p&gt;
</description></item><item><title>Timeouts von SqlCommand vermeiden - Seite 2 | hilpers</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#9348474</link><pubDate>Tue, 20 Jan 2009 19:18:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9348474</guid><dc:creator>Timeouts von SqlCommand vermeiden - Seite 2 | hilpers</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.hilpers.com/1025277-timeouts-von-sqlcommand-vermeiden/2"&gt;http://www.hilpers.com/1025277-timeouts-von-sqlcommand-vermeiden/2&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#9547132</link><pubDate>Mon, 13 Apr 2009 21:32:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9547132</guid><dc:creator>B. H.</dc:creator><description>&lt;p&gt;some questions on this topic.&lt;/p&gt;
&lt;p&gt;Does it need to bounce the sql service after reconfig &amp;quot;keep alive&amp;quot; numbers in Sqlserver configuration manager?&lt;/p&gt;
&lt;p&gt;Do any of these window parameters, KeepAliveInterval and KeepAliveTime, should be set as well, as they don't seem to come with default setting in registry? In other words, if we only config sqlserver side, this feature will take effect as well?&lt;/p&gt;
&lt;p&gt;Also heard a workaround to fix keealive problems by setting &amp;quot;Keep Alive&amp;quot; in sql server to 0, instead of default 30000. By doing this, is keepalive still working?&lt;/p&gt;
&lt;p&gt;Thanks so much&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#9846759</link><pubDate>Thu, 23 Jul 2009 23:56:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9846759</guid><dc:creator>David</dc:creator><description>&lt;p&gt;So what are the implications of increasing this number, lets say to an hour? Doesn't that mean I could potential run into port exhaustion or something on a busy system?&lt;/p&gt;
</description></item><item><title>re: Understand special TCP/IP property “Keep Alive” in SQL Server 2005</title><link>http://blogs.msdn.com/sql_protocols/archive/2006/03/09/546852.aspx#9895855</link><pubDate>Wed, 16 Sep 2009 16:39:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895855</guid><dc:creator>Amandeep</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sometimes we get this error below &amp;nbsp;when our application tries to write to database.&lt;/p&gt;
&lt;p&gt;ODBC ERROR: Thursday July 16 2009 16:51: 1&lt;/p&gt;
&lt;p&gt;SQLState[01000] NativeError[10054]&lt;/p&gt;
&lt;p&gt;[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionWrite (send()).&lt;/p&gt;
&lt;p&gt;Can this be due to 'keep Alive' settings on sql server 2005. Can you please throw some light on this error? we really appreciate any response from you.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;-Amandeep&lt;/p&gt;
</description></item></channel></rss>