On Sat, 18 May 2002 17:50:03 +0200 "Peter Sch�fer" <[EMAIL PROTECTED]> wrote: > Jon Bloom schrieb: > > For some reason the sequence I've created seems to keep resetting itself. The >sequence was created using: > > > > exec sql CREATE SEQUENCE "CERT_REQ_ID_SEQ" INCREMENT BY 1 START WITH 1 NOCYCLE >CACHE 1; > > > > After some indetrminate period of inactivity (hours), the next use of >CERT_REQ_ID_SEQ.NEXTVAL returns 1 and the sequence counts up from there. > > > > Any ideas? > > Hm. Maybe you haven't commited your transaction and it was > rolled back after some transaction timeout?
No, but I think I figured it out... if you run the precompiler with -H check, it executes the SQL statements, then rolls back the result. That's fine for tables, but apparently changes to sequences can't be rolled back. So what was happening was that the sequence got dropped and recreated each time I precompiled my program that creates the database, even though I didn't actually run the program. Something to keep in mind! (I solved the immediate problem by setting -H nocheck.) Jon _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
