Take eclipse RCP as your own database migration Tool

Source: Internet
Author: User

My product is required to run under a variety of common database platforms (mysql/sqlserver/oracle), and in development it is necessary to strictly follow the relevant specifications to ensure that cross-database type requirements are met. (Related points in my "your system really because of the use of Hibernate can adapt to various databases?" "It has been mentioned in the article." In the initial development, there is a problem that bothers my team, we develop the time must be based on a specific database development (such as MySQL), but in the testing phase is the need for a different database platform for compatibility testing, Because the database structure and the seed data change very quickly in the development process, all writing the SQL Way is a waste of time, how to find an efficient database migration tool, is our urgent solution.

In fact, there is no choice, the more common Database Migration Tool is SQL Server's own DTS, this thing in the SQL Server database data import/export, it is really easy to use, in different types of database operations, there will be a lot of problems, such as: type conversion needs to manually specify/ The Export field has double quotes ...

So the final choice is to do a DTS of their own well, the idea is as follows:

1. Select source database connection and Target database connection

2, according to the source database traverse all database objects (table), as a benchmark

3, delete the target database all table foreign key and index, delete all kinds of Word data (according to Convention) data, fields are allowed null

4, traversing all the tables in the source database to modify the structure of the target database (such as adding and deleting fields, field change type, size)

5. Copy the seed data table data from the source database to the target database

6, based on the source database for the table in the target database to create foreign keys and indexes, set whether to allow null

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.