Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: sequences and cursors
thanks mlade..i will surely give this a shot.
can you please tell me whether a sequence creates such issues. as mentioned earlier, the developers claim that no code has changed. im am not able to give any kind of reason for this though the trace shows this statement being called more than 350 times.
thanks
sai
--- Mladen Gogala <mladen_at_wangtrading.com> wrote:
> What tool are you using? HAve you considered putting
> select from the
> sequence in an explicit cursor, open it, fetch it
> and close it again?
> What Have in mind is something like this:
>
> declare
> cursor csr is
> select sai.nextval from dual;
> num integer :=0;
> ind integer :=10;
> begin
> while (ind>=0) loop
> open csr;
> fetch csr into num;
> close csr;
> dbms_output.put_line('Sai is:'||num);
> ind:=ind-1;
> end loop;
> end;
> /
>
>
> Here is the output:
>
> QL> /
> Sai is:13
> Sai is:14
> Sai is:15
> Sai is:16
> Sai is:17
> Sai is:18
> Sai is:19
> Sai is:20
> Sai is:21
> Sai is:22
> Sai is:23
>
> PL/SQL procedure successfully completed.
>
> On 12/09/2003 01:39:25 PM, Sai Selvaganesan wrote:
> > hi
> > here are the specs of my db:
> > version 8.1.7 on windows,open_cursors=500
> > i am facing a certain issue. we have a few
> sessions
> > running out of cursor(ora-1000) and i used 1000
> event
> > to dump trace on these sessions. i found a certain
> > statement
> > select <seq>.nextval from dual;
> > being repeated more than 350 times of the
> available
> > 500 cursors.
> > the dev say nothing has changed nor has there been
> a
> > increase in the load.
> >
> > can you please advise me whther this could be a
> issue
> > or am i missing something here
> >
> > thanks
> > sai
> > --
> > Please see the official ORACLE-L FAQ:
> http://www.orafaq.net
> > --
> > Author: Sai Selvaganesan
> > INET: ssaisundar_at_sbcglobal.net
> >
> > Fat City Network Services -- 858-538-5051
> http://www.fatcity.com
> > San Diego, California -- Mailing list and
> web hosting services
> >
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Sai Selvaganesan INET: ssaisundar_at_sbcglobal.net Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue Dec 09 2003 - 16:59:25 CST