cur_val / next_val.... having problems
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Solaris: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
I'm not sure how or what to search for on this anymore. So please forgive the vagueness of it.
I have a customer that is running a C++ loader. No changes had been made, but one day it worked, the next day it failed throwing the error of:
ORA-08002: sequence NRV_SETMEAS_SEQ.CURRVAL is not yet defined in this session
Prior to this, the error was never thrown. It's all coded and automated. The loader is executed with a file as a variable to call the data.
I have been searching the net for answers and everything says to just call nextval first, so that it increments for currval.
Is there a way to trace why it's not being set? Or would the simple thing be to just prepend the nextval construct to the code and be done with it?
I don't want to band-aid the problem, but I don't want to spend a ton of time on something when that is the simple fix.
Thanks.