Reputation: 516
I know this question might be repeated. But what I get issue with this is different. I have already created table "CRM_Doctor_Budget" with no data.
I want to insert data in this table from excel file.
I am using import and export data (32-bit).
Following step I do:
Error which I am getting :
- Validating (Error)
Messages
Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "Id".
(SQL Server Import and Export Wizard)
Error 0xc0202045: Data Flow Task 1: Column metadata validation failed.
(SQL Server Import and Export Wizard)
Error 0xc004706b: Data Flow Task 1: "component "Destination - CRM_Doctor_Budget" (59)" 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)
I am getting error in converting varchar,int,smallint,bit data type. Because excel file has general datatype for all data. And In my already created table I have varchar, int, float, smallint and bit.
After checked "Enable Identity Insert" I get less error but errors are as follow :
Copying to [dbo].[CRM_Doctor_Budget] (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: "Unspecified error".
(SQL Server Import and Export Wizard)
Error 0xc020901c: Data Flow Task 1: There was an error with input column "Id" (143) on input "Destination Input" (72). 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 "input "Destination Input" (72)" failed because error code 0xC020907D occurred, and the error row disposition on "input "Destination Input" (72)" 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 - CRM_Doctor_Budget" (59) failed with error code 0xC0209029 while processing input "Destination Input" (72). 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)
Upvotes: 3
Views: 10295
Reputation: 516
I have solved the problem. I had made some changes like:
In Edit Mapping : As I have ID as an identity column and it is auto generated column.
As previously I have mapped Id column.
Now This time I did not map ID column and make unchecked the "Enable I identity Insert"
Else I perform step as it is .. this minor change I have done and I get records import successfully. :) thank you all for helping.
Upvotes: 2
Reputation: 9278
Is the ID column an identity column? Because if it is, you need to click the "Enable Identity Insert" checkbox to get this to work.
Upvotes: 1