My Oracle Support Banner

Why the Sequence.currval is not equal to the last sequence.nextval on RAC (Doc ID 2588246.1)

Last updated on OCTOBER 23, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 7.0.16.0 and later
Information in this document applies to any platform.

Symptoms

In RAC:

Session 1:
SQL> create sequence customers_seq start with 10 increment by 2;

Sequence created.


SQL> select customers_seq.nextval from dual;

   NEXTVAL
----------
10

SQL> /

   NEXTVAL
----------
12


then , session 2:

SQL> select customers_seq.nextval from dual;

   NEXTVAL
----------
14

SQL> select customers_seq.nextval from dual;

   NEXTVAL
----------
16

then, back to session 1:

SQL> select customers_seq.currval from dual;

   CURRVAL
----------
12


Why doesn't it return 16?


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.