Update 100 rows and sleep for 60 sec

  • From: Balwanth B <balwanthdba@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 28 Mar 2017 12:16:07 -0400

I am looking for script which will update


Update 100 rows
commit
sleep
then next update 100 rows
follow the same pattern

I have something like below but how do I make sure it sleeps for mentioned
time and does the next 100 rows.

*declare*
*CURSOR REC_CUR IS*
*select statement;*
*TYPE ROWID_T IS TABLE OF VARCHAR2(50);*
*ROWID_TAB ROWID_T;*
*BEGIN*
*OPEN REC_CUR;*
*LOOP*
*FETCH REC_CUR BULK COLLECT INTO ROWID_TAB LIMIT 5000;*
*EXIT WHEN REC_CUR%NOTFOUND;*
*FORALL I IN 1.. ROWID_TAB.COUNT*
*update statement*
*COMMIT;*
*END LOOP;*
*CLOSE REC_CUR;*
*END; *

Other related posts: