What is a “distributed transaction”?

Usually, transactions occur on one database server: BEGIN TRANSACTION SELECT something FROM myTable UPDATE something IN myTable COMMIT A distributed transaction involves multiple servers: BEGIN TRANSACTION UPDATE amount = amount – 100 IN bankAccounts WHERE accountNr = 1 UPDATE amount = amount + 100 IN someRemoteDatabaseAtSomeOtherBank.bankAccounts WHERE accountNr = 2 COMMIT The difficulty comes from … Read more

What is the ‘best’ way to do distributed transactions across multiple databases using Spring and Hibernate

The best way to distribute transactions over more than one database is: Don’t. Some people will point you to XA but XA (or Two Phase Commit) is a lie (or marketese). Imagine: After the first phase have told the XA manager that it can send the final commit, the network connection to one of the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)