diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java index 5762523ef..f49cd42fc 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java @@ -279,6 +279,10 @@ public class DB2Dictionary break; case db2ISeriesV5R3OrEarlier: case db2ISeriesV5R4OrLater: + lastGeneratedKeyQuery = "SELECT IDENTITY_VAL_LOCAL() FROM " + + "SYSIBM.SYSDUMMY1"; + nextSequenceQuery = "SELECT NEXTVAL FOR {0} FROM " + + "SYSIBM.SYSDUMMY1"; validationSQL = "SELECT DISTINCT(CURRENT TIMESTAMP) FROM " + "QSYS2.SYSTABLES"; sequenceSQL = "SELECT SEQUENCE_SCHEMA, "