<?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: Intent locks not blocking each other? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829102#M4859945</link>
    <description>&lt;P&gt;Ahhhh, locking... almost as complicated as cursors, and changing almost as fast &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Oct 2010 14:22:59 GMT</pubDate>
    <dc:creator>Breck_Carter</dc:creator>
    <dc:date>2010-10-13T14:22:59Z</dc:date>
    <item>
      <title>Intent locks not blocking each other?</title>
      <link>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaq-p/13829100</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am trying to use intent locks within a transaction over multiple
sessions.
The documentation seems to say that one intent lock does allow other
sessions to read the record but not to create another intent lock.
However when I try that, all intent locks seem to be successful.&lt;/P&gt;

&lt;P&gt;In session1 (within a transaction) I create an intent lock by either:&lt;/P&gt;

&lt;P&gt;select id, c from tab holdlock  where id = 1&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;select id, c  from tab  where id = 1 for update by lock&lt;/P&gt;

&lt;P&gt;This does create a lock, updating the record does block, but when I
issue the same select statements in session2 (also in a transaction)
to get (or wait for) an intent lock, the lock also seems to be created
for session2, the select returns immediately, i would expect the
second select to block until the first session transaction is ended.&lt;/P&gt;

&lt;P&gt;I am using sybase ianywhere 11&lt;/P&gt;

&lt;P&gt;Any idea what I am doing wrong or how to get a blocking state for the
second session?&lt;/P&gt;

&lt;P&gt;Rob Gansevles &lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2010 12:18:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaq-p/13829100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-13T12:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Intent locks not blocking each other?</title>
      <link>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829102#M4859945</link>
      <description>&lt;P&gt;Ahhhh, locking... almost as complicated as cursors, and changing almost as fast &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2010 14:22:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829102#M4859945</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2010-10-13T14:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Intent locks not blocking each other?</title>
      <link>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829103#M4859946</link>
      <description>&lt;P&gt;What version and build number of SQL Anywhere 11 are you running?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2010 14:32:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829103#M4859946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-13T14:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Intent locks not blocking each other?</title>
      <link>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829101#M4859944</link>
      <description>&lt;P&gt;HOLDLOCK does not acquire an intent row lock - the WITH( UPDLOCK ) table hint does. HOLDLOCK is equivalent to running the SELECT statement at isolation level 3.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2010 15:14:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829101#M4859944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-13T15:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Intent locks not blocking each other?</title>
      <link>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829104#M4859947</link>
      <description>&lt;P&gt;By the way, the HOLDLOCK syntax you are using is Transact-SQL. You will need to use WITH() syntax for the table hint if you are attempting to specify UPDLOCK.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2010 18:56:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829104#M4859947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-13T18:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Intent locks not blocking each other?</title>
      <link>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829105#M4859948</link>
      <description>&lt;P&gt;Thanks, with(updlock) is what I needed.&lt;/P&gt;
&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2010 09:31:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/intent-locks-not-blocking-each-other/qaa-p/13829105#M4859948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-15T09:31:29Z</dc:date>
    </item>
  </channel>
</rss>

