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: Getting currval from a sequence with out incrementing nextval

Re: Getting currval from a sequence with out incrementing nextval

From: Bonk <bonk.brennan_at_gmail.com>
Date: 6 Mar 2006 08:05:27 -0800
Message-ID: <1141661127.644514.164220@i40g2000cwc.googlegroups.com>


The reason that I have this problem is simple, lazy developers.

It seems that with every new release of our application they like to run a scripts that drops all the sequences, then re-adds them to the system starting at zero. Granting I can cross reference all the tables and locate which sequences need to be bumped up, by the PK on the effected tables, but alas I am lazy. I'm trying to write a sanity check plsql that will, allow me to verify that we won't be in a "unique key constraint" situation with every build or speed up the fix at the very least. Secondly, I thought it might be nice to check periodically in our QA environment as they are constantly breaking that environment.I want to get out of that loop and if I can hand them a good tool there will be less work for me.

I know I can select the nextval, but I was looking to see if there was a way to get the currval without losing a sequence number. Granted burning values in our "soon to be" production environment is not a big deal as the range is huge but in QA they are limited to a couple thousand and real estate is a bit limited. Ultimately I guess it doesn't really matter, cause I am so annoyed that I am going to write something. Received on Mon Mar 06 2006 - 10:05:27 CST

Original text of this message

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