"Database" is written with a cross-database data migration tool, database migration

Source: Internet
Author: User

"Database" is written with a cross-database data migration tool, database migration

With a hand-written cross-database data migration tool:
> Currently, SQL Server, MySql, and SQLite are supported;

> The migration tool can automatically create tables with primary keys retained and auto-incrementing columns;

> The migration tool is developed based on the Laura. Source ORM framework;

> The migration tool supports crash recovery (restarting the migration tool will continue the unfinished data migration );

> One transaction per table (even if the table contains more than 100 million data, it is also a transaction completed );

> The auto-increment column after migration is consistent with that of the original database;

 

Just for a demonstration, the direct film:

 

Operation tools:

 

Migration tool: (the source code is generated by the Operation tool, compiled into an assembly, and then called for running-that is, the source code of the migration tool is transparent)

 

 

Shu Xiaolong


I want to write a data migration tool that generates a large number of database files from database a. How can I put these data files in database B?

Icebergzx recommendations are reasonable,
The export/import tool that comes with the database allows you to do this.

Of course, if your database can be stopped, you can also stop database a B.
Then copy the file from database a to database B.

The premise is that the configuration is the same when you create a database. The file name must be the same.

100% success cannot be guaranteed.

How to migrate data from database A to database B

Cross-database operations can be performed on the same instance
Insert into database name. BT (id, name, sex)
Select id, name, sex from database name.

It is not required to export data from the same instance.
Mysql tool mysqldump can export the table at into A. SQL file, and then import the file to the database where the bt table is located. Or use other third-party tools to export and import data.
You can add linkserver to sqlserver, and add dblink to oracle to directly use the alias and database name for cross-database access. The ui also supports exporting and importing.

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.