惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News - Newest:
Hacker News - Newest: "LLM"
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
N
News and Events Feed by Topic
T
Troy Hunt's Blog
PCI Perspectives
PCI Perspectives
W
WeLiveSecurity
N
News | PayPal Newsroom
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V2EX - 技术
V2EX - 技术
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threat Research - Cisco Blogs
L
LINUX DO - 热门话题
Cloudbric
Cloudbric
S
Secure Thoughts
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
Y
Y Combinator Blog
L
LangChain Blog
Recorded Future
Recorded Future
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 聂微东
Attack and Defense Labs
Attack and Defense Labs
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
小众软件
小众软件
H
Hacker News: Front Page
The Hacker News
The Hacker News
T
Tailwind CSS Blog
The Register - Security
The Register - Security
Hacker News: Ask HN
Hacker News: Ask HN
P
Privacy & Cybersecurity Law Blog
P
Palo Alto Networks Blog
S
Securelist
腾讯CDC
雷峰网
雷峰网
G
Google Developers Blog
The Cloudflare Blog
Google DeepMind News
Google DeepMind News
P
Privacy International News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
Arctic Wolf
www.infosecurity-magazine.com
www.infosecurity-magazine.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
量子位
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
阮一峰的网络日志
阮一峰的网络日志
AI
AI

博客园 - 狂歌

关闭easyui Tabs,有意思的JS异步处理 vscode新版1.31.1使用代码检查工具ESlint支持VUE Easyui combotree 获取自定义ID属性方法 [原创]消灭eclipse中运行启动的错误:“找不到或无法加载主类”问题 [转]【Java】内部类(Inner Class)如何创建(new) spring boot项目编译出来的jar包如何更改端口号 [转] 分享一个快的飞起的maven的settings.xml文件 [转]maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test mysql字符集问题 错误代码: 1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_croatian_ci,IMPLICIT) for operation '=' WebApi 返值的实体值前缀加了个下划线 VS2015 异常 :遇到异常。这可能是由某个扩展导致的 【转】WebAPI使用多个xml文件生成帮助文档 ASP.Net WebAPI中添加helppage帮助页面 C# List泛型转换,int,string 转字符,转数组 jquery.easyui.tabs 中的首个tabs被最后tabs覆盖的问题解决方法 解决easyui jQuery JS的for循环调用ajax异步问题 php网站环境无法上传的解决办法? 提高VM运行速度 [转]SQL2005系统升级手记之一-解决sa帐户被锁定
iBatisNet分布式事务的应用 MS SQL2008。
狂歌 · 2015-07-07 · via 博客园 - 狂歌

所谓分布式事务,即多台数据库服务器在一个事务中运行,因此至少两台及以上的数据库服务器。

一、所有数据库服务器必须配置好MSDTC。

如何配置请大家搜索“MSDTC配置”即可。

大至的配置为:

1、开启135端口

2、c:\windows\system32\msdtc.exe设置防火墙为例外

3、开启“MSDTC”

运行:dcomcnfg.exe

组件服务-》我的电脑-》Distributed Transaction Coordinator-》右键"本地DTC"-》安全(所有的必须钩上、帐户名最好使用“NT AUTHORITY\NetworkService”)

4、进入WIDNOWS服务管理开启一些必要的服务

开启:Distributed Transaction Coordinator、Distributed Link Tracking Client、MSSQL服务、MSSQL代理服务

5、启动MSDTC

开始-》运行-》CMD-》net start msdtc

6、数据库开启分布式事务

数据库属性-》连接-》钩上“需要将分布式事务用于服务器到服务器的通讯”

二、代码部分

using IBatisNet.Common.Transaction;

/// <summary> /// 分布式事务示例 /// </summary> public static void InsertTransactionScpeTest() { try { using (TransactionScope transaction = new TransactionScope()) { //注:以下多个为链接多个数据库服务器。 插入A数据库方法();
插入B数据库方法(); transaction.Complete(); } }
catch (Exception ex) { throw ex; } }