问题
I am having an issue using the built in migration tool on MySQL workbench.
I am migrating a very large database from MS SQL 2014 to MySQL.
The MS SQL server is deployed locally on my (Windows 8.1) desktop, and the MySQL server runs on my network on top of Ubuntu Server.
I am getting a series of the following errors on the final "bulk transfer" stage of the migration.
`VHR_AGE`.`FlxTable`:Copying 33 columns of 311 rows from table [VHR_AGE].[dbo].[FlxTable]
ERROR: `VHR_AGE`.`FlxTable`:Not enough memory to allocate insert buffer of size 1073741824
`VHR_AGE`.`FlxTable`:Finished copying 0 rows in 0m00s
The schemata of the tables migrated over fine, the issue is limited to the transfer of the data itself.
If there are any particular variable you would like to see to help diagnose the problem, please just ask and I will provide them promptly.
Any assistance on this would be great, all sources online were a bust.
Edit: Im not even sure whether its MS SQL or MySQL throwing the size error...
回答1:
Since this one is over a year ago you might have solved this issue already, but maybe others (like me) have the same problem and so I want to add my solution:
In some MySQL forum I found a guy posted a formula and after calculating it for my server and my system I found out, that I tried to use 2 GB too much RAM which the system did not have. Here it is and I hope it helps someone.
RAM = innodb_pool_buffer_size + key_buffer_size +
( (read_buffer_size + sort_buffer_size + read_rnd_buffer_size + join_buffer_size)
* max_connection )
回答2:
From the looks of it, the error is within MySQL. Try to tune your MySQL server's bulk_insert_buffer_size parameter.
回答3:
This looks like an issue with the memory of whatever server is hosting the MYSQL database. It looks like you don't have 1GB of memory to spare to insert the new data in one go (on a previous response, you indicated that you have already changed the bulk_insert_buffer_size parameter). You can either:
- Close some applications and see if it frees up enough space.
- Break your exported data into smaller chunks and insert them in smaller increments (ie, creating views or something on the MS SQL server)
- Take it one step further and insert one row at a time (which can be very time-consuming)
回答4:
You might want to take a look at this. This developer migrated the data using a program called Access to MYSQL whick looks pretty promising.
回答5:
I would suggest you to use Talend data integration tool. It is quite easy you create a job map your tables and then start the job. It will take care of batch size and stuff.
I had a huge MSSQL database which I migrated to MySQL it did a good job. I even had some structure changes in MySQL compared to MSSQL. It has a nice GUI you can just map the columns by WYSIWYG. It is built on Eclipse so if you have used eclipse before It seems familiar.
回答6:
I fiddled with this issue for a long time and finally found the solution. The error message here is very ambiguous. You don't need to add any more memory to your system, you just need to decrease the packet size. This error occurs because mysql tries to form packages of higher amounts and keeps failing.
The error message : Not enough memory to allocate insert buffer of size 1073741824
If you just reduce the buffer size, it will work for you.You should try decreasing it to ~64.
来源:https://stackoverflow.com/questions/24501432/migration-issues-ms-sql-mysql-insert-buffer-memory