debugsqlMinor
Error migrating a big table from mySQL to SQL Server 2012
Viewed 0 times
error2012sqlbigmigratingmysqlserverfromtable
Problem
I'm trying to convert several mySQL tables to Microsoft SQL Server 2012 tables using the SQL Server Migration Assistant for MySQL. The small tables get converted but when it comes to the big one (slightly less than 4 GB), after about 1:30 hour of processing, it gives the following error:
(Elapsed Time = 00:01:24:32:197). Cannot truncate target table.
Reason: ExecuteReader requires an open and available Connection. The
connection's current state is closed.
Here is the output:
``
ExecuteNonQuery requires an open and available Connection. The connect
(Elapsed Time = 00:01:24:32:197). Cannot truncate target table.
Reason: ExecuteReader requires an open and available Connection. The
connection's current state is closed.
Here is the output:
``
Migrating data...
Analyzing metadata...
Preparing table big fmail user.conversionlog...
Preparing data migration package...
Starting data migration Engine
Starting data migration...
The data migration engine is migrating table 'big fmail user.conversionlog': > [big fmail user].dbo.conversionlog, 87489673 rows total
Table big fmail user.conversionlog data migration: 8760542 rows processed.
Table big fmail user.conversionlog data migration: 17510722 rows processed.
Table big fmail user.conversionlog data migration: 26249995 rows processed.
Table big fmail user.conversionlog data migration: 34998808 rows processed.
Table big fmail user.conversionlog data migration: 43757368 rows processed.
Table big fmail user.conversionlog data migration: 52494656 rows processed.
Table big fmail user.conversionlog data migration: 61254458 rows processed.
Cannot truncate target table. Reason: ExecuteReader requires an open and available Connection. The connection's current state is closed.
Errors: Cannot truncate target table. Reason: ExecuteReader requires an open and available Connection. The connection's current state is closed.
Table big fmail user.conversionlog data migration: 0 rows processed.
Completing migration of table big fmail user.conversionlog...
Migration complete for table 'big fmail user`.conversionlog': > [big fmail user].dbo.conversionlog, 0 rows migrated (Elapsed Time = 00:01:24:32:197).ExecuteNonQuery requires an open and available Connection. The connect
Solution
I solved the issue. The problem was the value of the
Go to
Data migration timeout in minutes property. Go to
Tools > Project Settings > General and in the left pane click on Migration and then in the right pane, in the section Misc, change Data migration timeout in minutes property to something larger (the default value was 15; I changed it to 300).Context
StackExchange Database Administrators Q#29688, answer score: 5
Revisions (0)
No revisions yet.