Data Truncates While Writting to DB(SQL Server)

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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

View the input data in a test viewer(Hex editior).
Check whether you got some special character as end of record.
Also check the setting in the sequintial satage, about recored delimeter.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Post by eze_ke »

Hi

I checked the Input Data,which is fine.No special charaters
Also tryed hard coding the values in transformer stage but still i get the truncated data in table

all last charcters of character fields are being truncated

please suggest
Thank
eze
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

What is the purpose of the Transformer stage? Can you add a Sequential output and verify the results are correct?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Post by eze_ke »

i get the out put in the sequential file as expected (no truncation)
its only when iam trying to load in SQL Server (Table)
Thank
eze
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Are you sure that one is not a nvarchar?
Mamu Kim
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Post by eze_ke »

i still have the same problem Data Truncation while loading into SQL Server please suggest
Thank
eze
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Post by eze_ke »

when i use DS Server Job iam able to Load with out any truncation
iam using SQL Server 7.0(Dynamic RDBMS Stage)
please Suggest
Thank
eze
eze_ke
Participant
Posts: 38
Joined: Wed Mar 30, 2005 11:42 am

Post by eze_ke »

Hey guys no one has suggestions nor has come accross like this

please Suggest
Thank
eze
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Is the definition CHAR(7) that you have from the DS job or have you done a describe on the actual Database tables? Also, if you increase your table definition in the DDL does the truncation still happen (just one position later)?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

eze_ke wrote:Hey guys no one has suggestions nor has come accross like this

please Suggest
This is not a premium support site. Folks post as and when they can. Don't push. If you want urgent answers, sign up for premium service with your support provider, and learn the true cost of urgent.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

eze_ke, for my installation of SQL Server, I am having the same problem but I am using DRS stage. It is happening with one clumn, state_cd. It is a 2 character column. No matter what combination of data types I try on SQL Server side or DRS stage side (Datastage), the 2nd character gets cut off. I even tried adding blank characters to the right. Same problem!
splayer
Charter Member
Charter Member
Posts: 502
Joined: Mon Apr 12, 2004 5:01 pm

Post by splayer »

Ok. I think I have found a solution eventhough it is really iffy. DRS stage cuts off the last character from character columns. ODBC Enterprise stage cuts off the first character. Right before the DRS stage, you have to add a transformer where you have add a character to the right of the character column which get cutoff. You also need to increase the length of the character columns by 1. This worked for me. This same technique does NOT work for the ODBC Enterprise stage. Also, you cannot use BigInt during integer column load. You have to int.
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Hi,
Ascential told me that ODBC Enterprise Stage is limited to four databases: DB2, Informix, Oracle, Teradata. They wouldn't support using other databases period!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I wonder if that's documented anywhere? :x
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

yes. As stated in the codbccon.pdf:

Overview
The functionality of the ODBC Enterprise Stage for DataStage
Enterprise Edition is to extend the capabilities of DataStage to
communicate with external data sources. Currently, connectivity to
external data sources from the parallel canvas of DataStage is limited
to four databases: DB2, Informix, Oracle, and Teradata.
Post Reply