Patent ID: 8626709

Claim:
A method of replicating a relational database comprising: receiving, by a primary database and a primary replication agent of the primary database, at least one database write statement from a client; receiving by a secondary replication agent of a secondary database, the at least one database write statement from the primary replication agent; storing the database write statement to a transaction log at the secondary replication agent; sending, by the primary replication agent, the prepare message to the secondary replication agent; sending, by the secondary replication agent, an acknowledgment of the prepare message to the primary replication agent; sending, by the primary replication agent, an acknowledgment of the prepare message to the client; receiving, by the primary database, a first commit message from the client; receiving, by the primary replication agent, a second commit message from the client upon determination that the first commit message has been successfully performed at the primary database; sending, by the primary replication agent, the second commit message to the secondary replication agent; sending, by the secondary replication agent, an acknowledgment to the primary replication agent; sending, by the primary replication agent, an acknowledgment to the client; asynchronously performing, by the secondary replication agent, the at least one database write statement on the secondary database.