<?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>ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx</link><description>ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ Q: What is MARS? A: MARS is a new feature in ado.net 2.0 and Sql Server 2005 that allows for multiple forward only read only result sets. EDIT There is a great article</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#229145</link><pubDate>Tue, 14 Sep 2004 01:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:229145</guid><dc:creator>Peter</dc:creator><description>Angel,&lt;br&gt;&lt;br&gt;Can you explain why you are not supporting MARS inside in SQLCLR? &lt;br&gt;&lt;br&gt;It will make porting code harder, and as there's no SqlResultset it won't be possible to have a clean way of having two open SQL statements in the same CLR stored proc. One option is to use SqlClient from SQLCLR (aargh) and the other is to use the cursor API with T-SQL statements (ugggh), which is the same as SqlResultsets but harder.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#229584</link><pubDate>Tue, 14 Sep 2004 19:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:229584</guid><dc:creator>Angel</dc:creator><description>Peter,&lt;br&gt;I don't think I can really explain it other than to reiterate that this feature has been much much harder to do than you would think. I would expect this feature to be considered for a later release of the SQLCLR provider. &lt;br&gt;&lt;br&gt;Tahnks for your feedback&lt;br&gt;Angel</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#229926</link><pubDate>Wed, 15 Sep 2004 14:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:229926</guid><dc:creator>Andres Aguiar</dc:creator><description>Angel,&lt;br&gt;&lt;br&gt;We are currently caching our SqlCommands in the TLS. Does this 'Session Pool' feature do the same thing? I mean, should we stop caching SqlCommands for Whidbey?&lt;br&gt;</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#230038</link><pubDate>Wed, 15 Sep 2004 18:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:230038</guid><dc:creator>Angel</dc:creator><description>Andres,&lt;br&gt;Pre-whidbey creating a new SqlCommand is practically free, I am going to have to assume that if you saw the need to cache them then it must have something to do with your exisiting architecture so I cannot know if Session Pooling will provide the same benefits.&lt;br&gt;&lt;br&gt;The reason this feature was implemented is because there is a not insignifcant cost associated with using a SqlCommand in whidbey. On the client we must associate it with a session on the server, on the network layer they need to multiplex the TDS buffer for it and on the server create a new session. We found that the only way to keep performance was to pool these expensive commands (up to ten of them only, no knobs). Now when you open a connection and create a few commands for the first time it will be much slower than in v1.1, but as long as you keep the connection arround (either yourself or by relying on pooling) it will continue to reuse these cached commands. Of course this means that if you use more than 9 commands per connection you are going to notice a performance drop. &lt;br&gt;&lt;br&gt;Angel</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#230046</link><pubDate>Wed, 15 Sep 2004 18:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:230046</guid><dc:creator>Andres Aguiar</dc:creator><description>OK.&lt;br&gt;&lt;br&gt;We reused commands with the .Text and parameters set, to avoid creating the parameters each time, etc. Our key in the cache is the sql statement.&lt;br&gt;&lt;br&gt;We reuse the commands in multiple connections, but this new session cache seems to be related to caching commands in the same connection so it's probably different.&lt;br&gt;&lt;br&gt;</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#230055</link><pubDate>Wed, 15 Sep 2004 18:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:230055</guid><dc:creator>Angel</dc:creator><description>Andres,&lt;br&gt;I see, yes completelly different. this caching has nothing to do with text and parameters and it will not affect your current architecture. We are caching the underlying resource that has become the MARS enabled SqlCommand and it is as transparent to the implementation as connection pooling.&lt;br&gt;&lt;br&gt;I will get a blog on this going in the next few days, but the basic idea goes something like this:&lt;br&gt;&lt;br&gt;open connection&lt;br&gt;create command and execute it //command creation is very expensive now.&lt;br&gt;close connection //connection goes back to pool, command goes to session pool.&lt;br&gt;&lt;br&gt;open connection //same connection as above, retrieved from pool&lt;br&gt;create command and execute it //we use the cached command instead of creating a new one. No performance penalty.&lt;br&gt;&lt;br&gt;In your scenario you can associate your cached command to the second connection just as you do today and get the benefit of session pooling transparently.</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#230090</link><pubDate>Wed, 15 Sep 2004 19:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:230090</guid><dc:creator>Bill Vaughn</dc:creator><description>Angel, you say that the &amp;quot;qintessential&amp;quot; MARS configuration uses the same connection to post changes to the server while you're reading a DataReader. Yes, I can see how this would be appealing, but wouldn't it make more sense to do this processing on the server in TSQL (or CLR)? Moving data to the client to do logic-driven updates has always been frowned on. Now that one can code CLR-based logic the opportunity to do far more sophisticated logic-driven operations on the server makes more sense than ever.&lt;br&gt;&lt;br&gt;I'm also somewhat disturbed by the performance hit we're having to take (by default) to participate in MARS when not a single application that exists today uses it. I think the default behavior should disable MARS unless specifically called for.&lt;br&gt;&lt;br&gt;Performance in Whidbey is bad enough as it is without adding needless overhead for features we don't need except in special cases (which I have yet to see).</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#230129</link><pubDate>Wed, 15 Sep 2004 21:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:230129</guid><dc:creator>Angel</dc:creator><description>Bill,&lt;br&gt;Great comment! I completely agree with you, I am not quite sure I understand the people who dislike stored procedures (I guess I have not met their DBAs...). &lt;br&gt;&lt;br&gt;The fact remains that this feature has been specifically requested by some of our most important partners to do exactly this type of logic driven updates. &lt;br&gt;&lt;br&gt;The performance hit is not “By Default” per se, since there is no way to avoid it. Setting MultipleActiveResultSets=false does not perform better, it just throws an exception if you attempt to use MARS. Yes this is definitely disturbing but keep in mind that this is only a one time set up cost per connection in pooled scenarios.&lt;br&gt;</description></item><item><title>Pozn</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#268439</link><pubDate>Tue, 23 Nov 2004 16:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:268439</guid><dc:creator>ISlavoF.Save()</dc:creator><description /></item><item><title>Ado.net 2.0 Mars Session Pooling. (aka stuff you don't need to know.)</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#352719</link><pubDate>Fri, 14 Jan 2005 08:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:352719</guid><dc:creator>Angel Saenz-Badillos </dc:creator><description /></item><item><title>Ado.net 2.0 Mars Session Pooling. (aka stuff you don't need to know.)</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#353291</link><pubDate>Sat, 15 Jan 2005 01:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:353291</guid><dc:creator>Angel Saenz-Badillos </dc:creator><description /></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#628178</link><pubDate>Mon, 12 Jun 2006 17:23:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:628178</guid><dc:creator>shafi</dc:creator><description>what is sqlservercursor? &amp;amp; Ado.net cursors?</description></item><item><title>re: ADO.NET 2.0 Multiple Active Resut Sets per connection in Sql Server 2005 (MARS) FAQ </title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#628180</link><pubDate>Mon, 12 Jun 2006 17:23:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:628180</guid><dc:creator>shafi</dc:creator><description>nothing</description></item><item><title>Resources from geekSpeak webcast - Data with Mark Dunn</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#761172</link><pubDate>Tue, 19 Sep 2006 00:01:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:761172</guid><dc:creator>geekSpeak</dc:creator><description>Thanks for attending the webcast. We intended to also have&amp;amp;amp;nbsp;Shawn Wildermuth (ADO Guy) on the webcast...</description></item><item><title>Commands are from Venus, Queries are from MARS &amp;laquo; .Net FX3 By Jayesh Chudasama</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#769642</link><pubDate>Mon, 25 Sep 2006 01:05:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:769642</guid><dc:creator>Commands are from Venus, Queries are from MARS « .Net FX3 By Jayesh Chudasama</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://dotnetfx3.wordpress.com/2006/09/24/commands-are-from-venus-queries-are-from-mars/"&gt;http://dotnetfx3.wordpress.com/2006/09/24/commands-are-from-venus-queries-are-from-mars/&lt;/a&gt;</description></item><item><title>The Multiple-Record Set Problem &amp;laquo; Will SQL for food, will blog for free</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#7663560</link><pubDate>Wed, 13 Feb 2008 07:54:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7663560</guid><dc:creator>The Multiple-Record Set Problem « Will SQL for food, will blog for free</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://willsql4food.wordpress.com/2008/02/13/the-multiple-record-set-problem/"&gt;http://willsql4food.wordpress.com/2008/02/13/the-multiple-record-set-problem/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>net ado net seeing connection string</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#8567054</link><pubDate>Sat, 31 May 2008 22:45:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8567054</guid><dc:creator>net ado net seeing connection string</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://laci.stocknewsdigest.info/netadonetseeingconnectionstring.html"&gt;http://laci.stocknewsdigest.info/netadonetseeingconnectionstring.html&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Exigency In Specie / A Problem with Fake MARS</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#9138387</link><pubDate>Mon, 24 Nov 2008 21:53:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9138387</guid><dc:creator>Exigency In Specie / A Problem with Fake MARS</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.peat.me.uk/2008/03/07/a-problem-with-fake-mars/"&gt;http://www.peat.me.uk/2008/03/07/a-problem-with-fake-mars/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Angel Saenz Badillos ADO NET 2 0 Multiple Active Resut Sets per | Paid Surveys</title><link>http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx#9683928</link><pubDate>Tue, 02 Jun 2009 09:55:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9683928</guid><dc:creator> Angel Saenz Badillos ADO NET 2 0 Multiple Active Resut Sets per | Paid Surveys</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://paidsurveyshub.info/story.php?id=75970"&gt;http://paidsurveyshub.info/story.php?id=75970&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>