SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error 0xc020901c: Data Flow Task: While Importing data from an Excel File into SQL Server 2005


Error 0xc020901c: Data Flow Task: While Importing data from an Excel File into SQL Server 2005

Author
Message
priyap
priyap
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 4
While importing data from Excel file into a table in SQL Server 2005, i am getting the following error.

- Executing (Error)
Messages
Error 0xc020901c: Data Flow Task: There was an error with output column "Description" (30) on output "Excel Source Output" (9). The column status returned was: "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: The "output column "Description" (30)" failed because truncation occurred, and the truncation row disposition on "output column "Description" (30)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - Risks$" (1) returned error code 0xC020902A. 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)

Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited.
(SQL Server Import and Export Wizard)

Error 0xc0047039: Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED. Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. There may be error messages posted before this with more information on why the thread was cancelled.
(SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0047039. There may be error messages posted before this with more information on why the thread has exited.
(SQL Server Import and Export Wizard)


Any help much appreciated.

Thanks
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45751 Visits: 14925
I suggest configuring the error output to redirect row and outputting the data to a table or file so you can see what row(s) are being rejected. You are currently only seeing 1 problem, there could be more and redirection will allow you to see what other problems you may have.

The error is probably due to a strange character in your data and redirecting the output will allow you to find it. Have you checked the length of your source data in Excel? Are you inserting into char or varchar column? If char are you trimming the data to insure you do not have trailing spaces making it too long?



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
priyap
priyap
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 4
Hi Jack,

I am inserting the values into a nvarchar(2000) column. All i am doing is, right click the database, select the import option, select the source and destination then do the import. I tried to follow your suggestions, but i couldn't figure out what exactly i have to do. i am completely new to SQL 2005 server. i am not using SQL SBID studio. Any other go?

Thanks
Priya
priyap
priyap
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 4
I found a work around for this problem. I imported the data into Access database first and then imported it into SQL database successfully.

Thanks
Priya
Aur_Ek_SQL
Aur_Ek_SQL
SSC Rookie
SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)SSC Rookie (38 reputation)

Group: General Forum Members
Points: 38 Visits: 55
I also did the same (excel-> access then sql server.). It worked.
jchapman
jchapman
SSC-Enthusiastic
SSC-Enthusiastic (194 reputation)SSC-Enthusiastic (194 reputation)SSC-Enthusiastic (194 reputation)SSC-Enthusiastic (194 reputation)SSC-Enthusiastic (194 reputation)SSC-Enthusiastic (194 reputation)SSC-Enthusiastic (194 reputation)SSC-Enthusiastic (194 reputation)

Group: General Forum Members
Points: 194 Visits: 217
We have an application that uses the DTS infrastructure to import data from a variety of ODBC accessible data sources into a sqlServer warehouse repository.

Excel spreadsheets have always been a pain in the datatype and column name category when the same worksheet is used to import data over and over. I find the datatypes (and type control) in Excel is simply too fluid to be use for anything more than "one time" imports and even then, you're still likely to run into data type problems.

I always try to find a way to get Worksheets into something more "stable" before attempting any sort of data manipulation on them.
shahrouz.ebadian
shahrouz.ebadian
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 37
2 years later but same thing happened to me. Had to go from Excel ->Access -> SQL.

Directly from Excel to SQL did not work for the life of me. Tried all the hacks including the registry, getting column length to max. No idea why.
laurens.schepers
laurens.schepers
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 39
I had the same problem with a DB2-source.

Problem is: The datasourche object replace the character that have no match in the codepage with a ? and gives a truncation error.

Solution:
Change with the Advanced Editor the Output Column propertie from RD_FailComponent to RD_IgnoreFaiure.
=> OLE-db Sourche object => Advanced Editor => [Input and Output Properties] => [Output Columns] => Choose the field with truncation error => Change propertie 'TruncationRowDisposition' to RD_IgnoreFaiure.
Welsh Corgi
Welsh Corgi
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27730 Visits: 4895
Jack Corbett (3/11/2008)
I suggest configuring the error output to redirect row and outputting the data to a table or file so you can see what row(s) are being rejected. You are currently only seeing 1 problem, there could be more and redirection will allow you to see what other problems you may have.

The error is probably due to a strange character in your data and redirecting the output will allow you to find it. Have you checked the length of your source data in Excel? Are you inserting into char or varchar column? If char are you trimming the data to insure you do not have trailing spaces making it too long?


Jack,

I'm getting the same error when importing the data from DB2 AS400.

Do you have link to a simple exampl on redirecting output on error?


Thanks.

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45751 Visits: 14925
Welsh Corgi (3/19/2012)

Jack,

I'm getting the same error when importing the data from DB2 AS400.

Do you have link to a simple exampl on redirecting output on error?


Thanks.


Here's an article on how I did it, http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/62662/



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search