Recieveing Errors on SQL Import Export wizard - sql-server

I am trying to import data from an Excel file to an SQL database with the SQL Import Export wizard. We've had 4 sheets upload correctly and we are able to query them. For some reason though, a few of our tables are giving some errors and we aren't sure how to decipher them or what the problem could be, as they are very similar to the tables that have worked.
Here are the errors:
Copying to [dbo].[Products] (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Unspecified error".
(SQL Server Import and Export Wizard)
Error 0xc020901c: Data Flow Task 1: There was an error with Destination - Products.Inputs[Destination Input].Columns[ProductID] on Destination - Products.Inputs[Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Products.Inputs[Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "Destination - Products.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Products" (38) failed with error code 0xC0209029 while processing input "Destination Input" (51). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
What do these mean? And what could we need to do to fix them?
Thanks

we had similar issue. Since you have a column which can not be null, you need to remove empty rows.
Just select all rows after last record and remove it then save your excel sheet and try to upload again.

The error message "The value violated the integrity constraints for the column" indicates that it's trying to import data and it is violating a constraint on your ProductID column. It's likely that either there are null values for the column that are trying to go into a field that is not null-able, or adding the row would violate some foreign key constraints.

Related

Is there a function to solve data import errors?

I'm trying to import data from MS Access to SQL Server, this process used to work, today I'm not able to import the data. When I try to import the data with the SQL Server Import and export wizard shows me the next errors:
- Copying to [dbo].[Measurements] (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Could not allocate a new page for database 'MITSF_2' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Measurements.Inputs[Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Destination - Measurements.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Measurements" (778) failed with error code 0xC0209029 while processing input "Destination Input" (791). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Measurements returned error code 0xC02020C4. 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 tried shrinking the database and truncate the log file, but stills give me the same error.
Seems pretty clear you're out of disk space:
Description: "Could not allocate a new page for database 'MITSF_2' because of insufficient disk space in filegroup 'PRIMARY'.
One way this sometimes happens is if you're in FULL recovery mode and not backing up your transaction logs.

Error importing table to SQL Server from MS Access mdb using SQL Server Import and Export Wizard

I have a Notes table, which is failing to import all the records, giving me these errors:
Copying to [dbo].[Notes] (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Invalid character value for cast specification.".
(SQL Server Import and Export Wizard)
Error 0xc020901c: Data Flow Task 1: There was an error with Destination - Notes.Inputs[Destination Input].Columns[Action_DateTime] on Destination - Notes.Inputs[Destination Input]. The column status returned was: "Conversion failed because the data value overflowed the specified type.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Notes.Inputs[Destination Input]" failed because error code 0xC020907A occurred, and the error row disposition on "Destination - Notes.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Notes" (34) failed with error code 0xC0209029 while processing input "Destination Input" (47). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Notes returned error code 0xC02020C4. 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 expert with MS Access but new to SQL Server and don't understand what it is telling me.
Please help!
As Nick pointed out, some data in the Action_DateTime field was invalid for conversion. Once the data was cleaned up, it imported without issue. Does make one wonder why that data wasn't invalid for Access.
Many thanks

Invalid Date Format while using SQL server Export Wizard

I am trying to Export Data from one SQL Server to another. I have around 12 tables among which 11 was successfully exported however having issue in one table, it has 2 columns as DateTime while exporting I am getting this exception :
- Copying to [dbo].[ClaimDetails] (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Invalid date format".
(SQL Server Import and Export Wizard)
Error 0xc020901c: Data Flow Task 1: There was an error with Destination - ClaimDetails.Inputs[Destination Input].Columns[Entrydate] on Destination - ClaimDetails.Inputs[Destination Input]. The column status returned was: "Conversion failed because the data value overflowed the specified type.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - ClaimDetails.Inputs[Destination Input]" failed because error code 0xC020907A occurred, and the error row disposition on "Destination - ClaimDetails.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - ClaimDetails" (124) failed with error code 0xC0209029 while processing input "Destination Input" (137). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - ClaimDetails returned error code 0xC02020C4. 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)
It successfully copies around 4025 rows and i have around 21794 rows, so its a bit difficult to manual look at each row, so i tried running
SELECT
*
FROM
ClaimDetails
WHERE
ISDATE(ActualDate) = 0
On both fields but it shows no row, so please let me know what I can do.
Date fields format look like this
Thanks
You should set dateformat first. Looking at your records it should be ymd.
SET DATEFORMAT ymd;
SELECT *
FROM ClaimDetails
WHERE ISDATE(ActualDate) = 0
Sort your table by the date field (oldest to newest). If there are Null values then scroll to the first records that has data. Now make sure that the year is the correct year.

Error while importing into table in SQL Server 2008 R2 from Excel File

I am getting this error while importing from an Excel file into a table in SQL Server 2008 R2.
I have added a picture.
Copying to [dbo].[MultiPLU] (Error) Messages Error 0xc0202009: Data
Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred.
Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80004005
Description: "The statement has been terminated.".
An OLE DB record is available.
Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80004005
Description: "Cannot insert the value NULL into column 'PLUCode', table 'AR4UWin.dbo.MultiPLU'; column does not allow nulls. INSERT fails.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code
DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Destination Input"
(57)" failed because error code 0xC020907B occurred, and the error row
disposition on "input "Destination Input" (57)" specifies failure on
error. An error occurred on the specified object of the specified
component. There may be error messages posted before this with more
information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code
DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component
"Destination - MultiPLU" (44) failed with error code 0xC0209029 while
processing input "Destination Input" (57). The identified component
returned an error from the ProcessInput method. The error is specific
to the component, but the error is fatal and will cause the Data Flow
task to stop running. There may be error messages posted before this
with more information about the failure.
(SQL Server Import and Export Wizard)
The import process requires a value for every row in the 'PLUCode' column, whereas I believe that your excel spreadsheet sometimes has no value in these cells.
Right clicking on the PLUCode and setting it to allow nulls will allow you to upload the table. The query below will give you the errored entries for review.
SELECT *
FROM Tablename
WHERE PLUCode IS NULL
If you're dealing with duplicates I would recommend a self join to only give you the unique rows. (You'll need a few 'if' statements to check for rows with null values so you don't delete a whole record and leave you with the broken one.) I would be exceptionally careful with using any predefined remove duplicates function (like in excel) unless you've scrutinized the table to ensure it wont drop the completed rows.
EDIT: To respond the need to save as a flat file you'll want to save as a comma delimited csv file. Its in the usual file formats list unless you're using excel 2010, the itll be under the "Save and Send" option.

Upload to excel files through SQL Server Management Studio

I am trying to import the excel file with country list into my SQL Server database, but I get this error. What might be wrong?
Validating (Error)
Messages
Error 0xc020201b: Data Flow Task 1: The number of input columns for Destination - Countries.Inputs[Destination Input] cannot be zero.
(SQL Server Import and Export Wizard)
Error 0xc004706b: Data Flow Task 1: "Destination - Countries" failed validation and returned validation status "VS_ISBROKEN".
(SQL Server Import and Export Wizard)
Error 0xc004700c: Data Flow Task 1: One or more component failed validation.
(SQL Server Import and Export Wizard)
Error 0xc0024107: Data Flow Task 1: There were errors during task validation.
(SQL Server Import and Export Wizard)
This is a preview of my list in Excel:
1 Afghanistan 2 Albania 3 Algeria 4 American Samoa 5 Andorra
6 Angola 7 Anguilla 8 Antigua & Barbuda 9 Argentina 10 Armenia
11 Aruba 12 Australia
So when i first imported into the temporary table, and then tried to copy into my table, i get this error:
- Copying to [dbo].[Countries] (Error)
Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Unspecified error".
(SQL Server Import and Export Wizard)
Error 0xc020901c: Data Flow Task 1: There was an error with Destination - Countries.Inputs[Destination Input].Columns[countryId] on Destination - Countries.Inputs[Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Countries.Inputs[Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "Destination - Countries.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Countries" (46) failed with error code 0xC0209029 while processing input "Destination Input" (59). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
When i perform the query, i get:
Msg 2627, Level 14, State 1, Line 6
Violation of PRIMARY KEY constraint 'PK_dbo.Countries'. Cannot insert duplicate key in object 'dbo.Countries'. The duplicate key value is (1).
The statement has been terminated.
(26 row(s) affected)
You have to do data cleaning in your excel file. I think you are trying to import to an EXISTING table.
I suggest following workflow.
import to brand new table, like tempExcelImport
Insert Into OLD_TABLE Select * from tempExcelImport
This will give you more informative errors for your data, giving you row numbers.
clean your data (fix errors in your rows) and go to step 2
EDIT:
When you are using import/export wizard Column Mappings, choose your destination table as new table name, like tempExcelImport
Destination
Identifies the selected destination table, view, or query.
Create destination table/file
Specify whether to create the destination table if it does not already exist.

Resources