Error 0xc0202049: data flow Task 1: Insert error into a read-only column

I am using the SQL Server 2008 Import and Export Wizard. I need to import the database. I opened the SQL Server Import / Export Wizard, and I went through the following steps: -

  • for the destination, I selected "native SQL Server 10 client."

  • then I selected a copy of the data from one or more tables or view.

  • SSIS starts immediately

but I got the following errors:

Operation stopped ...

  • Initializing a Data Flow Task (Success)

  • Initializing Connections (Success)

  • Customize SQL Command (Success)

  • Source Connection Setup (Success)

  • Target connection setup (success)

  • Verification (error)

Message Error 0xc0202049: Data Flow Task 1: Insert a failure into the read-only column "ActionID". (Import and Export SQL Server Wizard)

Error 0xc0202045: data flow Task 1: column metadata validation failed. (SQL Server Import and Export Wizard)

Error 0xc004706b: data stream Task 1: "component" Purpose - AuditActions "(22)" could not be verified and returned the verification status "VS_ISBROKEN". (SQL Server Import and Export Wizard)

It seems like I cannot import column columns and time columns, so how can I force these values ​​to be imported?

+72
sql-server sql-server-2008 ssis
Jan 6 '14 at 11:14
source share
2 answers

Before the import date, run the following query to set the insert ID:

SET IDENTITY_INSERT TableName ON 

Then do the import operations.

After importing the date, run the following query to disable ID insertion:

 SET IDENTITY_INSERT TableName OFF 
+23
Jan 06 '14 at
source share

With all due respect to Kishore's answer, this approach is valid if you modify packages. Since you are using the import / export wizard, a more direct approach is to check the Enable Identity Insert field on the Column Mapping tab.

In the Export Import Wizard, after selecting the table to copy, click the Edit Mappings... button

enter image description here

In the window that appears, click the Enable Identity Insert property, and your identifiers will be replicated.

enter image description here

The same clean result returned by SET IDENTITY_INSERT TableName ON and OFF, but this is done automatically during build.

+197
Jan 06 '14 at 15:40
source share



All Articles