<?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>Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx</link><description>There is a special partnership between System.Transactions and Sql Server 2005, and no, it is not the fact that we begged the Enterprise Services team to ship this feature on whidbey and it is not (only) the fact that this is the only way to get distributed</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Whidbey ADO.NET Delegated Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#181626</link><pubDate>Tue, 13 Jul 2004 11:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:181626</guid><dc:creator>Sumeet Kumar</dc:creator><description>Looks like tresting this feature requires the SQLServer 2005 Beta 2?&lt;br&gt;&lt;br&gt;Can you give a possible date for the SQL Server 2005 Beta 2 release?&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Whidbey ADO.NET Delegated Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#181702</link><pubDate>Tue, 13 Jul 2004 13:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:181702</guid><dc:creator>Bill</dc:creator><description>Very Cool!</description></item><item><title>re: Whidbey ADO.NET Delegated Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#181835</link><pubDate>Tue, 13 Jul 2004 16:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:181835</guid><dc:creator>Angel</dc:creator><description>Sumeet,&lt;br&gt;I believe (but have not verified) that you can test this with the current Sql Server 2005 express package. the reason I am not sure is that I heard something about DTC being left out of the express package but never heard the final word.&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://lab.msdn.microsoft.com/express/sql/"&gt;http://lab.msdn.microsoft.com/express/sql/&lt;/a&gt; &lt;br&gt;&lt;br&gt;I am sorry but I have not heard any official word on when the beta will be released.&lt;br&gt;&lt;br&gt;Bill,&lt;br&gt;Thanks! I may have made a mistake starting with system.transactions i see no end to the things I need to blog about this feature. the next blog will be something along the lines of &amp;quot;If delegation is so transparent why do you have to explain so much about it&amp;quot;</description></item><item><title>re: Whidbey ADO.NET Delegated Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#181844</link><pubDate>Tue, 13 Jul 2004 16:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:181844</guid><dc:creator>Angel</dc:creator><description>Sumeet,&lt;br&gt;&lt;br&gt;Looking throught the Sql 2005 Express documentation it sounds as if DTC is included but not configured by default.&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sseoverview.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sseoverview.asp&lt;/a&gt; &lt;br&gt;&lt;br&gt;&amp;quot;There are some minor changes to the startup of SQL Server Express. User databases are not automatically started, and DTC is not automatically initialized. &amp;quot;&lt;br&gt;</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#185885</link><pubDate>Sat, 17 Jul 2004 04:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:185885</guid><dc:creator>Sumeet Kumar</dc:creator><description>Angel,&lt;br&gt;&lt;br&gt;Thanks.&lt;br&gt;&lt;br&gt;I will try it out and let you know.&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#185890</link><pubDate>Sat, 17 Jul 2004 04:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:185890</guid><dc:creator>Sumeet Kumar</dc:creator><description>Angel,&lt;br&gt;&lt;br&gt;The SQL Express 2005 setup crashes when run on my Win 2003 machine with VS 2005 Beta 1 installed.&lt;br&gt;&lt;br&gt;Perhaps it requires the Express version of VS Products?&lt;br&gt;&lt;br&gt;Anyway, guess I will just wait for the Yukon beta 2.&lt;br&gt;</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#187668</link><pubDate>Mon, 19 Jul 2004 18:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:187668</guid><dc:creator>Angel</dc:creator><description>Summet,&lt;br&gt;&lt;br&gt;I am sorry to hear that, Visual Studio 2005 has Sql Express as one of the install options, did you try that?&lt;br&gt;&lt;br&gt;Angel</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#188724</link><pubDate>Tue, 20 Jul 2004 14:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:188724</guid><dc:creator>Sumeet Kumar</dc:creator><description>Yes, that too fails with this log:&lt;br&gt;&lt;br&gt;&amp;quot;&lt;br&gt;***EndOfSession***?***EndOfSession***?[07/20/04,20:01:50] SQL Server 2005 Express Edition Beta: [2] Component SQL Server 2005 Express Edition Beta returned an unexpected value.&lt;br&gt;***EndOfSession***&lt;br&gt;&amp;quot;&lt;br&gt;&lt;br&gt;Looks like something odd about my machine setup - perhaps because I had installed and uninstalled Yukon Beta 1 on the same o/s install.&lt;br&gt;&lt;br&gt;Sumeet&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#189352</link><pubDate>Wed, 21 Jul 2004 00:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:189352</guid><dc:creator>Angel</dc:creator><description>Sumeet,&lt;br&gt;&lt;br&gt;Definitelly sounds like a machine problem, I would be surprised if yukon beta2 will install any better, you may be better off either looking for a solution to this set up problem on the newsgroups or setting up a virtual machine to test these beta releases.&lt;br&gt;&lt;br&gt;Sorry,&lt;br&gt;Angel</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#195918</link><pubDate>Sun, 25 Jul 2004 08:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:195918</guid><dc:creator>Sumeet Kumar</dc:creator><description>Angel,&lt;br&gt;&lt;br&gt;Success!&lt;br&gt;&lt;br&gt;Whidbey Beta 1 and SQl Express installed fine on a new instalaltion of Windows 2003.&lt;br&gt;&lt;br&gt;I was able to run the scenario and verify that transactiosn created using SQL Express transactions created using  System.Transactions.TransactionScope  do not appear in ComponentServices.TransactionList unless another connection is opened with a diff connectiong string.&lt;br&gt;&lt;br&gt;However, performance with SQLExpress is lower than with SQL Server 2000, especially for opening the first connection, where it takes 5-6 times longer.&lt;br&gt;&lt;br&gt;I am using &amp;quot;localhost/SQLExpress&amp;quot; as the server. the connection string is:&lt;br&gt;&lt;br&gt;&amp;quot;Server=localhost\SQlExpress; Integrated Security='true'; Enlist='true'; Connection Timeout='90';Connection Lifetime='30'; Encrypt='false';  Packet Size='4096'; Persist Security Info='true'; Workstation ID='localhost'; Connection LifeTime='0'; Connection Reset='false'; Max Pool Size ='100'; Min Pool Size ='0'; Pooling='true'; &amp;quot;&lt;br&gt;&lt;br&gt;Also the purely local transaction does not seem to affect the performance of the command.execute - speed seems to be same with SQL Express v/s SQL Server 2000.&lt;br&gt;&lt;br&gt;Any tips to wring more performance out of this?&lt;br&gt;&lt;br&gt;Thanks</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#196394</link><pubDate>Sun, 25 Jul 2004 19:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:196394</guid><dc:creator>Angel</dc:creator><description>Sumeet,&lt;br&gt;Great to hear that you got it working, don't forget to enable msdtc &amp;quot;net start msdtc&amp;quot; to use this feature. I really can't comment on opening first connection speed, opening a connection via shared memory on the same machine should be fairly fast.&lt;br&gt;&lt;br&gt;I _can_ comment on your connection string. &lt;br&gt;&lt;br&gt;Connection Lifetime: this does not do what you think it does. Only use this connection string keyword when you are load balancing servers. &lt;br&gt;&lt;br&gt;Packet Size: SqlClient packet size default is 8k and again I would not touch it. &lt;br&gt;&lt;br&gt;Connection Reset: Don't turn of connection reset unless you are connecting to Sql Server 7 _and_ you know that you are not changing the state of the connection. Reset is very close to free on Sql 2000 and 2005.&lt;br&gt;&lt;br&gt;All of the other values (except Timeout) are defaults, you would think that it does not matter to add them but we need to check each connection string keyword against your security settings, I would not add any default values to your connection string. The final connection string should look like this:&lt;br&gt;&lt;br&gt;&amp;quot;Server=.\SQlExpress; Integrated Security='true'; Connection Timeout='90' &amp;quot;&lt;br&gt;&lt;br&gt;Hope this helps,&lt;br&gt;Angel</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#196395</link><pubDate>Sun, 25 Jul 2004 19:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:196395</guid><dc:creator>Angel</dc:creator><description>One more thing I forgot to add. If you are using more than one connection open in your transaction scope then the second connection open will automatically promote the transaction. Distributed transactions are very expensive, specially the first time arround. You can tell that a transaction has been promoted because it will appear in the transaction statistics.&lt;br&gt;&lt;br&gt;This may be the delay that you are seeing&lt;br&gt;</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#197882</link><pubDate>Tue, 27 Jul 2004 05:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:197882</guid><dc:creator>Sumeet Kumar</dc:creator><description>Angel,&lt;br&gt;&lt;br&gt;1) Thank you for the tips re the connection string.&lt;br&gt;&lt;br&gt;2) Also, then, one should try to ensure a connection in use in closed before a new one is opened to keep the transaction to a lightweight one.&lt;br&gt;&lt;br&gt;So if multiple commands have to be executed in parallel, (e.g. updating many rows in parallel to reduce server latency), one should use asynchronous command execution against the single open connection?&lt;br&gt;&lt;br&gt;3) After executing the sqlCommand, are these statements oK?&lt;br&gt;&lt;br&gt;  cmd.Cancel()&lt;br&gt;  cmd.Dispose()&lt;br&gt;&lt;br&gt;  cn.Dispose&lt;br&gt;&lt;br&gt;or should I replace the 3 lines with:&lt;br&gt;  cn.Close&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks a lot.</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#198661</link><pubDate>Tue, 27 Jul 2004 17:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:198661</guid><dc:creator>Angel</dc:creator><description>Sumeet.,&lt;br&gt;&lt;br&gt;2) No, it does not matter whether the first connection is open or closed, as soon as you open the second connection we will promote the transaction. The first connection will not really close, we place it in a subpool especially made for enlisted connections and it will continue being enlisted waiting for a commit or rollback.&lt;br&gt;&lt;br&gt;You can definitelly use MARS and Async to try to improve performance, if this means that you will not open a second connection at all it will be a definite win. If you end up promoting the transaction anyway it is probably not going to be worth the effort, and your code will suffer in terms of maintainability.&lt;br&gt;&lt;br&gt;3) I would not Cancel the command unless you really want to cancel a running command on the server. I would certainly encourage you to call Dispose on the command and on any other object that implements IDisposable. In this case Command.Dispose does not do anything meaningfull but it does not hurt. I would make sure that the cn.Close and/or cn.Dispose happens under all circumstances by placing the connection in a &amp;quot;using&amp;quot; block.</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#207974</link><pubDate>Wed, 04 Aug 2004 14:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:207974</guid><dc:creator>pk</dc:creator><description>Great stuff, but I'm still a little confused about when the automatic promotion occurs. I maybe wrong here, but currently if you open a connection with the same connection string you have a good chance or re-using the original connection. I'm assuming this &amp;quot;subpool&amp;quot; means that the specific connection can never be re-used until the transaction has completed (or whenever the clever optimized Tx stuff kicks in)...therefore *any* subsequent connection you open will automatically be promoted?&lt;br&gt;</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#208059</link><pubDate>Wed, 04 Aug 2004 16:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:208059</guid><dc:creator>Angel</dc:creator><description>PK,&lt;br&gt;&lt;br&gt;Great point! in the case discussed above we were opening two connections to two different servers, so it _really_ did not matter whether we closed the first connection or not. Does it make a difference if we use the exact same connection string?&lt;br&gt;&lt;br&gt;The answer is still no, if you start a transactionscope, open connection close connection open connection you will force promotion. Remember, the delegated transaction is for all purposes similar to a local transaction until it needs to get promoted. It is too hard to get a local transaction to work across two connections so for delegated transactions we effectively hijack the first connection in the distributed transaction subpool and force you to create a new connection on the second open call.&lt;br&gt;&lt;br&gt;You can try this by setting the Max Pool Size, if you set it to 1 you will not be able to open the second time.</description></item><item><title>Manejo de transacciones en ADO.NET 2.0</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#230392</link><pubDate>Thu, 16 Sep 2004 17:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:230392</guid><dc:creator>Tecnocrata Blog</dc:creator><description /></item><item><title>Manejo de transacciones en ADO.NET 2.0</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#230393</link><pubDate>Thu, 16 Sep 2004 17:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:230393</guid><dc:creator>Tecnocrata Blog</dc:creator><description /></item><item><title>Transaction Processing in ADO.NET 2.0 </title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#251360</link><pubDate>Wed, 03 Nov 2004 02:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:251360</guid><dc:creator>waterboy</dc:creator><description>Ping Back来自：blog.csdn.net</description></item><item><title>Lightweight Promotable Transactions, SqlDataReader and Commitment.</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#576670</link><pubDate>Sat, 15 Apr 2006 00:50:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:576670</guid><dc:creator>Data Access blog</dc:creator><description>Here's a small issue you may need to watch out for when using a System.Transactions transaction with...</description></item><item><title>re: Whidbey ADO.NET Promotable Transactions with System.Transactions &amp; Yukon</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#637622</link><pubDate>Tue, 20 Jun 2006 02:14:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:637622</guid><dc:creator>rape stories</dc:creator><description>Your article is prety nice. It's a pity that i didn't see it more later.</description></item><item><title>Luggage locks &amp;raquo; Transaction</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#5933490</link><pubDate>Tue, 06 Nov 2007 14:05:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5933490</guid><dc:creator>Luggage locks » Transaction</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.luggagelocks.net/transaction/11/"&gt;http://www.luggagelocks.net/transaction/11/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Blog about Bogart  &amp;raquo; Blog Archive   &amp;raquo; Lightweight Promotable Transactions, SqlDataReader and Commitment.</title><link>http://blogs.msdn.com/angelsb/archive/2004/07/12/181385.aspx#7264888</link><pubDate>Sun, 27 Jan 2008 14:51:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7264888</guid><dc:creator>Blog about Bogart  » Blog Archive   » Lightweight Promotable Transactions, SqlDataReader and Commitment.</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://bogartfin.breastbondagenewsank.com/2008/01/27/lightweight-promotable-transactions-sqldatareader-and-commitment/"&gt;http://bogartfin.breastbondagenewsank.com/2008/01/27/lightweight-promotable-transactions-sqldatareader-and-commitment/&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>