错误0xc0202049:数据流任务1:无法插入只读列 [英] Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column

查看:446
本文介绍了错误0xc0202049:数据流任务1:无法插入只读列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SQL Server 2008导入和导出向导。我需要导入一个数据库。我打开了SQL Server导入/导出向导,然后执行以下操作:-

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:-


  1. 对于目标,我选择了 SQL服务器本机客户端10。

  1. for the destination I chose "SQL server native client 10".

然后我从一个或多个表或视图中选择复制数据。

then I selected copy data from one or more tables or view.

SSIS立即运行

但是我遇到了以下错误,

but i got the following errors,


操作已停止...

Operation stopped...


  • 初始化数据流任务(成功)

  • 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:无法插入只读列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆