从MySql 5.6到MSSql Server 2014的迁移:ExecuteReader需要打开且可用的连接 [英] MySql 5.6 to MSSql server 2014 migration : ExecuteReader requires an open and available Connection

查看:69
本文介绍了从MySql 5.6到MSSql Server 2014的迁移:ExecuteReader需要打开且可用的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MySql: 5.6 MSSql: 2014 使用的工具:用于MySql的SSMA

MySql: 5.6 MSSql: 2014 Tools Used: SSMA for MySql

从mysql迁移到mssql时,表和视图的所有结构均已成功迁移.迁移数据时,数据被部分移动,并且出现以下错误.

While migrating from mysql to mssql, all the structures for tables and views were migrated successfully. While migrating data, data was moved partially and I got the following errors.

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.",我已通过编辑表结构进行了手动修复.

There were other trivial issues as well like "Column 'modified_on' does not allow DBNull.Value." which I have fixed manually by editing the table structure.

推荐答案

为解决Column 'modified_on' does not allow DBNull.Value问题,SQL Server Management Studio不允许我编辑结构.为此,我必须按如下所述更改配置.

To Fix the Column 'modified_on' does not allow DBNull.Value issue, SQL Server management studio doesn't allow me to edit the structure. For that I had to change the configuration as follows.

打开SQL Server管理工作室->转到工具->选项-> 设计者并取消选中防止保存需要表的更改 重新创造."

Open SQL Server management studio -> Goto Tools -> Options -> Designers and uncheck "Prevent saving changes that require table re-creation."

要修复以下两个问题:

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->转到工具->项目设置->选择 从左侧菜单的常规->选择迁移->在其他部分 ->以分钟为单位设置数据迁移超时= 500

Open SSMA for MySql -> Goto Tools -> Project Settings -> Select General from the left menu -> Select Migration -> In the Misc section -> set data migration timeout in minutes = 500

为MySql打开SSMA->转到工具->项目设置->选择 从左侧菜单的常规->选择迁移->在并行数据迁移部分 ->将并行数据迁移模式自动设置为自定义,并将线程数从 10 设置为 5

Open SSMA for MySql -> Goto Tools -> Project Settings -> Select General from the left menu -> Select Migration -> In the Parallel data migration section -> set Parallel data migration mode from Auto to Custom and set Thread Count from 10 to 5

再次运行数据迁移.

希望对您有帮助.

这篇关于从MySql 5.6到MSSql Server 2014的迁移:ExecuteReader需要打开且可用的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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