I got ” ORA-08002: sequence MY_SEQ.CURRVAL is not yet defined in this session ” error in Oracle database.
ORA-08002: sequence MY_SEQ.CURRVAL is not yet defined in this session
Details of error are as follows.
SQL> select seq_msd.currval from dual;
select seq_msd.currval from dual
* ERROR at line 1:
ORA-08002: sequence SEQ_MSD.CURRVAL is not yet defined in this session
On : 12.2.4 version, Customers Module Attempting to create a customer and receive the following error: ERROR ----------------------- ORA-08002: sequence HZ_PARTIES_S.CURRVAL is not yet defined in this session Steps to Reproduce: Responsability: Trading Community Manager Navigation: Trading Community > Customers > Standard This issue occurs when you tried to execute a CURRVAL command on a sequence before the NEXTVAL command was executed at least once.
To solve this error, execute the following script.
select my_seq.nextval from dual; select my_seq.currval from dual;
CURRVAL function must be called after NEXTVAL funtion. Otherwise you will get the following error.
SQL> select seq_msd.currval from dual; select seq_msd.currval from dual * ERROR at line 1: ORA-08002: sequence SEQ_MSD.CURRVAL is not yet defined in this session SQL> select seq_msd.nextval from dual; NEXTVAL ---------- 9 SQL> select seq_msd.currval from dual; CURRVAL ---------- 9 SQL>
sequence HZ_PARTIES_S.CURRVAL is not yet defined in this session
This ORA-08002 is related with the addressed in Bug 18955265 GETTING ERROR MESSAGE WHILE CREATING ORGANIZATION All these instances are created by using the same template. Sequence CURRVAL/NEXTVAL is not cached while creating these environments.
1. Bug Summary
While creating organization Getting error message as ” The Following SQL Error Occured: ORA-08002: sequence HZ_PARTIES_S.CURRVAL is not yet defined in this session.
Organization should create successfully.
2. Fixed Files
3. Recommended Patches
This fix may already be part of the latest Recommended Patch Collection (RPC). You are advised to apply the RPC instead of standalone patches to ensure your instance has all the critical fixes identified by development.Please review Note 1433375.2, this note is periodically updated to contain the latest information on the most recently released RPC.
4. Solution Steps
- Ensure that you have taken a backup of your system before applying the recommended patch.
- Apply the patch in a test environment.
- Confirm the file versions listed above, by navigating to the directory where the file is and using:
strings -a |grep ‘$Header’
- Retest the issue.
- Migrate the solution as appropriate to other environments.
- If the patch for your release is unavailable for download or needs a password, or if you experience any issues applying this patch, please contact the E-Business Patching Community for assistance.
914 views last month, 2 views today