How to perform an async distributed transaction among multiple SQL Server instances

245 views Asked by At

In the .NET ,where we have the flexibility to call multiple services at the same time with Task parallels concept. Considering a scenario where I have three different tasks , each task call different services.

For Example,

  • Task 1 service - post data in application DB
  • Task 2 service - post data in centralized DB
  • Task 3 service post data in Migration DB.

So assuming this three services executes in parallel, and Task 1 completed , but Task 2 services failed due some exception. so due to this I it to handled such that, task 1 should roll back the change. I need a proper solution, please let me know.

Two-phase commit can possible solve this.

0

There are 0 answers