事务管理器 [英] Transaction manager

查看:314
本文介绍了事务管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用的.Net System.Transactions.TransactionScope类跨多个表的事务中的Oracle数据库,其中一个将被用于LTM [轻量级事务管理器]或MSDTC [Microsoft分布式事务处理协调器]

If I use .Net System.Transactions.TransactionScope class for a transaction across multiple tables in Oracle database, which one will be used LTM[Lightweight transaction manager] or MSDTC[Microsoft distributed transaction coordinator]?

有没有规则或策略beind的场景,决定使用哪一个是什么时候? 请指教。 另外,想知道什么时候是两阶段提交用?只有它曾经在多个数据库?

Is there any rule or strategy beind the scenes for deciding which one to use and when? Please advise. Also, wanted to know when is 2-phase commit used?Is it used only incase of distributed transactions across multiple databases?

感谢。

推荐答案

拇指的基本规则是,一个事务的资源(如数据库,队列,消息引擎,文件系统等)将选择最便宜的,最轻的事务处理协调器(TC),其知道的。

The basic rule of thumb is that a transacted resource (e.g. DB, queue, messaging engine, file-system, etc) will select the cheapest and lightest Transaction Coordinator (TC) that its aware of.

MSDTC(或第三方替代方案)仅是一般调用时交易跨越多个物理设备(这需要一个分布式TC - DTC),或者,如果他们跨越多个资源,其中一人只理解MSDTC

MSDTC (or a 3rd party alternative) is only generally invoked when transactions span multiple physical boxes (this requiring a Distributed TC - DTC) or if they span multiple resources, one of whom only understands MSDTC.

有关完全在一个特定的服务器应用程序的交易,有机会,他们会用自己的内部TC或使用可他们正在运行的平台上最廉价的TC。

For transactions entirely within a particular server app, chances are that they'll use their own internal TC or use the cheapest TC available on the platform they're running on.

Vista中/ Server2008中引入了内核事务监控器(KTM),它提供了一个非常快速的上箱TC。 System.Transactions的将使用KTM(如果可用),但如果没有(例如:在XP / Server2003的运行时),将调用MSDTC。

Vista/Server2008 introduced the Kernel Transaction Monitor (KTM) which provides a very fast on-box TC. System.Transactions will use KTM if available but if not (e.g. when running on XP/Server2003), will invoke MSDTC.

KTM允许一个,例如,更新数据库,一些(NTFS)文件和一个MSMQ队列,所有位于同一物理设备,而不需要(更贵)的分布式事务。

KTM allows one to, for example, update a DB, some (NTFS) files and an MSMQ queue that all reside on the same physical box without requiring a (more costly) distributed transaction.

唉,一些较老的软件不知道KTM,并可以调用MSDTC超出其本地范围内的事务招募时。

Alas, some older software is not aware of KTM and may invoke MSDTC when enlisting in a transaction beyond its local scope.

这篇关于事务管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆