2008年3月26日

[SQL2005][SSIS]DTS_E_OLEDBERROR when executing SSIS package

When executing SSIS package imports data from Excel file into SQL 2005 Database
I get the following error

Error 0xc0202009: Data Flow Task: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
(SQL Server Import and Export Wizard)
Error 0xc0202025: Data Flow Task: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
(SQL Server Import and Export Wizard)
Error 0xc004701a: Data Flow Task: component "Destination - Employee" (205) failed the pre-execute phase and returned error code 0xC0202025.
(SQL Server Import and Export Wizard)

SQL 2005 checks data type before actually imports data from source to destination
For example, an Access column with MEMO data type is limit to 65536 bytes, which is greater than a SQL nvarchar's limitation.
This generates a DTS_E_OLEDBERROR when executing SSIS package.


To fix this behavior, map destination data column to a different data type, or increase its length(for example, nvarchar(50) to nvarchar(max))

沒有留言:

Blog Archive

About Me