从SQLSERVER迁移数据对象到DM后,进行数据插入时报错,报错截图如下:
问题现象:对应的表为自增表且已开启identity_insert为ON时插入数据仍报错,因业务使用需针对该表进行数据处理,因此采用如下处理方案解决:
alter table “ASSETCHECK”.“AccountType” drop identity;
insert into ASSETCHECK.“AccountType” select * from SYSDBA.AccountType;
—再进行数据插入后对该表ID列再指定自增
alter table “ASSETCHECK”.“AccountType” add column “Id” identity(1, 1);
文章
阅读量
获赞