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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: sequences and cursors

Re: sequences and cursors

From: Mladen Gogala <mladen_at_wangtrading.com>
Date: Tue, 09 Dec 2003 11:39:25 -0800
Message-ID: <F001.005D950B.20031209113925@fatcity.com>


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
> ---------------------------------------------------------------------
> 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).
>

Mladen Gogala
Oracle DBA

Note:
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: mladen_at_wangtrading.com

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 - 13:39:25 CST

Original text of this message

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