"Cannot insert data into a read-only column" error

Updated at:

When you use Enterprise Manager or SQL Server Management Studio to import data into SQL Server, you may receive a "Cannot insert data into a read-only column" error. This topic describes the causes of this error and how to resolve it.

Symptoms

When you import data into SQL Server, you receive the error message "Cannot insert data into a read-only column".

The error code is 0xc0202049, and the read-only column is id. This causes component validation to fail with a status of VS_ISBROKEN, and all data table copy tasks stop.

Cause

This error occurs when you import tables from an on-premises database to a Simple Application Server instance and do not select the Enable identity insert option in the "Select Source Tables and Views" step.

In the Transfer Settings dialog box, you must also select Delete rows in destination table.

Solution

  1. Select Enable identity insert.

  2. Import the SQL Server data again.

    Note

    If the issue persists, submit a ticket.