MSDTC on server 'server is unavailable'

后端 未结 6 1917
我在风中等你
我在风中等你 2020-12-08 08:58

I get this weird error on SQL Server. And I cannot find solution in older posts.

I have this procedure:

create proc _upJM_SyncAll_test
as
begin
             


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 09:48

    In my case I had a named instance of Microsoft SQL Server at a remote server and the error output of my application looked like this:

    System.Data.SqlClient.SqlException (0x80131904): MSDTC on server 'SERVER\INST_NAME' is unavailable.
    

    Experimenting with the SQL connection string, such as replacing the SERVER\INST_NAME with SERVER,TCP_PORT_NUMBER did not help. I was still getting the same error and I decided to install a default instance (MSSQLSERVER) so that the SQL Server name became SERVER only. This solved the problem as the RPC and MSDTC started resolving the name.

提交回复
热议问题