What is the maximum length of varchar allowed

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
harsh_cs31
Participant
Posts: 9
Joined: Fri Jul 17, 2009 11:42 am

What is the maximum length of varchar allowed

Post by harsh_cs31 »

Hi,

Iam using varchar(max), varchar(4000) and varchar(5000) in the ODBC Source.
I think such large types are not allowed.
Can sombody tell me what is the max type I can use for datastage.

Thanks!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

DataStage can use much larger strings. Oracle and DB2, for instance, have limits on VarChar() sizes and I am fairly certain that the ODBC definition also limits strings.

Specifically, which database and version are you interested in?
harsh_cs31
Participant
Posts: 9
Joined: Fri Jul 17, 2009 11:42 am

Post by harsh_cs31 »

Iam using the SQL Server 2005 as the DB and Datastage 8.1 Parallel Version.
It is giving me an error datatype not supported because of the lenght of these three columns.

When trying to load using ODBC, datastage is not able to do so.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Important is also your table definition, I would think that if your table definition as well as ODBC definition is VarChar(4000) that should go through without a problem.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage IS able to do so, but may you have to tune the maximum number of columns and, probably, maximum buffer size for the DSN. You do this in the uvodbc.config file using MAXFETCHCOLS and MAXFETCHBUFF parameters. Of course, the maximum size of a VarChar column is limited by the ODBC driver itself. It's probably 4096. Beyond that you have to go to LongVarChar, which goes to 65536 for most ODBC drivers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply