Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column(错误 0xc0202049:数据流任务 1:插入只读列失败)
问题描述
我正在使用 SQL Server 2008 导入和导出向导.我需要导入一个数据库.我打开了 SQL 服务器导入/导出向导,并完成了以下操作:-
I am using SQL Server 2008 import and export wizard. I need to import a database. I opened the SQL server import/export wizard and I went through the following actions:-
对于目的地,我选择了SQL server native client 10".
for the destination I chose "SQL server native client 10".
然后我从一个或多个表或视图中选择了复制数据.
then I selected copy data from one or more tables or view.
SSIS 立即运行
但我收到以下错误,
操作停止...
初始化数据流任务(成功)
Initializing Data Flow Task (Success)
初始化连接(成功)
设置 SQL 命令(成功)
Setting SQL Command (Success)
设置源连接(成功)
设置目标连接(成功)
正在验证(错误)
消息错误 0xc0202049:数据流任务 1:插入失败只读列ActionID".(SQL Server 导入和导出巫师)
Messages Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "ActionID". (SQL Server Import and Export Wizard)
错误 0xc0202045:数据流任务 1:列元数据验证失败.(SQL Server 导入导出向导)
Error 0xc0202045: Data Flow Task 1: Column metadata validation failed. (SQL Server Import and Export Wizard)
错误 0xc004706b:数据流任务 1:组件"目的地 -AuditActions" (22)" 验证失败并返回验证状态VS_ISBROKEN".(SQL Server 导入导出向导)
Error 0xc004706b: Data Flow Task 1: "component "Destination - AuditActions" (22)" failed validation and returned validation status "VS_ISBROKEN". (SQL Server Import and Export Wizard)
似乎我无法导入标识列和时间戳列,那么如何强制导入这些值?
It seems that I can not import identity columns and timestamps columns, so how I can force these values to be imported?
推荐答案
在导入日期之前执行以下查询以设置身份插入:
Before Importing date execute the below query to set identity insert on:
SET IDENTITY_INSERT TableName ON
然后进行导入操作.
导入日期后执行以下查询以关闭身份插入:
After importing date execute the below query to set identity insert off:
SET IDENTITY_INSERT TableName OFF
这篇关于错误 0xc0202049:数据流任务 1:插入只读列失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:错误 0xc0202049:数据流任务 1:插入只读列失败
基础教程推荐
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 是否可以执行按位分组功能? 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 无法解决整理冲突 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
