SQL Server migration Assistant for MySQL usage

Source: Internet
Author: User
Tags microsoft sql server odbc mysql client mysql database wordpress database

The SQL Server Migration Assistant (SSMA) team announced today the launch of the migration Assistant for MySQL, Microsoft SQL Server Migration Assistant 2008 for MySQL.

Read related information: Microsoft releases SQL Server Migration Assistant for MySQL

Download Ssma for Mysql:sql Server Migration Assistant for MySQL 1.0

In fact, Microsoft has also released three other migration assistants: Ssma for Access, Ssma for Oracle, and Ssma for Sybase (all v4.2). It can also migrate a MySQL database to the cloud on SQL Azure.

Download the use Help file for the tools contained in the file, I will use Ssma to import a MySQL wordpress database into SQL Server.

Note: I just take WordPress as an example to show how to migrate the database, if you really want to run WordPress in SQL Server, see this article wordpress Microsoft

1. Download SQL Server Migration Assistant

When the installation is complete, double-click the shortcut on your desktop to start the application:

Note When installing SSMA, verify that you have installed the MySQL client, and if not, the assistant prompts you to download the MySQL ODBC connector.

2. Get a registration code

When you use SSMA for the first time, you need to obtain a registration code from Microsoft's official website, file name?? For Mysql-ssma.license, download and save it in a folder on your hard disk:

3. Create a new project

After you start the program, click the New Project icon in the upper left corner:

Then choose whether you want to migrate to SQL Server or SQL Azure (we choose SQL Servers):

4. Connecting to MySQL

Click on the upper left corner of the connection to the MySQL icon (you must confirm that you have installed the MySQL ODBC Connector), then your MySQL database information will be displayed in a tree view

5. Create a Schema Migration report

Select the database you want to migrate, right-click the database name, and choose Create report:

The generated report will let you see any problems that may arise in the schema migration. If you have problems, you can resolve these problems by changing some of the default schema mapping settings (the information in the Edit tab, as mentioned in step 4th).

6. Connect to SQL Server (or SQL Azure, depending on your choice in step 3rd)

Click the "connect to the upper left corner of the SQL Server icon." You can provide credentials to connect to SQL Server or SQL Azure. If you chose the MySQL database in step 4 with the same name that does not exist, you will be asked if you want to create one.

Note: If you do not want Ssma to create a database for you, you should specify the database you want to migrate to in the Connection dialog box. By default, Ssma must be created synchronously (see step 8th) before converting all objects in the MySQL database DB1 to the SQL Server schema db1.dbo SQL Server database DB1. The easiest way to do this is to specify the database name in the SQL Server Connection dialog box when you establish a connection to the SQL Server database.

You should now see SQL Server SQL Server data in the tree view of SQL Server Explorer, select the mode you want to migrate.

7. Conversion Mode (table) in MySQL metadata Explorer, right-click the database you want to migrate, and then select Convert mode:

At this point, you may need to make some changes in the transformation pattern, for example, I chose the link_updated column, which is a nullable column because MySQL sets the default value, and 0000-00-00 00:00:00 is a special value, will be treated as a null data migration, and this change can lead to errors if the data is migrated without change.

Synchronization of 8.SQL Server databases

Select the database you want to sync to in SQL Server, right-click to synchronize with database

In the Synchronize with Database dialog box that opens, click OK.

9. Migrating data

In MySQL metadata Explorer, right-click the database you want to migrate and select migrate data to enter the connection credentials for MySQL and the SQL Server database.

Now your database schema and data have been migrated.

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.