Use Perl for database migration, from MSSQL to MySQL (iv) Summary

Source: Internet
Author: User

After three days, I finally completed the project. Let's make a summary and learn from history.

When I was sure to use Perl to do this, an old bird in the company saw it and said to me, "Why don't you use C # To write? First, you are skilled and do not need to check the grammar. Second, didn't you go back to the primitive society from the 21st century? I don't have grammar intelligence, but I use Notepad. Isn't that a problem ?" I smiled at the time and didn't care too much, because I thought about C # Before I chose it, but its biggest drawback is that I can't keep running on the server, because the server is a Linux operating system, and the most important thing is to give yourself a challenge, to lay the foundation for System Management in Linux (ah! The younger brother is really not an anman .).

But when we used Perl, the syntax was really not a problem, because it was similar to our natural language, and at the end, I found it concise and amazing (of course, who knows this ). The biggest problem is the Perl garbage collection problem during data migration. During the first debugging, a table is okay, even if there are 2000 entries at a time, it can be executed two or three times, soon after, but later, in the second debugging, I reduced the data size. Each table only exported 20 pieces of data. As a result, one or two tables will be imported, and "out of memory!" will be reported!" This really makes me a whole... Ah!

However, when I found that the table was created by SQL Server, all nvarchar uses Max ~~~

 

Finally, after testing, this solution can basically export about 90% of tables, and about 10% of Tables still cannot be migrated automatically. The problem is unknown and data cannot be exported anyway.

 

Finally, this is my younger brother's ignorance. If you have any incorrect information, please make a picture...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.