Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2007
    Posts
    28

    Unanswered: Is there a way to change the max length of table names?

    Hello everyone I'm running into a big problem, it seems DB2 doesn't support table names longer than 30 characters, is there anyway to override this setting?

    The problem is I'm mapping another database and its table names are quite long for instance I'm getting this error:
    SQL0107N The name "DetailLayoutParmListForSelectedResource" is too long. The
    maximum length is "30". SQLSTATE=42622

    I can't change the name of this table or else it will mess up a lot of data, any ideas on how I can get around this issue?

    I'm loading in DB2 DDL when I get this errror from the command line editor.

    Thanks.

    -Cory
    IBM: Tivoli zSeries Co-op

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    DB2 supports table names of 128 characters. Schemas, authorization names, and columns can only be 30 characters in V8 (not sure about 9).
    Last edited by Marcus_A; 10-22-07 at 12:49.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Aug 2007
    Posts
    28
    Ah your right Marcus, I meant column names, thats a column name:
    DetailLayoutParmListForSelectedResource


    So there is no way to change the field name max length, it must be <= 30 characters in length?

    Looks like the original maker of these tables went a little name crazy :P
    IBM: Tivoli zSeries Co-op

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    If you don't already have V9, check the manual to see if it increased. I only know about DB2 V8.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    May 2003
    Posts
    113
    Quote Originally Posted by Marcus_A
    If you don't already have V9, check the manual to see if it increased. I only know about DB2 V8.
    I believe V9 stays on 30.

  6. #6
    Join Date
    Aug 2007
    Posts
    28
    Yes it seems there is no way around it so I just added a section of code to my program to rename the massive field names that are longer than 30 characters and fixed the issue.
    IBM: Tivoli zSeries Co-op

  7. #7
    Join Date
    Mar 2012
    Posts
    2

    Red face Is there a way to change the max length of table names?

    Quote Originally Posted by mr_coffee View Post
    Yes it seems there is no way around it so I just added a section of code to my program to rename the massive field names that are longer than 30 characters and fixed the issue.
    Please, How did you fix it?

  8. #8
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    column name is limited to 128 in 9.7
    with this remark
    The SQLDA structure is limited to storing 30-byte column names, 18-byte user-defined type names, and 8-byte schema names for user-defined types.
    see
    SQL and XML limits - IBM DB2 9.7 for Linux, UNIX, and Windows
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  9. #9
    Join Date
    Mar 2012
    Posts
    2

    Cool

    Quote Originally Posted by przytula_guy View Post
    column name is limited to 128 in 9.7
    with this remark
    The SQLDA structure is limited to storing 30-byte column names, 18-byte user-defined type names, and 8-byte schema names for user-defined types.
    see
    SQL and XML limits - IBM DB2 9.7 for Linux, UNIX, and Windows
    thanks for support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •