<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: UPDATE inside distributed transaction in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850364#M4881207</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Server&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Server Version: 11.0.1.2331 (it's a Developer Edition)&lt;/P&gt;
&lt;P&gt;BuildChange: 625781 (value taken from &lt;EM&gt;Database server properties list&lt;/EM&gt; in Sybase Central)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Provider&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SQL Anywhere OLE DB Provider 11 (dboledb11.dll)&lt;/EM&gt; &lt;/P&gt;
&lt;P&gt;Version: 11.0.1.2331 &lt;/P&gt;
&lt;P&gt;Last Modified: 10/14/‎2009.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SQL Anywhere OLE DB Provider Catalog Assist (dboledba11.dll)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Version: 11.0.1.2331&lt;/P&gt;
&lt;P&gt;Last Modified: 10/14/‎2009.&lt;/P&gt;
&lt;P&gt;Engine version and provider version look like same. Also I check (in Windows Registry) keys for  SAOLEDB.11 provider - its point on correct files. &lt;/P&gt;</description>
    <pubDate>Wed, 09 Nov 2011 08:45:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-09T08:45:46Z</dc:date>
    <item>
      <title>UPDATE inside distributed transaction</title>
      <link>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaq-p/13850361</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I have SQL Anywhere 11 database linked to MS SQL Server 2008 as a ‘linked server’. When I don’t use distributed transactions (via MSDTC) all is working fine (updates to remote SQL Anywhere committed without any problems). When I start using distributed transactions (and make only SELECTs inside distributed transaction) all is working fine again (I control transactions using @@trancount statement in MS SQL Server code). Such experiments bring two major results: SQL Anywhere as Linked Severs and MSDTC working correctly in these simple configurations. &lt;/P&gt;
&lt;P&gt;But when I start using UPDATEs inside distributed transaction all completed with &lt;STRONG&gt;&lt;EM&gt;The OLE DB provider "SAOLEDB.11" for linked server "link" reported an error committing the current transaction&lt;/EM&gt;&lt;/STRONG&gt; error on line with UPDATE statement. &lt;/P&gt;
&lt;P&gt;Note: when I link two MS SQL Servers any UPDATES in one distributed transactions working fine. &lt;/P&gt;
&lt;P&gt;What should I do to make code below working correctly?&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;set&lt;/SPAN&gt; &lt;SPAN class="n"&gt;implicit_transactions&lt;/SPAN&gt; &lt;SPAN class="n"&gt;on&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt; &lt;SPAN class="o"&gt;--&lt;/SPAN&gt; &lt;SPAN class="n"&gt;necessary&lt;/SPAN&gt; &lt;SPAN class="k"&gt;for&lt;/SPAN&gt; &lt;SPAN class="n"&gt;autocommit&lt;/SPAN&gt; &lt;SPAN class="n"&gt;shootdown&lt;/SPAN&gt; 
&lt;SPAN class="n"&gt;set&lt;/SPAN&gt; &lt;SPAN class="n"&gt;xact_abort&lt;/SPAN&gt; &lt;SPAN class="n"&gt;on&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="n"&gt;begin&lt;/SPAN&gt; &lt;SPAN class="n"&gt;try&lt;/SPAN&gt;
    &lt;SPAN class="n"&gt;begin&lt;/SPAN&gt; &lt;SPAN class="n"&gt;distributed&lt;/SPAN&gt; &lt;SPAN class="n"&gt;tran&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt; 
    &lt;SPAN class="nb"&gt;select&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@@trancount&lt;/SPAN&gt; &lt;SPAN class="n"&gt;TranCount&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;

    &lt;SPAN class="o"&gt;--&lt;/SPAN&gt;&lt;SPAN class="nb"&gt;select&lt;/SPAN&gt; &lt;SPAN class="o"&gt;*&lt;/SPAN&gt; &lt;SPAN class="n"&gt;from&lt;/SPAN&gt; &lt;SPAN class="nb"&gt;link&lt;/SPAN&gt;&lt;SPAN class="o"&gt;..&lt;/SPAN&gt;&lt;SPAN class="n"&gt;amos&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;address&lt;/SPAN&gt; &lt;SPAN class="n"&gt;where&lt;/SPAN&gt; &lt;SPAN class="n"&gt;addressid&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;1000001&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;

    &lt;SPAN class="n"&gt;update&lt;/SPAN&gt;          &lt;SPAN class="nb"&gt;link&lt;/SPAN&gt;&lt;SPAN class="o"&gt;..&lt;/SPAN&gt;&lt;SPAN class="n"&gt;amos&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;address&lt;/SPAN&gt; 
    &lt;SPAN class="n"&gt;set&lt;/SPAN&gt;             &lt;SPAN class="n"&gt;ad&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;addressstatus&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;1&lt;/SPAN&gt; 
    &lt;SPAN class="n"&gt;from&lt;/SPAN&gt;            &lt;SPAN class="nb"&gt;link&lt;/SPAN&gt;&lt;SPAN class="o"&gt;..&lt;/SPAN&gt;&lt;SPAN class="n"&gt;amos&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;address&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ad&lt;/SPAN&gt;
    &lt;SPAN class="n"&gt;where&lt;/SPAN&gt;           &lt;SPAN class="n"&gt;ad&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;addressid&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;1000001&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;

    &lt;SPAN class="nb"&gt;select&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@@trancount&lt;/SPAN&gt; &lt;SPAN class="n"&gt;TRANCOUNT&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="n"&gt;commit&lt;/SPAN&gt; &lt;SPAN class="n"&gt;tran&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="nb"&gt;select&lt;/SPAN&gt; &lt;SPAN class="nv"&gt;@@trancount&lt;/SPAN&gt; &lt;SPAN class="n"&gt;TRANCOUNT&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;end&lt;/SPAN&gt; &lt;SPAN class="n"&gt;try&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;begin&lt;/SPAN&gt; &lt;SPAN class="n"&gt;catch&lt;/SPAN&gt;
    &lt;SPAN class="n"&gt;rollback&lt;/SPAN&gt; &lt;SPAN class="n"&gt;tran&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="nb"&gt;select&lt;/SPAN&gt; &lt;SPAN class="n"&gt;error_number&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt; &lt;SPAN class="n"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ErrorNumber&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; 
           &lt;SPAN class="n"&gt;error_message&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt; &lt;SPAN class="n"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ErrorMessage&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; 
           &lt;SPAN class="n"&gt;error_line&lt;/SPAN&gt; &lt;SPAN class="p"&gt;()&lt;/SPAN&gt; &lt;SPAN class="n"&gt;AS&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ErrorLine&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;end&lt;/SPAN&gt; &lt;SPAN class="n"&gt;catch&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;&lt;STRONG&gt;Query Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="err"&gt;TranCount:&lt;/SPAN&gt; &lt;SPAN class="err"&gt;2&lt;/SPAN&gt;

&lt;SPAN class="err"&gt;ErrorNumber:&lt;/SPAN&gt; &lt;SPAN class="err"&gt;7394&lt;/SPAN&gt;   
&lt;SPAN class="err"&gt;ErrorMessage:&lt;/SPAN&gt; &lt;SPAN class="err"&gt;The&lt;/SPAN&gt; &lt;SPAN class="err"&gt;OLE&lt;/SPAN&gt; &lt;SPAN class="err"&gt;DB&lt;/SPAN&gt; &lt;SPAN class="err"&gt;provider&lt;/SPAN&gt; &lt;SPAN class="err"&gt;"SAOLEDB.11"&lt;/SPAN&gt; &lt;SPAN class="err"&gt;for&lt;/SPAN&gt; &lt;SPAN class="err"&gt;linked&lt;/SPAN&gt; &lt;SPAN class="err"&gt;server&lt;/SPAN&gt; &lt;SPAN class="err"&gt;"link"&lt;/SPAN&gt; &lt;SPAN class="err"&gt;reported&lt;/SPAN&gt; &lt;SPAN class="err"&gt;an&lt;/SPAN&gt; &lt;SPAN class="err"&gt;error&lt;/SPAN&gt; &lt;SPAN class="err"&gt;committing&lt;/SPAN&gt; &lt;SPAN class="err"&gt;the&lt;/SPAN&gt; &lt;SPAN class="err"&gt;current&lt;/SPAN&gt; &lt;SPAN class="err"&gt;transaction.&lt;/SPAN&gt;
&lt;SPAN class="err"&gt;ErrorLine:&lt;/SPAN&gt; &lt;SPAN class="err"&gt;10&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;P.S. Sorry for my English.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2011 07:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaq-p/13850361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-09T07:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE inside distributed transaction</title>
      <link>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850362#M4881205</link>
      <description>&lt;P&gt;Precisely which release and build of SQL Anywhere 11 are you using? Does your SAOLEDB.11 library have the same build number?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2011 08:01:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850362#M4881205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-09T08:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE inside distributed transaction</title>
      <link>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850364#M4881207</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Server&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Server Version: 11.0.1.2331 (it's a Developer Edition)&lt;/P&gt;
&lt;P&gt;BuildChange: 625781 (value taken from &lt;EM&gt;Database server properties list&lt;/EM&gt; in Sybase Central)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Provider&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SQL Anywhere OLE DB Provider 11 (dboledb11.dll)&lt;/EM&gt; &lt;/P&gt;
&lt;P&gt;Version: 11.0.1.2331 &lt;/P&gt;
&lt;P&gt;Last Modified: 10/14/‎2009.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SQL Anywhere OLE DB Provider Catalog Assist (dboledba11.dll)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Version: 11.0.1.2331&lt;/P&gt;
&lt;P&gt;Last Modified: 10/14/‎2009.&lt;/P&gt;
&lt;P&gt;Engine version and provider version look like same. Also I check (in Windows Registry) keys for  SAOLEDB.11 provider - its point on correct files. &lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2011 08:45:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850364#M4881207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-09T08:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE inside distributed transaction</title>
      <link>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850365#M4881208</link>
      <description>&lt;P&gt;While I can't say something concerning the specific problem I would recommend updating to a recent EBF. In the last 2 years many modifications and fixes have been made. So possibly that could fix this issue.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2011 09:21:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850365#M4881208</guid>
      <dc:creator>reimer_pods</dc:creator>
      <dc:date>2011-11-09T09:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: UPDATE inside distributed transaction</title>
      <link>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850363#M4881206</link>
      <description>&lt;P&gt;You may look at the following &lt;A href="http://sqlanywhere-forum.sap.com/questions/5201"&gt;FAQ&lt;/A&gt;.&lt;BR /&gt;
&lt;/P&gt;
&lt;P&gt;The fixes mentioned there were introduced in newer EBFs than you are using, so it might be worthwhile to test with a newer EBF.  Note, I can't claim that these issues are related to the behaviour you are seeing.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2011 09:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/update-inside-distributed-transaction/qaa-p/13850363#M4881206</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2011-11-09T09:56:52Z</dc:date>
    </item>
  </channel>
</rss>

