Would transaction work across multiple DB in the same SQL server? If so, is this a Distributed transaction?

15,542

Solution 1

A transaction across multiple DBs in the same instance is a local transaction. BEGIN TRANSACTION will work just fine.

Solution 2

Just tested it. BEGIN TRANSACTION works as expected across two databases on the same server.

Share:
15,542
Henry
Author by

Henry

Updated on June 28, 2022

Comments

  • Henry
    Henry almost 2 years

    Would transaction work across multiple DB in the same SQL server? If so, is this a Distributed transaction? or would basic BEGIN TRANSACTION work?