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

Home -> Community -> Usenet -> c.d.o.misc -> Explicit Cursor in a For Loop and crashing database

Explicit Cursor in a For Loop and crashing database

From: April <PrivateBenjamin_at_hushmail.com>
Date: 18 Sep 2003 14:48:35 -0700
Message-ID: <54df0379.0309181348.3dd90147@posting.google.com>


I have this procedure below which keeps hanging and will evetually crash the database.... Oracle 7.3.4. The procedure itself seems to be corrupted and cannot be compiled or dropped after trying to run it or step through debugging with Toad.

Is there something wrong with the way I am using the explicit cursors in a For Loop?

I have stepped through the procedure (when it doesn't crash) for small data sets ie. one item for the main cursor loop (c_chld), and it works fine, but when it has to go through another main loop then it crashes, even though it is doing the exact same thing.

Thanks for your help,
April

CREATE OR REPLACE procedure align_xrsl_xrsip is /*PURPOSE: Align xref_structure_insulator_poas (xrsip) with xref_structure_linesection (xrsl)
METHOD: for each record that was added to xrsl, get the original from xrsip and insert a copyinto xrsip with the new structure_cct_id and i_s, o_s.
update the original xrsip o_s to min i_s of related recs added to xrsl*/

--source dataset for insertion of new insulator recs cursor c_parnt (scctid number) is select * from xref_structure_insulator_poas where structure_cct_id = scctid;

--old structure_cct_id with the new structure_cct_id cursor c_xrslids (p_id number, c_id number) is select a.oldid old_scctid, b.newid from
(select lnsection_id parnt,id oldid,structure_id from
xref_structure_linesection where lnsection_id = p_id)a,
(select lnsection_id chld,id newid,structure_id from
xref_structure_linesection where lnsection_id = c_id)b, temp_parent_child c
where

a.parnt = c.parnt and
b.chld = c.chld and
a.structure_id = b.structure_id

order by a.oldid,b.newid;

new_os date;
exist number;

begin

exception

     when others then
       rollback;
	   raise;

end;
/ Received on Thu Sep 18 2003 - 16:48:35 CDT

Original text of this message

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