MySql: 5.6 MSSql: 2014 使用的工具: SSMA for MySql
从mysql迁移到mssql时,表和视图的所有结构都已成功迁移。迁移数据时,数据部分移动,我收到以下错误。
ExecuteReader requires an open and available Connection. The connection's current state is closed.; SQL Server cannot access the source table <table-name>
The connection has been disabled.
还有其他一些琐碎的问题,比如“列'modified'on'不允许DBNull.Value。”,我已通过编辑表结构手动修复了该问题。
答案 0 :(得分:1)
要修复Column 'modified_on' does not allow DBNull.Value
问题,SQL Server管理工作室不允许我编辑结构。为此,我必须按如下方式更改配置。
打开SQL Server管理工作室 - &gt;转到工具 - &gt;选项 - &gt; 设计师并取消选中&#34;防止保存需要表格的更改 再创造&#34;
修复以下两个问题:
ExecuteReader requires an open and available Connection. The connection's current state is closed.; SQL Server cannot access the source table <table-name>
The connection has been disabled.
<强>解决方案:强>
为MySql打开SSMA - &gt;转到工具 - &gt;项目设置 - &gt;选择 一般来自左侧菜单 - &gt;选择迁移 - &gt;在其他部分 - &GT;以分钟为单位设置数据迁移超时= 500
为MySql打开SSMA - &gt;转到工具 - &gt;项目设置 - &gt;选择 一般来自左侧菜单 - &gt;选择迁移 - &gt;在并行数据迁移部分中 - &GT;将并行数据迁移模式从自动设置为自定义,并将线程数从 10 设置为 5 强>
再次运行数据迁移。
我希望它有所帮助。