I need to run custom sql script during the Entity Framework migration. Script:
exec sp_executesql N'create view VIEW_TS_Shops as select * from openquery([TS-SQL], ''select * from Shops'')'
Migration fails with error message:
System.Data.SqlClient.SqlException (0x80131904): The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "TS-SQL" was unable to begin a distributed transaction. OLE DB provider "SQLNCLI10" for linked server "TS-SQL" returned message "The partner transaction manager has disabled its support for remote/network transactions."
My attempts to solve the problem are listed below.
No result. How can I fix it?
UPDATE
My solution with argument "suppressTransaction" is working, but I forgot to specify it for all SQL instructions that operate on the view.
User contributions licensed under CC BY-SA 3.0