[ 
https://issues.apache.org/jira/browse/DDLUTILS-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sondre Eikanger Kvalø updated DDLUTILS-250:
-------------------------------------------

    Description: 
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)

  was:
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 maxColumnNameLength 
will be 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)


> 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.

Reply via email to