title: linked server : "No transaction is active." and "unable to begin a distributed transaction"
body: <p>I have a CRM software on my local machine. In the SQL DB of the software, I added a linked server (our test website with our test DB: Windows Small Business Server 2011).
  The linked server is set as</p>
  
  <pre><code>RPC =&gt; True
  RPC Out =&gt; True
  Enable Promotion of Distributed Transaction =&gt; True
  </code></pre>
  
  <p>I created a trigger so that when a company is updated through the CRM software, it launches a stored procedure such as:</p>
  
  <pre><code>proc [dbo].[Proc_UpdateInstitutionWeb]
  @Company_ID nvarchar(50)
  
  as
  
  DECLARE @id int = 0;
  
  BEGIN TRY
      SET @id = CONVERT(int, @Company_ID)
  END TRY
  BEGIN CATCH
      ...
  END CATCH
  
  update [myserver].[mydatabase].[dbo].[company] 
  set founded = 2000
  where company.id= @id
  </code></pre>
  
  <p>This does not work when I do the change in the CRM. So I tried a simple update query on the company table in the CRM SQL DB but it throws the following error:</p>
  
  <p><code>OLE DB provider "SQLNCLI10" for linked server "myserver" returned message "No transaction is active.".
  Msg 7391, Level 16, State 2, Procedure Proc_UpdateInstitutionWeb, Line 34
  The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "myserver" was unable to begin a distributed transaction.</code></p>
  
  <p>Here is what I tried to do:</p>
  
  <p>On both my computer and the test server:</p>
  
  <ul>
  <li>In admin tools -> Services -> Distributed Transaction Coordinator :
  started the services </li>
  <li>In admin tools -> Component Services ->
  Computers -> My Computer -> Distributed Transaction Coordinator ->
  Local DTC -> Right Click -> Security Tab -> checked network DTC
  Access and Allow remote Clients and allow inbound and outbound.</li>
  <li>Finally I restarted the test server</li>
  </ul>
  
  <p>None of this solved the problem yet. What should I do? </p>
  
  <p>thank you</p>