Link to home
Start Free TrialLog in
Avatar of sqlcurious
sqlcuriousFlag for United States of America

asked on

SSIS error when loading a csv file

Error when loading a CSV file in SSIS And Sql import export and import wizard


Hi experts, I am trying to load a csv file in the data flow task using the flat file connection and destination as OLEDB, this is the error I get, I tried increasing the field lengths but doesn't help, am trying to use derived columns but doesn't let me change the datatypes, please help

  " could not be processed because more than one code page(65001 and 1252) are specified for it"

 I tried to load the file using the sql server export and import wizard and here are the errors:
 Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 2" 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 2" (18)" failed because truncation occurred, and the truncation row disposition on "output column "Column 2" (18)" 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 "C:\Users\shlab\Desktop\Huction.csv" on data row 1.
  (SQL Server Import and Export Wizard)
 
 Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - Huction_csv" (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)
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

I'd suggest you first try a different CSV file as the flat file datasource to see if you still get the same error.

Have you tried the simplest possible import (to a new rather than existing table)?
ASKER CERTIFIED SOLUTION
Avatar of Zberteoc
Zberteoc
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Error code 4 is almost always that your incoming data is too wide for your target destination. If you're sure that all your fields should be 8 characters wide, say, and you get this, then try using a target with all fields 400 characters wide, for instance, and, if it imports ok into that, use SQL to find the bad records and repair them. You can then move the cleaned data to where it should end up and complain to the people providing it!

Good luck

Mike
If  your csv/excel file has less no of character in initial rows for column and then after rows hiegher not of characters then SSIS automatically sense length from initial rows.

so here you have workaround; Change registry information as specified in below link

http://support.microsoft.com/kb/281517
Avatar of sqlcurious

ASKER

Thanks and also I had to set the code page to 65001