SQL Server migration assistant for MySQL! Usage

Source: Internet
Author: User
Tags wordpress database sql server express
SQL Server migration assistant for MySQL!

The SQL Server migration assistant (ssma) team announced today the availability of the migration assistant for MySQL! (Yes, it supports SQL Server Express.) You can...

  • Read the team's announcement here:
    Microsoft announces SQL Server migration assistant for MySQL
  • DownloadSsma for MySQLHere:
    SQL Server migration assistant for MySQL V1.0

Actually, the team announced the release of three other migration assistants:
Ssma for access
,Ssma for Oracle, AndSsma for Sybase(ALL v4.2). But, I'm most excited about the MySQL assistant, not only because it is a V1.0 release, but because I think it will come in handy for lots of people... I 've
Seen the "How can I easily migrate a MySQL database to SQL Server ?" Question come up occasionally on forums that I watch. The bonus that this release adds is that it can also migrate a MySQL database directly to
SQL azure cloud.

I had a chance to play with the SQL Server migration assistant for MySQL when it was in Beta a few months ago. it did a great job then of migrating a simple MySQL database, but the Team has added lots of functionality since the first beta release (including
Support for migrating stored procedures ). the download nodes A Help file with documentation that will give you an understanding of other features the team has added. what I'll do here is walk you through the "Hello World"-type usage of the assistant. i'll
Use ssma to move a MySQL WordPress database to SQL Server.

Note: I'm just showing how to migrate a WordPress database as an example. If you actually want to run WordPress on SQL Server, see this post by Zach OWENS:

WordPress on Microsoft.

1. Download the SQL Server migration assistant. After the installation, start the application by double-clicking the shortcut on your desktop:

Be sure to make note of the prerequisites that are listed inInstalling ssma for MYSQL clientHelp topic. If you don't, the assistant will prompt you to download the prerequsites (I needed
MySQL ODBC connector ).

2. Obtain a registration key. The first time you use ssma for MySQL, you will be directed to a site from which you can obtain a registration key (stored in a file called mysql-ssma.license ). you will have to indicate the directory in which
You will save this file:

3. Create a new project. Once the program is running, click on
New projectIcon in the upper left corner to get started:

At this point, you have to decide if you want to migrate to SQL Server or SQL azure in the dialog box that opens (I'm choosing SQL Server for this example ):

4. Connect to MySQL. Click onConnect to MySQLIcon in the upper left corner (you'll have to supply connection credentials). This will allow you to see a tree view of your MySQL metadata and several tabs that contain
Information about schema mapping (we'll leave the default values for the schema mapping here ).

5. Create a schema Migration Report. Select a database to migrate, then right-click the Database Name and selectCreate report:

The generated report will allow you to see any issues that might arise in schema migration. if there are any issues, you may want to address them by changing some of the default schema mapping settings (Edit values in the tabs I mentioned in step 4 ).

6. Connect to SQL Server (or SQL Azure, depending on what you chose in step 3). Click on the connect to SQL Server icon in the upper left corner. You can supply credentials to connect to SQL Server or SQL azure. If a database with the same
Name as the MySQL database you chose in Step 4 doesn't exist, you'll be asked if you want to create one.

Note: If you don't want ssma to create the database for you, You shoshould specify the database you want to migrate to in the connection dialog. by default, ssma for MySQL converts all the objects from database db1 into SQL Server schema db1.dbo
And SQL Server database db1 must be created before synchronization (see step 8 ). the easiest way to do so is to specify the name of the database in SQL Server connection dialog when establishing connection to SQL Server.

You shoshould now see a tree view of SQL Server metadata inSQL Server metadata Explorer. Select the schema to which you want to migrate.

7. Convert the schema (I. e. Tables). InMySQL metadata Explorer, Right-click the database you are migrating and select
Convert Schema:

At this point, you may make some changes to the converted schema. for example, I chose to make the link_updated column A nullable column, because the MySQL Default Value for this column, 0000-00-00 00:00:00, is a special value that will be treated
As a null value when data is migrated. Not making this change here cocould cause problems when I migrate data.

8. Synchronize the SQL Server database. To create converted tables in SQL Server, right-click the database you want to migrate to in the SQL Server metadata explorer and select
Synchronize with database.

ClickOKWhenSynchronize with databaseDialog box opens.

9. migrate the data. In the MySQL metadata explorer, right-click on the database you are migrating and selectMigrate data. You will have to again supply connection credentials for both the MySQL and SQL Server databases
Before the data is migrated.

And now your database schema and data shoshould be migrated.

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.