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

Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence drop does not work sometime

Re: Sequence drop does not work sometime

From: FaheemRao <faheemrao_at_yahoo.com>
Date: 18 Oct 2001 15:21:46 -0700
Message-ID: <43b58913.0110181421.61d58430@posting.google.com>


First of all it is not a good idea to Create and drop sequences through applications every time you run your code. It seems that you have only one sequence for many tables, the good idea would be to create a saperate sequence Object for every table.

here is one possibility what is happening with you.

There are might be more than one places in your code where you are dealing (creating , deleting , getting next value) so some time in your code one place is trying to get the next value and at exactly at same time any other place in your code trying to delete the same sequence, in that case your satement for deleting the sequence will fail.

Now if you can trac the exact error code , when your delete sequence statement fails , that would be helpful in resolving your problem.

Faheem Rao

"Pinto" <reach_me_at_india.com> wrote in message news:<9qmjos$90m$1_at_news.mch.sbs.de>...
> Hello Marc,
> Thats exactly why i am bit confused because,
> the sequence is dropped using the same session that created it, there is no
> question of insufficient previlege coming in. also this is succeeding 99% of
> the time. during a long run when may be this code is executed 1000 times,
> sometimes this sequence is not dropped. so u can understand, there is no
> question of wrong syntax or specifying wrong owner because it is succeeding
> 99% of the time. why is it failing sometimes???
>
> thanks and regards,
> Pinto.
>
> Pinto <reach_me_at_india.com> wrote in message
> news:9qlmjp$fgj$1_at_news.mch.sbs.de...
> > Hello,
> > I have a vc++ code that creates a table in the database and also a
> > corresponding sequence for that table. after all the inserts and updates,
> at
> > the end of the code, i drop the sequence. next time when the code is
> > executed, if the same table is given as i/p parameter, the sequence is
> > created with start with of the sequence same as the max+1 value available
> in
> > the table. if it is a different table, a new sequence is created.
> > the problem is that the sequence drop statement fails sometime. what can
> be
> > the reason for the drop sequence operation to fail.
> >
> > warm regards,
> > Pinto.
> >
> >
> >
Received on Thu Oct 18 2001 - 17:21:46 CDT

Original text of this message

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