DdlUtils
  1. DdlUtils
  2. DDLUTILS-96

Db2 database cannot extract table definition from database with schema

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: Core - DB2
    • Labels:
      None
    • Environment:
      DB2 database with schema and userid does not match schema name

      Description

      Using a db2 database with a schema a stack trace occurs when trying to extract the ddl from the datbase.

      the stack trace point to
      org.apache.ddlutils.platform.JdbcModelReader.determineAutoIncrementFromResultSetMetaData(...)
      ...
      query.append (" FROM ");
      if (getPlatform().isDelimitedIdentifierModeOn())

      { query.append(getPlatformInfo().getDelimiterToken()); }

      query.append(table.getName());

      the schema is missing in the generated sql.

      I hacked it by checking if a schemaName existed in the table
      object and appending the table.getSchema() [?] +"." then the table name.

        Issue Links

          Activity

            People

            • Assignee:
              Thomas Dudziak
              Reporter:
              jim vester
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development