[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5208) Oracle 11g R2 RAC - Test SequenceIdentityTest fails because first value of sequence is "2"

Strong Liu (JIRA) noreply at atlassian.com
Sat May 8 14:46:49 EDT 2010


Oracle 11g R2 RAC - Test SequenceIdentityTest fails because first value of sequence is "2"
------------------------------------------------------------------------------------------

                 Key: HHH-5208
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5208
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.5.1, 3.5.x
         Environment: Oracle 11g R2 (RAC)
            Reporter: Strong Liu


Starting with Oracle 11g R2 (RAC), the behavior of the CREATE TABLE statement has changed, when creating a conventional table in a database created with the default options then the initial segment is not created until the first row is inserted into the table.
see http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/tables002.htm#ADMIN13319 for more details.
We found a potential downside to this change :
The sequences created as default ( start with 1 increment by 1) are not staring with '1′ when used in insert query script, Instead they are starting with 2 or 4, this can not be changed even explicitly tell Oracle that the first value is "1".
In another words, when using Hibernate with Oracle 11g R2 (RAC), if the ID generator class is "sequence-identity", the first value is NOT 1.

Two ways to work around this issue:
1. Using another ID generator class.
2. Disable deferred segment creation of Oracle by setting the initialization parameter DEFERRED_SEGMENT_CREATION to FALSE. The new clauses SEGMENT CREATION DEFERRED and SEGMENT CREATION IMMEDIATE are available for the CREATE TABLE statement. These clauses override the setting of the DEFERRED_SEGMENT_CREATION initialization parameter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list