为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:8
【操作系统】:win10
【CPU】:
【问题描述】*:原表
目的表
你迁移的话是使用DM迁移工具(dts)迁移的,还是导入导出,检查一下ID列是否添加触发器或者是自增列
表的ID列是否为自增列,如果是的话,dts迁移的时候有没有开启自增。
或者删除自增属性:
select 'alter table '||b.name||' drop identity;'
from SYSCOLUMNS a,sysobjects b where a.id=b.id and b.type$='SCHOBJ' and b.SUBTYPE$='UTAB' and a.info2=1
and b.schid=(select id from sysobjects where name='SYSDBA' and type$='SCH'
添加AUTO_INCREMENT属性:
select 'alter table '||b.name||' add column '||a.name||' auto_increment;'
from SYSCOLUMNS a,sysobjects b where a.id=b.id and b.type$='SCHOBJ' and b.SUBTYPE$='UTAB' and a.info2=1
and b.schid=(select id from sysobjects where name='SYSDBA' and type$='SCH')
数据是怎么复制的?正常数据是不会乱的,是不是有修改过或者导入不完整