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.

 
Go Back  dBforums > Database Server Software > DB2 > Is there a way to change the max length of table names?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-07, 11:33
mr_coffee mr_coffee is offline
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
Reply With Quote
  #2 (permalink)  
Old 10-22-07, 11:44
Marcus_A Marcus_A is offline
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.
Reply With Quote
  #3 (permalink)  
Old 10-22-07, 11:59
mr_coffee mr_coffee is offline
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
Reply With Quote
  #4 (permalink)  
Old 10-22-07, 12:09
Marcus_A Marcus_A is offline
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
Reply With Quote
  #5 (permalink)  
Old 10-22-07, 13:26
nidm nidm is offline
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.
Reply With Quote
  #6 (permalink)  
Old 10-23-07, 12:52
mr_coffee mr_coffee is offline
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
Reply With Quote
  #7 (permalink)  
Old 03-06-12, 05:12
hoanglinhkd hoanglinhkd is offline
Registered User
 
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?
Reply With Quote
  #8 (permalink)  
Old 03-06-12, 05:35
przytula_guy przytula_guy is offline
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
Reply With Quote
  #9 (permalink)  
Old 03-06-12, 21:55
hoanglinhkd hoanglinhkd is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On