Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 0xc02020a1 error when importing.

Author  Topic 

taunt
Posting Yak Master

128 Posts

Posted - 2014-06-06 : 19:33:10
Hello I'm getting this error while trying to imprt a txt file into sql:


- Executing (Error)
Messages
• Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 22" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

• Error 0xc020902a: Data Flow Task 1: The "output column "Column 22" (98)" failed because truncation occurred, and the truncation row disposition on "output column "Column 22" (98)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)

• Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "Y:\update.txt" on data row 22.
(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - update_txt" (1) returned error code 0xC0202092. 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.
(SQL Server Import and Export Wizard)


I'm importing the txt file into a new table. How can I fix the error.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-06-06 : 19:35:47
The import package is configured to fail if a column's data will be truncated due to the size of the column and how big the data is in the file. Expand the column, fix the file, or change the package so that it doesn't fail on this condition. I would expand the column, but it's up to your business requirements for this import.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

taunt
Posting Yak Master

128 Posts

Posted - 2014-06-09 : 14:38:05
Would I need to do this to turn warnings off?

SET ANSI_WARNINGS OFF


quote:
Originally posted by tkizer

The import package is configured to fail if a column's data will be truncated due to the size of the column and how big the data is in the file. Expand the column, fix the file, or change the package so that it doesn't fail on this condition. I would expand the column, but it's up to your business requirements for this import.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-06-09 : 14:41:29
You could try that, but the data is going to be chopped off. Is that what you want? Is that what the business wants? Why not expand the column to fit the data?

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -