将不确定变为确定~transactionscope何时提升为分布式事务?(sql2005数据库解决提升到MSDTC的办法)_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > 将不确定变为确定~transactionscope何时提升为分布式事务?(sql2005数据库解决提升到MSDTC的办法)

将不确定变为确定~transactionscope何时提升为分布式事务?(sql2005数据库解决提升到MSDTC的办法)

 2013/12/3 12:26:05  张占岭  博客园  我要评论(0)
  • 摘要:回到目录对于transactionscope不了解的同学,可以看我的相关文章第二十六回将不确定变为确定~transactionscope何时提升为分布式事务?第二十七回将不确定变为确定~transactionscope何时提升为分布式事务~续第二十八回将不确定变为确定~transactionscope何时提升为分布式事务~再续(避免引起不必要的MSDTC
  • 标签:解决 数据库 数据 SQL 2005

回到目录

对于transactionscope不了解的同学,可以看我的相关文章

 

二十六回   将不确定变为确定~transactionscope何时提升为分布式事务?

class="postTitle2">第二十七回   将不确定变为确定~transactionscope何时提升为分布式事务~续

第二十八回   将不确定变为确定~transactionscope何时提升为分布式事务~再续(避免引起不必要的MSDTC)

第二十九回   将不确定变为确定~transactionscope何时提升为分布式事务~大结局

第三十七回   将不确定变为确定~transactionscope何时提升为分布式事务~SQL2005与SQL2008不同

对于sql2008已经很好的支持了transactionscope,而对于sql2005来说,支持的不是很好,它将多个savechanges()方法提升为分布式事务msdtc,它不管你是否为一个数据库,真是无奈了!还好,最好找到了解决方法,下面图所示,将多个insert,update包裹到一个transactionscope里,所产生的结果如下:

JSsGZL5v1SynaLE5q1D+Le4HratLEJaxuc1/n/x9Xx34zpRKJorspLAF0ytbL9xlUc30hrOKVdNOAHaCVsYsWMVKqx2F6PLUJZiVKGSrOofPfyxXD3kyL9mcPnRWnkSSah+O+a21oVgZ4XK5lzqnspMbFd2MsMwmMld1oQh9ss9XwLW6GFQ29++XNZQFJ9UDjUrYkFPs2YL9TxNoWil7JZ8KYe6M5hE1ZrO6UYkr1comlNUFIqkI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skL5qFIv4ztzqNcqVB4hOTuN47wHeYWCT3mnqOZQ4cQf6VO+Vzy+rfiDmVN4gwN6ME1P91baFCp6WQthVAN1JXeZV7TU7TixZaK+J3tDz1SoKEJ6dlrGeR/y9/LgU94pqvtQZ/Ap3zEeN2Uuw0C2mehdsLIDeqhHB3l1c5hX50nHgRVynDiz8G/iC7hObUfiD4a0dK380Rt588a9vI2zUx3n/IVjbUeqCnX3koBP+Zlw+L28rn3Kuw7+Ef7IX2wCR+BwhSKEdzj4EKFQonA+hQLBhwiFEgUoFCiMUChRgEKBwgiFEgUoFCiMUChRgEKBwkieHD7ahxgEQbBE5FB9wyKHAmUxm9JQqL4BhQKFMZvS/wfc8hpH+sg0GAAAAABJRU5ErkJggg==" alt="" />

当然,我们的计算机中,并没有开启msdtc服务,有图有真像

HqlP/edWp//zhqe/88BHv/MgR7/zIEe9abdq7Vpv27tWmvfujR777o0f+y+pH/svqR71njaPes8bR71nz6H9d8+h/XXP6e9ea/t61pr937WP+be1j/m2dY963zoz3rTPjfevO+Pd1j/339Y59/3rHvn/9496//nH/sf5x/7HB8f+5wfH/ueHxy2w4XGZiuMzECctOnLDsRicst9GJy2184nIbn7j8JjOX32TmCpvMXGHTk1bY9KQPfOykD3zs5BU3O3nFzU5ecfNTPrj5KR/c/JSVtjh1pS1OXenjp6388dNW3vK0VbY8fZUtT19lq9M/tNWsD31i1qqfmLXqJ8/4sOFTZ37kU2d+ZOszV9v6rNW2OWu1bc766DZnf3Tbs1ff9uzVP33O6p8+Z43tZq+x3ew1t5u95mfOXfMz5661/blrbT9n7c/OWfuzc9be4bx1djhvnR3OW3fHuevuOHfdneaut9P56+18/vo7n7/+zhds8LkLNvjchRvscuGGu1y44ecvmjDsOm+jXedt9IV5G3/h4o13u3jj3S7eZLf5m+w+f9Pd52+6xyWb7nHJx/a85GN7LthszwWb7bVgs70u3XzvSzffe+EWX1y4xRcXbrHPZR/f57KP73PZlvsu2nLfRVvtt2ir/S7fav/LP7H/5Z/Y/4pPHnDFJw+44pMHXvmpA6/81JQrt55y1dZTrtr6oKu3OejqbQ6+etuDr9n2kGu2PeSaTx9y7acPvXa7Q6/d7rDrtjvsus8cft1nDr9++8Ov337q9dtPveGzR9zw2SNu2GHajTtMu3HHaTfueORNOx55005H3bzTUTfvfPTNOx99y87Tb/nc9Fs+N/1LuxzzpV2O+dIuM279/IxbP3/srbsee9uux96263G3feG4279w/O27HX/7bsMv7zb88u7DO3Y/4Y49TrhjjxPv3OPEO/eceeeeM+/aa+Zde510194n3b33yXfvffLdXzzlni+ecs8+p9yzz6n37nPqvfuedu++p31lv9O/st/p9+036779Z923/6z7Dzjj/gPOuP+AMx848MwHDjzrgSlnPTjlrAennP3gQWc/dNA5Dx18zkMHz3744NkPHzL74UPOfeTQcx85dM4jh8159LDzHj3svMcOP++xw+c+NnXu41PPf3zq+Y8fccETR1zwxLQLnph24ZPTLnzyyIuePPKixUfNW3zUvMVHXfzU0Rc/dfTFT02f/9Xp8786/ZKvHXPJ145Z8LUZC74+Y8HXZ1z69WMv/caxC79x3MJvHHfZfx1vWPTN4aJvDi//5gmXf+uEK751whXfOvGKb5945bdnXvntmVd9Z+ZV3znp6u+edPV3T776uydfk518TXbKtdkp137v1Ou+d+p13zv1+u+fdv33T7v++6ff8IPTb/jB6Tf+YNaNP5x10w/PuOmHZ9z032fe/N9n3vyjM2/50Vm3/OisL/3P2YZbf3zOrT8+57Yfz77tJ7Nv/8ns239y7u0/PffLP53z5Z/OueNnc+742Xl3/uy8O38+986fz73r53Pv+sX5d//i/Lt/ecE9v7zgnl9ecO+vLrz3Vxfe+6uLvvL0RV95et59T8+779fz7v/1xff/+uL7fzP/gd/Mf+A38x985pIHn7nkoWcWPPTbBQ/9dsHDz1768LOXPvLswkd+t/DR3y189HeXPfrcZY89t+ix5xY9/vyix5+//InnL3/i91c88fsrnvz9FU/+4crFf7hy8R+ueuqPVz31x6u/+qfSQGQQGUQGkUFkEBlEBpFBZPWJrNBzsYmJCYgMIoPIJonMrA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infrastructure.IObjectContextAdapter)Db).ObjectContext;
            try
            {
                objectContext.Connection.Open();
                using (TransactionScope trans = new TransactionScope())
                {
                insert1();
                insert2();
                }
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                objectContext.Connection.Close();
            }

OK,我们将上面代码进行一个封装,让它访问起来更方便一些,看代码:

 /// <summary>
    /// 对TransactionScope,让它对同一个数据库不产生msdtc服务
    /// </summary>
    public class TransactionScopeNoMsdtc
    {
        /// <summary>
        /// 产生包裹事务
        /// </summary>
        /// <param name="db"></param>
        /// <param name="action"></param>
        public static void UsingNoMsdtc(DbContext db, Action action)
        {
            var objectContext = ((System.Data.Entity.Infrastructure.IObjectContextAdapter)db).ObjectContext;
            try
            {
                if (objectContext.Connection.State == System.Data.ConnectionState.Closed)
                    objectContext.Connection.Open();
                using (TransactionScope trans = new TransactionScope())
                {
                    action();
                }
            }
            finally
            {
                objectContext.Connection.Close();
            }
        }
    }

在使用时,我们可以这样来做,不用TransactionScope,而是用TransactionScopeNoMsdtc呵呵。

   EntityFrameworks.Data.Core.TransactionScopeNoMsdtc.UsingNoMsdtc(Db, () =>
            {
            insert1();
            insert2();
            });

感谢阅读!

回到目录

发表评论
用户名: 匿名