| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

10-22-07, 11:33
|
|
Registered User
|
|
Join Date: Aug 2007
Posts: 28
|
|
|
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
|
|

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

10-22-07, 11:59
|
|
Registered User
|
|
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
|
|

10-22-07, 12:09
|
|
Registered User
|
|
Join Date: May 2003
Location: USA
Posts: 5,196
|
|
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
|
|

10-22-07, 13:26
|
|
Registered User
|
|
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.
|
|

10-23-07, 12:52
|
|
Registered User
|
|
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
|
|

03-06-12, 05:12
|
|
Registered User
|
|
Join Date: Mar 2012
Posts: 2
|
|
Is there a way to change the max length of table names?
Quote:
Originally Posted by mr_coffee
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?

|
|

03-06-12, 05:35
|
|
Registered User
|
|
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
|
|
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
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
|
|

03-06-12, 21:55
|
|
Registered User
|
|
Join Date: Mar 2012
Posts: 2
|
|
Quote:
Originally Posted by przytula_guy
|
thanks for support. 
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|