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");
}
}
User contributions licensed under CC BY-SA 3.0