<?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>topic Lock the Table in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lock-the-table/m-p/2979248#M921929</link>
    <description>i have "table A", whenever i insert records in &lt;BR /&gt;"table A" similar record will be inserted into "table B" (Insert trigger in table A)&lt;BR /&gt;One of our process does ,&lt;BR /&gt;&lt;BR /&gt;Insert into table c&lt;BR /&gt;Select (some calculations) from table B&lt;BR /&gt;&lt;BR /&gt;then ,&lt;BR /&gt;&lt;BR /&gt;delete from table B&lt;BR /&gt;&lt;BR /&gt;I'm not sure when table A will be loaded.&lt;BR /&gt;It can be loaded anytime (means table B too)..&lt;BR /&gt;&lt;BR /&gt;But our process starts at 10AM everyday, so it fetches from table B arround 10AM, If during that time table B is getting loaded , then it takes only records loaded at that time. How to make my select statement to wait until all records get loaded into table B ?&lt;BR /&gt;&lt;BR /&gt;Load process is done by someother group, so we cant &lt;BR /&gt;change their process.Its impossible.&lt;BR /&gt;Our process starts when we start pulling data from &lt;BR /&gt;"table B". I can alter the process from this point only.&lt;BR /&gt;&lt;BR /&gt;Is that possible to check whether is there any lock in&lt;BR /&gt;table and then start fetching data.&lt;BR /&gt;&lt;BR /&gt;For eg ,&lt;BR /&gt;&lt;BR /&gt;If [ ANY LOCK IN TABLE B ] then&lt;BR /&gt;Wait [ DONT FETCH ]&lt;BR /&gt;Else&lt;BR /&gt;[ LOCK TABLE B , SO THAT NO NEW RECORDS ARE INSERTED ]&lt;BR /&gt;Select from "table B" &lt;BR /&gt;Delete from "table B" &lt;BR /&gt;End &lt;BR /&gt;</description>
    <pubDate>Wed, 21 May 2003 20:13:13 GMT</pubDate>
    <dc:creator>Prabhu_7</dc:creator>
    <dc:date>2003-05-21T20:13:13Z</dc:date>
    <item>
      <title>Lock the Table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lock-the-table/m-p/2979248#M921929</link>
      <description>i have "table A", whenever i insert records in &lt;BR /&gt;"table A" similar record will be inserted into "table B" (Insert trigger in table A)&lt;BR /&gt;One of our process does ,&lt;BR /&gt;&lt;BR /&gt;Insert into table c&lt;BR /&gt;Select (some calculations) from table B&lt;BR /&gt;&lt;BR /&gt;then ,&lt;BR /&gt;&lt;BR /&gt;delete from table B&lt;BR /&gt;&lt;BR /&gt;I'm not sure when table A will be loaded.&lt;BR /&gt;It can be loaded anytime (means table B too)..&lt;BR /&gt;&lt;BR /&gt;But our process starts at 10AM everyday, so it fetches from table B arround 10AM, If during that time table B is getting loaded , then it takes only records loaded at that time. How to make my select statement to wait until all records get loaded into table B ?&lt;BR /&gt;&lt;BR /&gt;Load process is done by someother group, so we cant &lt;BR /&gt;change their process.Its impossible.&lt;BR /&gt;Our process starts when we start pulling data from &lt;BR /&gt;"table B". I can alter the process from this point only.&lt;BR /&gt;&lt;BR /&gt;Is that possible to check whether is there any lock in&lt;BR /&gt;table and then start fetching data.&lt;BR /&gt;&lt;BR /&gt;For eg ,&lt;BR /&gt;&lt;BR /&gt;If [ ANY LOCK IN TABLE B ] then&lt;BR /&gt;Wait [ DONT FETCH ]&lt;BR /&gt;Else&lt;BR /&gt;[ LOCK TABLE B , SO THAT NO NEW RECORDS ARE INSERTED ]&lt;BR /&gt;Select from "table B" &lt;BR /&gt;Delete from "table B" &lt;BR /&gt;End &lt;BR /&gt;</description>
      <pubDate>Wed, 21 May 2003 20:13:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lock-the-table/m-p/2979248#M921929</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-05-21T20:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lock the Table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lock-the-table/m-p/2979249#M921930</link>
      <description>simple....&lt;BR /&gt;&lt;BR /&gt;insert table D&lt;BR /&gt;as select * from table B;&lt;BR /&gt;&lt;BR /&gt;insert table C&lt;BR /&gt;as select * from table D;&lt;BR /&gt;&lt;BR /&gt;delete from table B&lt;BR /&gt;where D.record = B.record;&lt;BR /&gt;&lt;BR /&gt;delete * from table D;&lt;BR /&gt;&lt;BR /&gt;repeat.....</description>
      <pubDate>Wed, 21 May 2003 20:34:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lock-the-table/m-p/2979249#M921930</guid>
      <dc:creator>James A. Donovan</dc:creator>
      <dc:date>2003-05-21T20:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lock the Table</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lock-the-table/m-p/2979250#M921931</link>
      <description>This should be cleaned up quite a bit (if statements, etc) but this is a basic concept for it:&lt;BR /&gt;-------&lt;BR /&gt;declare &lt;BR /&gt;   numcount number := '1';&lt;BR /&gt;begin&lt;BR /&gt;while numcount &amp;gt; 0 loop&lt;BR /&gt;   --  xxxxx should be the object id for the &lt;BR /&gt;   select count(*) into numcount from &lt;BR /&gt;   v$locked_object where object_id = 'xxxxx';&lt;BR /&gt;   dbms_lock.sleep('10');&lt;BR /&gt;end loop;&lt;BR /&gt;end;&lt;BR /&gt;/&lt;BR /&gt;--------&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Wed, 21 May 2003 21:29:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lock-the-table/m-p/2979250#M921931</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2003-05-21T21:29:05Z</dc:date>
    </item>
  </channel>
</rss>

