Azure Pipeline Deployment - Linked Server and DTC Error

EDempsterEDempster Posts: 2 New member
edited June 20, 2023 2:56PM in SQL Source Control
I have a database managed by SQL Source Control that is being deployed to servers using an Azure Pipeline (with code in Azure DevOps). The target database is an Azure SQL Managed Instance. Recently, I've added a stored procedure that queries another server using a linked server. With this addition, the build succeeds, but the deployment fails with the following message.

The error 'Import of Microsoft Distributed Transaction Coordinator (MS DTC) transaction failed: 0x80070057(The parameter is incorrect.).' occurred when executing the following SQL:
....

I don't receive this message when I deploy the stored procedure using SQL Compare 15 with the SQL Source Control code as the source.

Is there a flag I need to set in the pipeline task to emulate SQL Compare, not to import MSDTC?

Best Answer

  • EDempsterEDempster Posts: 2 New member
    Sorry, this one was staring me in the face, and I didn't see it. 

    Adding NoTransactions to the SQLCompareOptions in the task fixed the issue.

Answers

Sign In or Register to comment.