Windows error 0xC02020A1, -1071636319

Detailed Error Information

HRESULT analysis[1]

FlagsSeverityFailure
Reserved (R)true
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode32 (0x020)
NameFACILITY_BACKGROUNDCOPY[1][2]
DescriptionThe source of the error code is background copy control[1][2]
Error Code8353 (0x20a1)

Questions

71votes
6answers

Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column

I'm trying to insert a large CSV file (several gigs) into SQL Server, but once I go through the Import Wizard and finally try to import the file I get the following error report: * Executing (Error) Messages > Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data [...] read more
sql
sql-server
csv
18votes
7answers

SSIS Text was truncated with status value 4

I am developing a SSIS package, trying to update an existing SQL table from a CSV flat file. All of the columns are successfully updating except for one column. If I ignore this column on truncate, my package completes successfully. So I know this is a truncate problem and not [...] read more
text
csv
ssis
14votes
4answers

SQL Server Import wizard fails with incomprehensible message

I just want to import two columns from a flat file into a new table. I have set one column, 'Code', to be varchar(50), and another column, 'Description', to be nvarchar(max). The import fails with the following messages: - Executing (Error) Messages Error 0xc02020a1: Data Flow Task 1: Data conversion [...] read more
sql-server
sql-server-2005
ssis
9votes
6answers

Operation stopped while importing CSV file into SQL server

I am trying to import CSV file to SQL server database, with no success. I am still newbie to sql server. Operation stopped... * Initializing Data Flow Task (Success) * Initializing Connections (Success) * Setting SQL Command (Success) * Setting Source Connection (Success) * Setting Destination Connection (Success) * Validating [...] read more
sql-server
csv
4votes
5answers

Error importing 5 gig file into table

I am trying to do bulk insert into a table: use SalesDWH go BULK INSERT dbo.npi FROM 'S:\tmp\npi.csv' WITH (FIELDTERMINATOR=',',ROWTERMINATOR='\n',lastrow=200,firstrow=2) and getting this error: Msg 4866, Level 16, State 8, Line 3 The bulk load failed. The column is too long in the data file for row 1, column 329. [...] read more
sql
sql-server
sql-server-2008
3votes
1answer

SSIS Convert Blank Datetime column to NULL and Parse Input

I have the following simple SSIS Package to process a comma delimited file: enter image description here [https://i.stack.imgur.com/2R48n.png] I'm having problems with date columns - specifically MoveInDate which the input column has data in the format '20090731000000'. It goes into a database column MoveInDt which has a Datetime data type [...] read more
csv
datetime
ssis
etl
flat-file
3votes
1answer

SSIS Flat File [DT_DBTIMESTAMP] cant convert to SQL datetime2

I created a running SSIS and I tried inserting data without error to SQL Server but suddenly this error message pops up > Error: 0xC02020A1 at Data Flow Task, Flat File Source [59]: Data conversion > failed. The data conversion for column "SCB_ActualDTime" returned status value > 2 and status [...] read more
sql-server
ssis
etl
bids
3votes
1answer

issues importing .tsv to sql Server

I am trying to simply import a .tsv (200 column, 400,000 rows) to Sql Server. I get this error all the time (always with a different column): Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 93" returned status value 4 and status text [...] read more
sql-server
csv
ssis
3votes
2answers

SQL Server Import and Export wizard

I am importing a CSV file into an existing Database and am getting a few errors > * Executing (Error) Messages Error 0xc02020a1: Data Flow Task 1: Data > conversion failed. The data conversion for column "supervisor" returned > status value 4 and status text "Text was truncated or one [...] read more
sql-server
sql-import-wizard
3votes
2answers

Having problems importing CSV into table

I'm trying to import a CSV file into a table in order to do some queries. Eventually I'll automate this with SSIS to run daily. Unfortunately though, I'm getting an error. I've run the task import data. Then chose my flat file, Under advanced I set all the types based [...] read more
sql-server
sql-server-2008
3votes
0answers

SQL Server : data import failed via flat file Error 0xc02020a1: Data Flow Task 1: Data conversion failed

I am trying to upload a CSV file (comma delimited) to a SQL Server 2012 (vs 11.0.2100.60) table. I have created a table with all columns equal to nvarchar(MAX) for test purposes as I just want to get the data into the database just to test. Unfortunately, I keep getting [...] read more
sql
sql-server-2012
3votes
3answers

Import IIS log into SQL Server 2008 error

I'm trying to import IIS logs into SQL Server 2008. I get this error below. > Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data > conversion for column "cs(User-Agent)" returned status value 4 and status text > "Text was truncated or one or more characters had no [...] read more
sql-server
sql-server-2008
2votes
2answers

Importing a tab delimited file in SSIS with one field bigger than 255 characters

I am importing a tab delimited file and get this error . > Error: 0xC02020A1 at Task 3 - Data Load for Core Data, Flat File Source [14]: > Data conversion failed. The data conversion for column "Column 85" returned > status value 4 and status text "Text was truncated [...] read more
sql-server-2008
ssis
2votes
1answer

Load big text file in SQL Server

I want to load a very big file 3GB of text ( not comma separated ) just a text so each line in the text become a record my table structure should be like this LoadedTable ID bigint identity TLine varchar(max) I tried using SQL tasks to import data but [...] read more
sql-server
flat-file
2votes
1answer

SQL Server says data is too large for column?

I am attempting to import a very wide CSV file (339 columns) to a SQL Server table using SQL Server Management Studios Tasks -> Import Data wizard. When I setup the import and attempt to run it, it returns the following errors: > Error 0xc02020a1: Data Flow Task 1: Data [...] read more
sql-server
csv
ssis
azure-sql-database
ssms
2votes
0answers

SQL Server 2014 Import and Export Wizard Cannot Ignore Errors, Truncation

It seems that previous versions of SQL Server's Import / Export wizard would allow you to ignore errors or truncation issues. However, the 2014 version has no such option. I am trying to import a flat file of around 6 million records, and it choking around 400k records saying there [...] read more
sql
sql-server
import
2votes
1answer

SQL Server 2012 Bulk Insert with carriage returns in text fields?

I've seen variations of this question all over the place yet can't seem to get this to work. I need to be able to bulk insert data from a flat file where some of the text fields will contain carriage returns. I have set the flat file up to be [...] read more
sql
sql-server-2012
bulkinsert
carriage-return
2votes
2answers

Using SSIS to transfer a CSV file that contains SQL (i.e., potential special characters) in it

Using SSIS to transfer a CSV file that contains SQL in it. I'm using .NET to create a CSV file that I then transfer to a table using an SSIS package. The contents of the file is a 36 char GUID and any SQL text which could contain tabs characters, [...] read more
sql-server-2008
ssis
1vote
1answer

Error 0xc02020a1: Data Flow Task 1: Data conversion failed "Text was truncated or one or more characters had no match in the target code page."

I'm trying to import a text file in my mssql database via SSMS import utility and it's throwing below error: Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Notes" returned status value 4 and status text "Text was truncated or one or more characters [...] read more
sql-server
import
1vote
0answers

Splitting Records from pipe delimited Flat File using SSIS

I have a pipe delimited flat file with about 25,000 rows, but some rows have spaces, while others have several occurrences of the heading and subheading. I would like to keep only one heading row and omit all other heading rows, subheading rows, and rows with white spaces. I used [...] read more
file
ssis
split
record
flat
1vote
1answer

Import Large Cities Text File into SQL server

I'm trying to import Text file for cities name into SQL server 2012. The file is 1.45 GB, I'm using SQL Server Import and Export Wizard to do the job but each time I get this error: > * Copying to [dbo].[worldcitiespop] (Error) Messages Error 0xc02020a1: Data > Flow Task [...] read more
sql-server
import
sql-server-2012
ssis-2012
import-from-csv
1vote
1answer

SQL Server: Data import errors

I'm trying to import a data set into SQL server and I keep on getting the errror meesages below. I'm not sure what they mean or how to resolve the issue. Its an excel/csv file so I thought there may be line feeds that were causing the issue but I [...] read more
sql-server
import
1vote
1answer

Error in importing flat file in sqlserver

While using SQL Server Import and Export Wizard I got this error message: > Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data > conversion for column "abc" returned status value 4 and status text "Text was > truncated or one or more characters had no match in [...] read more
sql-server
flat-file
1vote
1answer

How to make SSIS truncate numeric field in Flat File Destination

I'd like some advice about handling truncation issues in SSIS. I have a column Col1 which is MONEY in a table. I'd like to output that to a text file (fixed width, ragged right). In the output file, the column which holds Col1 must only be 8 characters wide. In [...] read more
sql-server
ssis
1vote
1answer

Import Wizard Error

I'm hoping someone can help with a mystifying error. I have run a query in SQL Server, saved the results as a .csv, and then turned around and tried to import the .csv back into another database in SQL Server and create a table from it using the import wizard. [...] read more
sql-server
csv
ssis
bulkinsert
1vote
1answer

SQL Server: How to override Error 0xc02020a1: Data Flow Task 1: Data conversion failed

I'm using SQL Server Import Wizard to import a 260GB flat text file into a table. I have about 25 fields/columns per row and endless rows. The large text file has vertical bars as a column delimiter and {CR}{LF} as a row delimiter. My issue is this: some of the [...] read more
mysql
sql
sql-server
sql-server-2008
1vote
3answers

how to import flat file source to database using sql

im currently want to inport my data from flat file to the database. the flat file is in a txt file. in that txt file, i save a list of URLs. example: http://www.mimi.com/Hotels-g303188-Rurrenabaque-Hotels.html im using the SQL Server Import and Export wizard to do it. but when the time of [...] read more
sql
sql-server
ssis
1vote
2answers

Import into SQL Server 2003 from a CSV file Error

I've spent so many hours just trying to import CSV, Excel data into SQL Server 2003 using SSMS (2012). I've tried importing as an excel, as a CSV, and a text file all options have presented problems of their own. The biggest frustration now is when importing a CSV under [...] read more
sql-server
csv-import
1vote
1answer

Importing into SQL

Import.csv I am using Import Wizard to import this excel file into sql but everytime no matter what i try i receive a truncation error resulting in not importing it obviously. - Executing (Error) Messages Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column [...] read more
sql-server
excel
csv
truncate
0votes
2answers

Truncation Error when Importing Data SQL Server 2008

I'm trying to import data into SQL Server using the 'Import Wizard" and it fails with the error pasted below. I have tried 'Suggest Types' and manually set types to varchar 255. I've also set the global truncation error to ignore but it still stops the import. Is there an [...] read more
sql-server-2008
import
runtime-error
0votes
0answers

Issues with SQL import and colons

I am trying to import a tab-separated file with no text qualifiers that contains about 8 million records with 700 columns. The issue I am having is that there is a field that is causing the import to fail. the output is: Executing (Error) Messages > Error 0xc02020a1: Data Flow [...] read more
sql
sql-server
ssis
sql-import-wizard
0votes
2answers

SQL Import Wizard errors on importing a psv file

I am trying to import a psv (pipe delimited csv) into Microsoft SQL Server 2008R2 Express database table. There are only two fields in the psv, each field has more than 1000 characters. In the import wizard, I have the following settings: enter image description here [https://i.stack.imgur.com/ot8gU.png] enter image description [...] read more
sql-server-2014
0votes
1answer

SSIS: Data conversion failed from a Flat File Source

Good day. The following are the errors that had occured while processing the flat file: * Error: 0xC02020A1 at Task, File [1]: Data conversion failed. The data conversion for column "Column 0" returned status value 4 and status text "Text was truncated or one or more characters had no match [...] read more
windows
ssis
bids
flat-file
0votes
1answer

How to resolve SSIS Package Truncation error

SSIS Error: 0xC02020A1 Tying to import data to SQL 2008 from CSV file, I am getting below error. > Error: 0xC02020A1 at Data Flow Task, Source – Distribution by xyz > table from CSV [1]: Data conversion failed. > The data conversion for column "ID" returned status value 4 and [...] read more
sql
tsql
sql-server-2008
ssis
0votes
1answer

SSIS flat file source sql destination error

I have a csv file that has several fields, all of which are showing as: Datatype - string [DT_STR] OutputColumnWidth - 50 The mapping to my output SQL table is for fields that are all varchar(50). I'm on SQL Server 2012 and I'm using the SQL Server Native Client 11.0. [...] read more
sql-server
ssis
ssis-2012
0votes
0answers

How do a load a table that has a column that has more than 10000 characters?

I have an Excel file that the users can free text one column. In this case the users have some cases where they have over 10000 characters. I have seen from the message boards that the nvarchar(max) should work. I created a table that is just the column name and [...] read more
sql-server
create-table
0votes
0answers

Importing .csv into Microsoft SQL Server with wizard and suggested data types

Premise: I have a monster of a .csv with lots of balance sheet information that I need to import into Microsoft SQL Server 2016 using the Import/Export Wizard. I cannot use any other import method. I need to have some columns with numbers in a numeric data type, but cannot [...] read more
sql-server
csv
import
0votes
1answer

SQL SERVER, importing from CSV file. Data conversion error

I am trying to import data from a CSV file into a table. I am presented by this error: > "Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data > conversion for column "dstSupport" returned status value 2 and status text > "The value could not be converted [...] read more
sql
sql-server
sql-server-2008
0votes
1answer

Data Conversion Failed SQL

I am using the import and export wizard and imported a large csv file. I get the following error. Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "firms" returned status value 2 and status text "The value could not be converted because of a [...] read more
import
ssis
type-conversion
0votes
1answer

Piping Data from CSV File to OLEDB Destination in SSIS

I have a SSIS package in which I use a ForEach Container to loop through a folder destination and pull a single .csv file. Figure 1 [https://i.stack.imgur.com/Qq5Rf.png] The Container takes the file it finds and uses the file name for the ConnectionString of a Flat File Connection Manager. Within the [...] read more
sql-server
excel
csv
ssis
0votes
1answer

SQL Server Import from .tsv or .txt Error (using Import Wizard)

I am trying to import from a .tsv (or .txt) Flat File Source using the Import and Export Wizard in SQL Server 2016 (using SSMS). I have 3 files that I am importing, and the first two imported with no problems. The third file starts importing, but stops after ~100K [...] read more
sql
sql-server
csv
sql-server-2016
0votes
1answer

How to import local flat tab file into new table within database using SQL Server 2012?

How do I import a local flat tab file into a database using SQL Server 2012 without truncation errors? What I have tried: To import the local flat tab file into my database. I'm using Microsoft Sql Server Management System (MS SMS). I receive errors that the FULL_DESCRIPTION column is [...] read more
sql-server
vb.net
winforms
0votes
1answer

Import Issue with a csv file into SQL Server 2008 table

I'm using SQL Server Import and Export wizard to import data from a csv file to append to my already existing SQL Server table. So, to append data from a csv file to my SQL Server table, in Choose a Data Source window, I'm making sure that each column in [...] read more
sql-server-2008
ssis
sql-import-wizard
0votes
0answers

Why can I not import csv file into my SQL Server database?

I have SQL Server 2008 R2 on the my server, and I have this table: CREATE TABLE [dbo].[rptost] ( [ID_ost] [tinyint] NOT NULL, [id_rpt_ost] [int] IDENTITY(1,1) NOT NULL, [id_rptost_q] [int] NOT NULL, [usrid] [smallint] NOT NULL, [Confirm_id] [smallint] NOT NULL, [date_] [int] NOT NULL, [time_] [int] NOT NULL, [date_create] [int] [...] read more
sql-server
sql-server-2008-r2
sql-server-2014
0votes
1answer

Import DAT file content to SQL Server table using Import Export Wizard - Error

I have .DAT file which looks like below format[no column name or header, only data]: || is the separator; so, I have 20 fields. worth||8000||AC8000||Tal||100||IN||O||2014-01-09 00:00:00||||N||N||N||Y||2014-01-09 00:00:00||Y||19991011||N||Internal||||N My SQL DB table also has 20 columns. When I'm using import export wizard, I'm getting error as below: - Executing (Error) Messages [...] read more
sql-server
file
import
export
flat-file
0votes
2answers

SQL Server not importing data to table

I'm using SQL Server 2008 R2, I'm creating the following table and then trying to import the data by right clicking on the database name -> task -> import data. While going through the import settings I'm assigning the corresponding data types in the column settings. I have reviewed the [...] read more
sql
database
sql-server-2008-r2
sqldatatypes
data-import
0votes
2answers

SQL Server Export Wizard Error

I'm hoping someone can help me. I have a big query, like 2 million records. It has some exotic characters, and I think some of the values have commas which is making it difficult to export the query results to a flat file and then import them into another table [...] read more
sql-server
ssis
0votes
1answer

Postgresql to Sql Server 2008 Table Transfer

I'm using postgresql (Pgadmin Version 1.18.0), i export three(I need only 3 tables) table(Contains Online Transaction information) data's into csv format using the query copy to 'D:\orders\new\users.csv' DELIMITER ';' CSV HEADER I got perfect result using the query. Now i open the ssms(Sql Server 2008) and using the Import and [...] read more
sql-server
postgresql
csv
0votes
1answer

Wrong characters in csv file cause troubles when import to MS SQL Server

I'm trying to import vertical bars delimited csv file to MS SQL Serever 2008 R2. I'm using Import Wizard for this purpose. I know the reason of the troubles - some specific characters that contain in file, like this: 98937|Novotel Aix en Provence Pont de lВґArc FenouillГЁre|3EST|AIX|1|ACCOR||43.51172|5.45396 I believe this [...] read more
sql-server-2008
csv
import
0votes
1answer

Combining Multiple Tables Into 1 In SQL Server

I have about 40 tables worth of data that I need to turn into one large table in SQL Server. They are currently text files. I tried combining them all into an Access DB then uploading to SQL Server that way, but their datatypes, nvarchar(255) are far too large and [...] read more
sql-server
0votes
2answers

Importing csv file to table

I'm trying to import a csv file to a table in sql server 2005 with the wizard. but when i import the file is always give me this errors : > Executing (Error) Messages Error 0xc02020a1: Data Flow Task 1: Data conversion > failed. The data conversion for column "Column [...] read more
sql
sql-server
sql-server-2005
csv
0votes
1answer

SQL Import wizard unable to map tinyint

I have created a table named test2 as follows in SQL Server 2008 R2 id || userid || time tinyint uniqueidentifier time(7) I have created an .csv file for the same as follows that contains a single row id || userid || time(7) 1 b64d51a8-852f-40ea-ab4c-080df747214b 00:00:00 Now, i m using [...] read more
sql-server-2008
ssis
sql-import-wizard
-1votes
1answer

SQL Server import table

I tried to upload a table (contains Latin characters) to SQL Server and I got this message. Can someone help me? * Executing (Error) Messages Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Description" returned status value 4 and status text "Text was truncated [...] read more
sql-server
sql-server-2008
import
ssis
-1votes
1answer

SSIS CSV IMPORT. I am getting following errors

* Executing (Error) Messages > Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data > conversion for column "AddressLine3" 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 [...] read more
ssis
-1votes
1answer

I am trying to Import a CSV file into SQL Server 2008

> Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data > conversion for column "Solution" returned status value 4 and status text "Text > was truncated or one or more characters had no match in the target code > page.". > > Error 0xc020902a: Data Flow Task 1: [...] read more
sql-server

Comments

Leave a comment

(plain text only)

Sources

  1. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  2. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0