简体   繁体   English

将大表从MySql迁移到MsSql

[英]Migrate big tables from MySql to MsSql

I have a big database around 46GB in Mysql format and I managed to convert all the database to MSsql except two tables, the biggest ones. 我有一个大约46GB的Mysql格式大数据库,我设法将除了两个表(最大的两个表)以外的所有数据库都转换为MSsql。 When I try to migrate those 2 tables, one by one , after a while I get the error message "The connection has been disabled" 当我尝试迁移那两个表时,一段时间后,我收到错误消息“连接已禁用”

I encreased the timeout from SSMA option from 15 to 1440 and decreased the bash from 1000 to 500 and same thing, The tables have 52 mil rows and 110 milion rows with 1,5 GB and 6.5 GB. 我将SSMA选项的超时从15增加到1440,将bash从1000减少到500,同样的事情,表有5200万行和11000万行,分别具有1.5 GB和6.5 GB。

I tried incremential version but I don't have a unique id to use 我尝试了增量版本,但是没有唯一的ID

What can I do to migrate them 我该怎么做才能迁移它们

Thank You 谢谢

You should be able to use SQL Server Integration Services (SSIS). 您应该能够使用SQL Server集成服务(SSIS)。 You can create a dataflow that pulls from MYSql and dumps the Data into MSSQL. 您可以创建一个从MYSql提取数据流并将其转储到MSSQL的数据流。

You'll need to create a Data flow task that includes an OLE Database Source and connect it to an OLE Database Destination. 您需要创建一个包含OLE数据库源的数据流任务,并将其连接到OLE数据库目标。

I had the same issue and fixed by using the following configuration described here in detail: MySql 5.6 to MSSql server 2014 migration : ExecuteReader requires an open and available Connection 我遇到了相同的问题,并通过使用下面详细描述的以下配置来解决: MySql 5.6到MSSql server 2014的迁移:ExecuteReader需要一个开放且可用的连接

Also, I have documented the whole MySQL to MSSQL migration process here: Migrate Data and Schema from MySQL to SQL Server 另外,我在这里记录了整个MySQL到MSSQL的迁移过程: 将数据和架构从MySQL迁移到SQL Server

I had the same problem using SSMA. 我在使用SSMA时遇到了同样的问题。 I managed to migrate 100+ million rows of a table with 40+ columns. 我设法迁移了40列以上的表中的100+百万行。

I assume you've done the configuration well. 我认为您已经做好了配置。 You need to ensure that there is no activity in the MSSQL database. 您需要确保MSSQL数据库中没有任何活动。 No SELECTS over those tables and no any other activities. 没有对这些表的选择,也没有任何其他活动。

Check out the two tables' structures to ensure they are fine. 检查两个表的结构以确保它们正常。 You can run the SSMA project only for those two tables. 您只能为这两个表运行SSMA项目。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM