Announcement Announcement Module
Collapse
No announcement yet.
Issue using schema-db2.sql Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue using schema-db2.sql

    Hi all,

    I am trying to set up the required tables on a db2 database using schema-db2.sql (spring-batch-core-1.0.0.FINAL.jar) . I am getting the below exception. Is this a known issue?

    >[Error] Script lines: 28-42 ------------------------
    DB2 SQL error: SQLCODE: -107, SQLSTATE: 42622, SQLERRMC: JOB_INSTANCE_EXECUTION_FK;18
    Message: The name "JOB_INSTANCE_EXECUTION_FK" is too long. The maximum length is "18". 

    >[Error] Script lines: 43-55 ------------------------
    DB2 SQL error: SQLCODE: -107, SQLSTATE: 42622, SQLERRMC: JOB_INSTANCE_PARAMS_FK;18
    Message: The name "JOB_INSTANCE_PARAMS_FK" is too long. The maximum length is "18". 

    >[Error] Script lines: 56-73 ------------------------
    DB2 SQL error: SQLCODE: -107, SQLSTATE: 42622, SQLERRMC: JOB_EXECUTION_STEP_FK;18
    Message: The name "JOB_EXECUTION_STEP_FK" is too long. The maximum length is "18". 

    >[Error] Script lines: 74-87 ------------------------
    DB2 SQL error: SQLCODE: -107, SQLSTATE: 42622, SQLERRMC: STEP_EXECUTION_CONTEXT_FK;18
    Message: The name "STEP_EXECUTION_CONTEXT_FK" is too long. The maximum length is "18". 

  • #2
    I haven't heard of it before, but it's hard to test the schema against so many database types, especially since an error could show up in one version and not the other. I'll have a few of the projects I work with that use DB2 try the latest just to make sure though.

    Also, what version of DB2 are you using, and what actions (if any) did you take to fix the issue? (Just in case someone else has the same problem)

    Comment


    • #3
      Right now, I don't have the exact Db2 version but I am guessing it might be V7.x. I will post the exact version tommorrow. I found a similar issue in hibernate. Check http://opensource.atlassian.com/proj...rowse/HHH-2623

      Comment


      • #4
        My guess was incorrect. It seems we are using DB2 V9 FP4. I checked out DB2 V9 documentation and it says that constraint name is limited to 18 bytes.

        http://publib.boulder.ibm.com/infoce...c/r0001029.htm

        DB2 and Sybase are the preferred databases in my company. Since there is an existing issue with Sybase (http://jira.springframework.org/browse/BATCH-328 ) I am unable to use it as a repository database . And I don't know how to resolve this issue since its a core DB2 issue.

        Any suggestions?

        Comment


        • #5
          Change the name of the foreign keys? You can do that locally.

          Comment


          • #6
            We're not tied to the constraint names. There's nothing in the framework that will break if you rename them.

            Comment


            • #7
              Thanks for the suggestion. I will give it a try.

              Comment

              Working...
              X