<?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 doing random update and etc.... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/doing-random-update-and-etc/m-p/2778051#M942918</link>
    <description>currently the script below is doing commit for every row that was being insert..can you help me to come up with something like doing commit&lt;BR /&gt;for every 50 ...and also i want to perform &lt;BR /&gt;random updates at well...in addition, this loader insert the same data over and over again..i want to change it...too...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;create PROCEDURE tester1 IS&lt;BR /&gt;numcount number:=0;&lt;BR /&gt;begin&lt;BR /&gt;while true loop&lt;BR /&gt;numcount:=numcount+1;&lt;BR /&gt;insert into employee1 values (numcount,'lkjljf','dlkjdeann',87970.80);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee2 values (numcount,'lkjljf','dlkjdeann',87970.80);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee3 values (numcount,'lkjljf','dlkjdeann',87970.80);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee4 values (numcount, 'dkjl','dlakdjfelsdjfe',10000);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee5 values (numcount, 'dldffalj','kjhgehoij',6700);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee6 values (numcount, 'dlfkajdfoer','ldifjoie',87509);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee7 values (numcount, 'opijo9jr','okdfetr',87834);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee8 values (numcount, 'p9i-lkdf','eoljedr',8760);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee9 values (numcount, 'lkdjfld','dfdflerj',98590);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee10 values (numcount, 'aldfkjaoeruljdkf','eiurykhdf',54295);&lt;BR /&gt;commit;&lt;BR /&gt;end loop;&lt;BR /&gt;END;&lt;BR /&gt;/&lt;BR /&gt;</description>
    <pubDate>Thu, 01 Aug 2002 20:30:52 GMT</pubDate>
    <dc:creator>Deanna Tran_1</dc:creator>
    <dc:date>2002-08-01T20:30:52Z</dc:date>
    <item>
      <title>doing random update and etc....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/doing-random-update-and-etc/m-p/2778051#M942918</link>
      <description>currently the script below is doing commit for every row that was being insert..can you help me to come up with something like doing commit&lt;BR /&gt;for every 50 ...and also i want to perform &lt;BR /&gt;random updates at well...in addition, this loader insert the same data over and over again..i want to change it...too...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;create PROCEDURE tester1 IS&lt;BR /&gt;numcount number:=0;&lt;BR /&gt;begin&lt;BR /&gt;while true loop&lt;BR /&gt;numcount:=numcount+1;&lt;BR /&gt;insert into employee1 values (numcount,'lkjljf','dlkjdeann',87970.80);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee2 values (numcount,'lkjljf','dlkjdeann',87970.80);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee3 values (numcount,'lkjljf','dlkjdeann',87970.80);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee4 values (numcount, 'dkjl','dlakdjfelsdjfe',10000);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee5 values (numcount, 'dldffalj','kjhgehoij',6700);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee6 values (numcount, 'dlfkajdfoer','ldifjoie',87509);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee7 values (numcount, 'opijo9jr','okdfetr',87834);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee8 values (numcount, 'p9i-lkdf','eoljedr',8760);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee9 values (numcount, 'lkdjfld','dfdflerj',98590);&lt;BR /&gt;commit;&lt;BR /&gt;insert into employee10 values (numcount, 'aldfkjaoeruljdkf','eiurykhdf',54295);&lt;BR /&gt;commit;&lt;BR /&gt;end loop;&lt;BR /&gt;END;&lt;BR /&gt;/&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Aug 2002 20:30:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/doing-random-update-and-etc/m-p/2778051#M942918</guid>
      <dc:creator>Deanna Tran_1</dc:creator>
      <dc:date>2002-08-01T20:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: doing random update and etc....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/doing-random-update-and-etc/m-p/2778052#M942919</link>
      <description>Not sure whether you are using Oracle or not, but from the syntax, it seems that my assumption is right.&lt;BR /&gt;&lt;BR /&gt;You can use the SET AUTOCOMMIT command to help you to issue commit on a preset number of DMLs executed.&lt;BR /&gt;&lt;BR /&gt;SET AUTOCOMMIT ON&lt;BR /&gt;  Turns autocommit on. &lt;BR /&gt; &lt;BR /&gt;SET AUTOCOMMIT OFF&lt;BR /&gt;  Turns autocommit off (the default). &lt;BR /&gt; &lt;BR /&gt;SET AUTOCOMMIT n&lt;BR /&gt;  Commits changes after n SQL DML commands. &lt;BR /&gt; &lt;BR /&gt;SET AUTOCOMMIT IMMEDIATE&lt;BR /&gt;  Turns autocommit on. &lt;BR /&gt; &lt;BR /&gt;Hope this can help to to solve the problem.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kenneth</description>
      <pubDate>Fri, 02 Aug 2002 00:40:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/doing-random-update-and-etc/m-p/2778052#M942919</guid>
      <dc:creator>Kenneth_19</dc:creator>
      <dc:date>2002-08-02T00:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: doing random update and etc....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/doing-random-update-and-etc/m-p/2778053#M942920</link>
      <description>To commit after every 50 iterations through your loop, you can use your numcount variable like this:&lt;BR /&gt;&lt;BR /&gt;if numcount / 50 = floor (rowcount / 50) then&lt;BR /&gt;  commit;&lt;BR /&gt;end if;&lt;BR /&gt;&lt;BR /&gt;Oracle publish a random package on their MetaLink website. Try this URL: &lt;A href="http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&amp;amp;p_id=1028249.6," target="_blank"&gt;http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&amp;amp;p_id=1028249.6,&lt;/A&gt; or go to MetaLink and search for "random package".</description>
      <pubDate>Fri, 02 Aug 2002 09:13:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/doing-random-update-and-etc/m-p/2778053#M942920</guid>
      <dc:creator>Dave Burton_1</dc:creator>
      <dc:date>2002-08-02T09:13:53Z</dc:date>
    </item>
  </channel>
</rss>

