I have some doubts related to transactions in SQL. I perform below steps.
- Connection 1 open for DB1 database
- Begin transaction for Connection 1
- Run the commands on Connection 1
- Connection 2 open for DB2 database
- Begin transaction for Connection 2
- Run the commands on Connection 2
- Commit transaction for Connection 2
- Commit transaction for Connection 1
If commit transaction on Connection 1 fails(rollback) then transaction on connection 2 should rollback. Is it possible? How it can be done?