"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.