HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Silent truncation of last character when using SSIS with Oracle

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
lastwithssistruncationcharactersilentusingwhenoracle

Problem

I am using SSIS to export data from an Oracle database. Sometimes when I export a VARCHAR2 column to NVARCHAR the last character gets truncated (silently). It's completely random as far as I can tell. I have tried using different SSIS data types (DT_STR, DT_WSTR and DT_NTEXT) but the problem persists. The source string is always 12 characters long ([0-9A-Z] only), but when I check the destination database some columns are missing the last character.

I use the latest 32bit Oracle Instant Client (11.2) with ODBC and SQL Server 2008 R2. I use ADO .NET for both source and destination. The source character set is AMERICAN_AMERICA.WE8ISO8859P1 and the source and destination columns are declared as VARCHAR2 (12 BYTES) and NVARCHAR(12) respectively.

Solution

It looks like the problem was caused by a data flow task where I had two different data flows running in parallel. The same source tables were involved in both data sources but with different destinations. When I broke the task up into two tasks running one after the other, the truncation problem seems to have gone away.

Context

StackExchange Database Administrators Q#15973, answer score: 4

Revisions (0)

No revisions yet.