Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> TABLE LOCKS

TABLE LOCKS

From: <bhavesh-patel_at_worldnet.att.net>
Date: 1997/08/28
Message-ID: <872767167.7680@dejanews.com>#1/1

Hi,

Can someone try to help me out,This is what happend.

I wrote a procedure in PL-SQL.(Oracle 7.3), in which I have a FOR UPDATE Cursor, which updates three fields. When I run this procedure it hanged and ultimately locked the table. So I am unable to run the procedure, I tried the same thing on other table and it works fine. But only with this table it happens like this.

sample body of the procedure:-

PROCEDURE xxx IS CURSOR my_cur IS SELECT * from table_1 WHERE col10 = 'X' ORDER BY col50,col70 FOR UPDATE OF col60,col70,col50; myrec table_1%ROWTYPE; BEGIN OPEN my_cur; LOOP FETCH my_cur INTO myrec; EXIT WHEN my_cur%NOTFOUND; /* Perform calculations and change the value of my_Rec based on the calculations performed. */ UPDATE table_1 SET col50 = myrec.col50, col60 = myrec.col60, col70 = myrec.col70 WHERE CURRENT OF my_cur; END LOOP; CLOSE my_cur; END;

The No Of Cols in Table are 65. and the size of the table is 100M. and it has a PK defined.

Thanks in advance,

BHAVESH PATEL.
bhavesh-patel_at_worldnet.att.net

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Thu Aug 28 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US