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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Urgent: INSERT INTO kills session

Re: Urgent: INSERT INTO kills session

From: rr <raineyr_at_look.ca>
Date: Thu, 25 Jan 2001 03:55:52 GMT
Message-ID: <3A6FC03B.C29BE884@look.ca>

Could you be running out of memory?
Try creating the table first, then editing the procedure. I know you can do bulk commits, etc. but I don't have that code on hand, but it is available, but here's a general idea of what I had in mind. Commit a few rows at a time and see if you rid yourself of the problem.

CREATE TABLE tname AS
SELECT ... FROM table_to_copy WHERE 1=2; -- empty table  procedure:
......
v_counter BINARY_INTEGER := 5000;
high_value BINARY_INTEGER;
CURSOR cur IS SELECT column1, column2, ... FROM table_to_copy WHERE primary_key < v_counter;
BEGIN
SELECT max(primary_key) INTO high_value FROM table_to_copy; WHILE counter < (high_value + 5000)
LOOP
  FOR rec IN cur
  LOOP
    INSERT INTO tname VALUES rec.column1, rec.column2, ....;   END LOOP;
  COMMIT;
  counter := counter + 5000;
END LOOP; Carsten Jacobs wrote:

> Hi,
>
> On Oracle 8.16i on NT I have created a table with the command
>
> CREATE TABLE tname AS
> SELECT ...
>
> If I do then an insert into this new table with the same select
> statement then I get ORA-03113 'end-of-file on communication channel'.
> and the session is killed.
> Actually I have the INSERT INTO statement in an stored procedure which
> crashes with the same error.
>
> Please help
>
> thanks
>
> Carsten
  Received on Wed Jan 24 2001 - 21:55:52 CST

Original text of this message

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