<?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: Can I delay other transactions while I'm doing COMMITs? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaa-p/13835947#M4866790</link>
    <description>&lt;P&gt;A good point, as usually.&lt;/P&gt;
&lt;P&gt;FWIW, if I really want to have "exclusive commit access", preventing new connections by means of "sa_server_option('ConnsDisabledForDB')" would be the easier part, so that shouldn't be a showstopper for my partial solution, I think.&lt;/P&gt;
&lt;P&gt;That would also prevent new connections that still run, which would otherwise only be detected if the EXCEPT would be done biliterally, i.e. as &lt;EM&gt;"(old EXCEPT new) UNION (new EXCEPT old)"&lt;/EM&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Sep 2012 10:29:03 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2012-09-18T10:29:03Z</dc:date>
    <item>
      <title>Can I delay other transactions while I'm doing COMMITs?</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaq-p/13835944</link>
      <description>&lt;P&gt;This has come up in the context of &lt;A href="http://sqlanywhere-forum.sap.com/questions/13249" target="_blank"&gt;that FAQ&lt;/A&gt;...&lt;/P&gt;
&lt;P&gt;When there are concurrent transactions running, can a particular connection (with DBA priviledge) prevent others from committing for a certain amount of time (not to rollback but to "delay" or "suspend")?&lt;/P&gt;
&lt;P&gt;Say, I want to do two "small" transactions and want no other transaction to commit/rollback in the interim. Is this doable (e.g. by priorities)?&lt;/P&gt;
&lt;P&gt;Or, if not, is there a way to tell if any other transaction has committed/rollbacked between my two commits (possibly documented by two CurrentRedoPos property values)?&lt;/P&gt;
&lt;P&gt;The goal would be to have an "exclusive commit mode" while allowing concurrent connections.&lt;/P&gt;
&lt;P&gt;I'm aware that I can prevent others from accessing a particular table/row by means of locking but I'm asking for a general solution. (Aside: Even the exclusive table-specific access would require a WITH HOLD lock to make the lock endure the first transaction's COMMIT - and then the lock would be hold until the connection itself is terminated.) &lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2012 09:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaq-p/13835944</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-09-07T09:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can I delay other transactions while I'm doing COMMITs?</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaa-p/13835945#M4866788</link>
      <description>&lt;P&gt;Well, for the following issue:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;"...is there a way to tell if any other transaction has committed/rollbacked between my two commits (possibly documented by two CurrentRedoPos property values)?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One could surely get the &lt;STRONG&gt;following connection properties "Commit" and "Rollback"&lt;/STRONG&gt; for all but the current connection&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;before the first commit&lt;/LI&gt;
&lt;LI&gt;and after the second commit&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;and check whether there values have changed. If they are unchanged, then obviously no other connection has committed/rollbacked in the interim.&lt;/P&gt;
&lt;P&gt;A simple approach would be use something like&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="k"&gt;select&lt;/SPAN&gt; &lt;SPAN class="nb"&gt;Number&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;connection_property&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;'Commit'&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;scl&lt;/SPAN&gt;&lt;SPAN class="p"&gt;.&lt;/SPAN&gt;&lt;SPAN class="nb"&gt;Number&lt;/SPAN&gt;&lt;SPAN class="p"&gt;),&lt;/SPAN&gt;
  &lt;SPAN class="n"&gt;connection_property&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;'Rlbk'&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;scl&lt;/SPAN&gt;&lt;SPAN class="p"&gt;.&lt;/SPAN&gt;&lt;SPAN class="nb"&gt;Number&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="k"&gt;from&lt;/SPAN&gt; &lt;SPAN class="n"&gt;sa_conn_list&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;/SPAN&gt; &lt;SPAN class="n"&gt;scl&lt;/SPAN&gt;
&lt;SPAN class="k"&gt;where&lt;/SPAN&gt; &lt;SPAN class="nb"&gt;Number&lt;/SPAN&gt; &lt;SPAN class="o"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="n"&gt;connection_property&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;'Number'&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="k"&gt;order&lt;/SPAN&gt; &lt;SPAN class="k"&gt;by&lt;/SPAN&gt; &lt;SPAN class="mi"&gt;1&lt;/SPAN&gt;&lt;SPAN class="p"&gt;;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;to get those properties, to store them in the "before first commit" situation in a local temporary table with NOT TRANSACTIONAL and compare that with the result set in the "after second commit" situation - say, with EXCEPT. &lt;STRONG&gt;If this returns an empty result set, then our connection has exclusively committed...&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(FWIW, the "Rlbk" property could be ignored here fully, unless we have used isolation level 0 and would have to know about possible dirty reads. For all other isolation levels, interim rollbacks should have no effect at all on our connection.)&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2012 16:16:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaa-p/13835945#M4866788</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-09-08T16:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can I delay other transactions while I'm doing COMMITs?</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaa-p/13835946#M4866789</link>
      <description>&lt;P&gt;I don't think there's a way to do this, and I'm not sure that your partial solution takes into account a connection that may connect, commit a change, and then disconnect between the first and second commit that you are tracking.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 10:21:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaa-p/13835946#M4866789</guid>
      <dc:creator>regdomaratzki</dc:creator>
      <dc:date>2012-09-18T10:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can I delay other transactions while I'm doing COMMITs?</title>
      <link>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaa-p/13835947#M4866790</link>
      <description>&lt;P&gt;A good point, as usually.&lt;/P&gt;
&lt;P&gt;FWIW, if I really want to have "exclusive commit access", preventing new connections by means of "sa_server_option('ConnsDisabledForDB')" would be the easier part, so that shouldn't be a showstopper for my partial solution, I think.&lt;/P&gt;
&lt;P&gt;That would also prevent new connections that still run, which would otherwise only be detected if the EXCEPT would be done biliterally, i.e. as &lt;EM&gt;"(old EXCEPT new) UNION (new EXCEPT old)"&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 10:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/can-i-delay-other-transactions-while-i-m-doing-commits/qaa-p/13835947#M4866790</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-09-18T10:29:03Z</dc:date>
    </item>
  </channel>
</rss>

