Entity Framework stored procedure linked server Issue

0

We are baking T-SQL stored procedure s/views in EF migrations (model below) so no one has to be on release night and it's been working fine until now. The stored procedure is manually created with no issues in SSMS, but when the migration is run by the build server, we get the errors shown below.

I was a googling monkey on this but didn't run across anything relevant. Anyone run into this before?

Thanks in advance,

Steve

System.Data.SqlClient.SqlException (0x80131904): The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "LinkedServer" was unable to begin a distributed transaction.

OLE DB provider "SQLNCLI11" for linked server "LinkedServer" returned message "The partner transaction manager has disabled its support for remote/network transactions.".

Code:

partial class SomeMigrationID : DbMigration
{
            public override void Up()
            {
                        Sql(@"DROP PROC IF EXISTS dbo.SomeProcName");
                        Sql(@"
                        CREATE PROC dbo.SomeProcName
                        @SomeParameter int
                        AS
                        BEGIN
                        SELECT 
                                    Column1,
                                    Column2,
                                    Column3
                        FROM dbo.vwViewOnLocalServerThatPointsToAnotherServerNoChoice
                        WHERE SomeColumn = @SomeParameter
                        END");
        }
}
sql-server
entity-framework
tsql
asked on Stack Overflow Dec 17, 2020 by Steve Sc AZ • edited Dec 18, 2020 by Steve Sc AZ

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0