ORA-08002: sequence MY_SEQ.CURRVAL is not yet defined in this session

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

  1. Description
    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.
  2. Workaround
    None
  3. Resolution
    Organization should create successfully.

 

 

2. Fixed Files

R12.HZ.B:
ad_apply_patch.xml 120.4.12010000.1
ARHPTYTB.pls 120.6.12010000.4

R12.HZ.C:
ad_apply_patch.xml 120.4.12020000.4
ARHPTYTB.pls 120.6.12020000.4

 

3. Recommended Patches

R12.HZ.CPatch 18955265
R12.HZ.BPatch 18955265

NOTE:
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

  1. Ensure that you have taken a backup of your system before applying the recommended patch.
  2. Apply the patch in a test environment.
  3. Confirm the file versions listed above, by navigating to the directory where the file is and using:
    strings -a |grep ‘$Header’
  4. Retest the issue.
  5. Migrate the solution as appropriate to other environments.
  6. 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.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *