Steam
Steam

Reputation: 9856

Cannot extract DATE from SSIS 2008 OLEDB Source

I am trying to simply extract data from sql server which supports DATE and dump it (without changes) into a SQL server which does not support DATE, but supports DATETIME. Now, my SSIS package uses only one data flow task with oledb source and destination. The source task executes SQL to fetch data. The source SQL task fails all the time with a a error given below. Can someone please help me to find out the reason and fix this ?

Thanks.

Error -

[GET MY DATA [1]] Error: There was an error with output column 
"A_DATE_COLUMN" (62) on output "OLE DB Source Output" (11). The 
column status returned was: "Text was truncated or one or more 
characters had no match in the target code page.".

[GET MY DATA [1]] Error: The "output column "A_DATE_COLUMN" (62)" 
failed because truncation occurred, and the truncation row disposition 
on "output column "A_DATE_COLUMN" (62)" specifies failure on truncation. 
A truncation error occurred on the specified object of the specified component.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  
The PrimeOutput method on component "GET MY DATA" (1) returned error 
code 0xC020902A.  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.

Upvotes: 1

Views: 603

Answers (1)

Steam
Steam

Reputation: 9856

On your source task ,right-click - > Show Advanced Editor - > Input and Output Properties - > Source Output - > Output Columns - >Data Type Properties - > Data Type /Length

Change ( Data Type /Length) in both source & destination in similar way as per your requirement.

I changed the Data Type to DT_DBTIMESTAMP and it worked. Earlier it was Unicode string [DT_WSTR] and I don't know why it was like that. There was no need to change the value of TruncationRowDisposition option.

NOTE - This answer was taken from - http://social.technet.microsoft.com/Forums/en-US/5cbdea26-3951-4fd8-b53b-3db6a17b088e/-text-was-truncated-or-one-or-more-characters-had-no-match-in-the-target-code-page?forum=sqlintegrationservices

Upvotes: 1

Related Questions