[
https://issues.apache.org/jira/browse/DDLUTILS-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12724546#action_12724546
]
Sondre Eikanger Kvalø commented on DDLUTILS-250:
------------------------------------------------
A workaround is to invoke
PlatformFactory.registerPlatform(Db2Platform.DATABASENAME,
Db2v8Platform.class); prior to calling
PlatformFactory.createNewPlatformInstance(DataSource). You will then get a
Db2v8Platform object instead of a Db2Platform object (maxColumnNameLength will
then be 18 characters).
> The DB2Builder makes column names to short
> ------------------------------------------
>
> Key: DDLUTILS-250
> URL: https://issues.apache.org/jira/browse/DDLUTILS-250
> Project: DdlUtils
> Issue Type: Bug
> Components: Core - DB2
> Affects Versions: 1.0
> Environment: Windows, DB2 9.5
> Reporter: Sondre Eikanger Kvalø
> Assignee: Thomas Dudziak
>
> The DB2Platform class restricts column names to 18 characters (or 30 for
> Db2v8Platform), which is fine for legacy DB2. These days DB/2 supports
> column names with up to 128 bytes (DB2 9.7) .
> Since DB2 9.X will use DB2Platform (and not Db2v8Platform) the
> maxColumnNameLength will be set to 18 for DB2 9.X database connections.
> Because of this the DB2Builder will shorten column names longer than 18,
> which in many conditions is to short.
> Possible solutions:
> - autodetect DB2 version and set the "maxColumnNameLength" and property
> accordingly (the best fix IMHO as it only affects DB2 implementation)
> - make it posible to override this setting by either provide a property set
> to PlatformFactory (breaks the idea of hiding DBMS specific implementation
> details to the DDLutils user)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.