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 -> Snapshot too old

Snapshot too old

From: Gordon E. Hooker <gordonh_at_thehub.com.au>
Date: 1996/12/15
Message-ID: <32b57ecf.2536820@news.thehub.com.au>#1/1

pelliott_at_isd.net (Patrick Elliott) wrote:

The "SNAPSHOT TOO OLD" message is sometimes returned when you re-use rollback segments. I would suggest you try and increase the amount of rollback segments and try again.

>I am having a puzling problem. I have a pl/sql procedure that opens a
>cursor in a loop, inserts records from the cursor into a table, and if
>there are any errors, the error messages are inserted into a third
>table via an exception section. I am committing after every insert,
>the tables are empty before the procedure starts, but I am still
>getting a "SNAPSHOT TOO OLD" message. Here is a fragment of code
>similar to what I am working with, but simplified:
>
>CREATE OR REPLACE PROCEDURE proc1 AS
>BEGIN
> DECLARE
> CURSOR c1 IS
> SELECT a, b
> FROM t1;
> BEGIN
> FOR c1_rec IN c1 LOOP
> BEGIN
> INSERT INTO t2
> VALUES (c1_rec.a, c1_rec.b);
> COMMIT;
> EXCEPTION
> WHEN OTHERS THEN
> DECLARE
> err_msg VARCHAR2(256) := SQLERRM;
> BEGIN
> INSERT INTO problems <<<<Error points here.
> VALUES (SYSDATE, err_msg);
> COMMIT;
> END;
> END;
> END LOOP;
> END;
>END proc1;
>
>Any answers to this question would be greatly appreciated.
>

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Gordon E. Hooker MACS PCP
25 Clarke Street Ripley Queensland Australia Phone 61-7-32940555
Email gordonh_at_thehub.com.au
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ We are just two lost souls living in a fish bowl Year after year

Pink Floyd Received on Sun Dec 15 1996 - 00:00:00 CST

Original text of this message

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