It should be outputting both an add primary key statement and a REORG
statement.  From what I could tell, DB2 liked to/needed to have reorg
called after an add primary key.

 

Is the add primary key statement not being sent?  You are running maven,
correct?

 

Nathan

 

From: Thanh Nguyen [mailto:[email protected]] 
Sent: Wednesday, March 04, 2009 12:17 PM
To: [email protected]
Subject: [Liquibase-user] REORG function for an addPrimary

 

        
                

Hi all,


I am executing this changeset on a DB2 database:

 

    <changeSet id="create-constraints" author="silanis">

            <addPrimaryKey tableName="AWS_MERCHANT
constraintName="PK_AWS_MERCHANT"
columnNames="MERC_NAME"/>

    </changeSet>

 

Strangely, Liquibase generates a "REORG" call instead of the expected
add primary key:

 

org.apache.maven.lifecycle.LifecycleExecutionException: Error setting up
or running Liquibase: Migration failed for change set
target/classes/changelogs/changelog-Z.5-create-constraints.xml::create-c
onstraints-AWS_MERCHANT::silanis:

     Reason: liquibase.exception.JDBCException: Error executing SQL CALL
SYSPROC.ADMIN_CMD ('REORG TABLE SCHEMA_SOURCE.AWS_MERCHANT'):

          Caused By: Error executing SQL CALL SYSPROC.ADMIN_CMD ('REORG
TABLE SCHEMA_SOURCE.AWS_MERCHANT'):

          Caused By: DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884,
SQLERRMC: SYSPROC.ADMIN_CMD;PROCEDURE

            at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:583)

            at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:499)

 

 

??? Help please...

 

tom nguyen.

        
        
        

 

________________________________

 <http://us.i1.yimg.com/us.yimg.com/i/ca/iotg_search.jpg> Yahoo! Canada
Toolbar : Search from anywhere on the web and bookmark your favourite
sites. Download it now! <http://ca.toolbar.yahoo.com/> 

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Liquibase-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/liquibase-user

Reply via email to