Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am facing this problem since very long.

I am fetching the data from source (i.e DB2) into SQL server 2008.

while doing that I have got this error.

VB
Error #1
[OLE DB Source [1]] Error: There was an error with output column "ZONE" (185) on output "OLE DB Source Output" (11). The column status returned was: "The value could not be converted because of a potential loss of data.".

Error #2
[OLE DB Source [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "ZONE" (185)" failed because error code 0xC0209072 occurred, and the error row disposition on "output column "ZONE" (185)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.

Error #3
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0209029.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.


Pls Help !!!!!!!!!!!
Posted
Comments
Andy Lanng 18-Jun-15 6:48am    
this error is due to a datatype conversion that would be a 'lossy conversion'

Show us your code. Show us your query. Show us your data.
Rohit Lal 18-Jun-15 7:22am    
Query
===============FIRED ON SOURCE TABLE
SELECT
CIRCLENAME,NODE,siteid,zone,cluster,ALARMCODE, evnttime,CLEAR_TIME,FIRSTOCCURRENCE,LASTOCCURRENCE,LOGTICKET
FROM DB2CDC. REPORTER_STATUS WHERE
(EVNTTIME BETWEEN '2015-06-15-00.00.00.000000' AND '2015-06-15-23.59.59.000000')
WITH UR
==========DATA TYPE IN DB2=====
CIRCLENAME (VARCHAR(15))
NODE (VARCHAR(64))
SITEID (VARCHAR(45))
ZONE (VARCHAR(20))
CLUSTER (VARCHAR(25))
ALARMCODE (VARCHAR(12))


Truncation only happened in above column. I have specified the same column and data type in sql table.
Andy Lanng 18-Jun-15 8:21am    
Ok - better. For sake of ease I have posted my reply as a solution.
CHill60 18-Jun-15 6:54am    
In addition to Andy's comment above, you could have typed "Please help!" instead of "Pls Help !!!!!!!!!!!", saved yourself 8 keystrokes and have avoided looking childish. Avoid text-speak if you don't want to appear unprofessional.

Start by checking the column definitions in each table: the chances are that either:
1) A DB2 text column is longer than the SQL table equivalent, so SQL is complaining that it would have to truncate data.
Or
2) The DB2 column contains binary data and you are trying to insert it to a text based SQL column.

Sorry, but we can't be specific without specific information.
 
Share this answer
 
Comments
Rohit Lal 18-Jun-15 7:22am    
Query
===============FIRED ON SOURCE TABLE
SELECT
CIRCLENAME,NODE,siteid,zone,cluster,ALARMCODE, evnttime,CLEAR_TIME,FIRSTOCCURRENCE,LASTOCCURRENCE,LOGTICKET
FROM DB2CDC. REPORTER_STATUS WHERE
(EVNTTIME BETWEEN '2015-06-15-00.00.00.000000' AND '2015-06-15-23.59.59.000000')
WITH UR
==========DATA TYPE IN DB2=====
CIRCLENAME (VARCHAR(15))
NODE (VARCHAR(64))
SITEID (VARCHAR(45))
ZONE (VARCHAR(20))
CLUSTER (VARCHAR(25))
ALARMCODE (VARCHAR(12))


Truncation only happened in above column. I have specified the same column and data type in sql table.
First - double check the column types. Run this on both tables
sp_help 'table_name'. You will see some columns specifying length, precision and scale. These should all match.

Next: maybe something else is happening that you can't see. Try this:
SELECT * FROM sys.triggers WHERE OBJECT_ID = OBJECT_ID('table_name'). If there is a trigger then that maybe trying to something else with your data.

Reply if both of those check out

EDIT: OP reports columns and triggers check out fine.

This may be a specific framework issue that use some 3rd party ODBC drivers. These drivers can mess up the datatypes in translation.

Take a look at this discussion on the driver issues. There is a hotfix and it may be the fix you need:

https://support.microsoft.com/en-us/kb/969845[^]
 
Share this answer
 
v2
Comments
Rohit Lal 18-Jun-15 9:28am    
DB2 SP HELP

NAME TBNAME COLTYPE NULLS CODEPAGE DBCSCODEPG LENGTH
ALARMCODE REPORTER_STATUS VARCHAR Y 1208 1200 12
CIRCLENAME REPORTER_STATUS VARCHAR Y 1208 1200 15
CLUSTER REPORTER_STATUS VARCHAR Y 1208 1200 25
NODE REPORTER_STATUS VARCHAR Y 1208 1200 64
SITEID REPORTER_STATUS VARCHAR Y 1208 1200 45

SQL SP HELP

Column_name Type Computed Length Prec Scale
CIRCLENAME varchar no 15

NODE varchar no 64

SITEID varchar no 45

ZONE varchar no 20

CLUSTER varchar no 25

ALARMCODE varchar no 12

No triggers found in both side (source and destination table).
I am new to this.
Rohit Lal 18-Jun-15 9:30am    
Still showing same error.
Andy Lanng 18-Jun-15 9:50am    
Ok - I have found a possible issue which there is a hotfix for. Please read the article carefully to ensure that it applies to your situation (I'm pretty sure it does)
Let me know the outcome ^_^
Rohit Lal 18-Jun-15 10:25am    
Hotfix applied but still facing this issue
Andy Lanng 18-Jun-15 11:05am    
Has this ever worked? If so, did something change?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900