Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

NEXTVAL not permitted error executiing the OpenEdge SQL NEXTVAL function

« Go Back

Information

 
Article Number000053858
EnvironmentProduct: OpenEdge,
Version: OpenEdge 10.2A03, 10.2B01, 11.x
OS: All supported platforms
Other: SQL NEXTVAL function
Question/Problem Description
Invoking the OpenEdge SQL NEXTVAL function with READ UNCOMMITTED Transaction Isolation Level generates a run time error.

The OpenEdge SQL NEXTVAL function fails when the Transaction Isolation Level is READ UNCOMMITTED.
 
Steps to Reproduce
Clarifying Information
The OpenEdge SQL NEXTVAL function works in 10.1C when the Transaction Isolation Level is READ UNCOMMITTED.
Error MessageError: NEXTVAL not permitted in the Read Uncommitted isolation level. (15769)
Defect/Enhancement NumberDefect PSC00221892
Cause
This is expected behavior. Updates to the database are not permitted at the Read Uncommitted isolation level. However, NEXTVAL updates a database block as part of the increment of the sequence value.

Defect PSC00221892 allowed the OpenEdge SQL NEXTVAL function to work in 10.1C in READ UNCOMMITTED Transaction Isolation Level.  This defect was fixed in OpenEdge 10.2A03, 10.2B01, and 11.x.

 
Resolution
Do not call the OpenEdge SQL NEXTVAL function when the Transaction Isolation Level is set to READ UNCOMMITTED.  Set the Transaction Isolation Level to at least READ COMMITTED before invoking the OpenEdge SQL NEXTVAL function. If desired, use the WITH (NOLOCK) record locking hint to avoid record locking.
Workaround
Notes
References to Other Documentation:

OpenEdge Data Management: SQL Development, Chapter 8, "Data Control Language and Transaction Behavior > Transactions and Isolation Levels"
OpenEdge Data Management: SQL Reference, Chapter 2, "OpenEdge SQL Functions > NEXTVAL"
OpenEdge Data Management: SQL Reference, Chapter 1, "OpenEdge SQL Statements > SELECT > WITH clause"
Attachment 
Last Modified Date2/2/2015 8:16 PM