现在的位置: 首页 > 综合 > 正文

Distributed Database and Distributed Transaction

2013年11月24日 ⁄ 综合 ⁄ 共 859字 ⁄ 字号 评论关闭

 

The distributed database consists of a collection of data with different parts under the control of separate DBMS, running an independent computer system.

A distributed transaction includes one or more statements that, individually or as a group, update data on two or more distinct nodes of a distributed database.

Two-phase commit (2PC).

With a two-phase commit protocol, the distributed transaction manager employs a coordinator to manage the individual resource managers.

Prepare phase: Each participating resource manager coordinates local operations and forces all log records out: If successful, respond "OK". If unsuccessful, either allow a time-out or respond "OOPS"

Commit phase: If all participants respond "OK": Coordinator instructs participating resource managers to "COMMIT". Participants complete operation writing the log record for the commit. Otherwise: Coordinator instructs participating resource
managers to "ROLLBACK". Participants complete their respective local undos.

抱歉!评论已关闭.