How to convert MySQL to SQL Server

Being a free, open-source database management system, MySQL offers many advantages, such as low total cost of ownership, high performance, support for multiple table engines, and indexing models suitable for different tasks. Despite this fact, some organizations look for solutions to convert MySQL to SQL Server. Here are the most common reasons for this willingness: 

  • Easy Integration with other Microsoft products. SQL Server offers native integration with other Microsoft products, such as Office 365. For example, MS Access can be the front-end for the SQL Server database, providing a user-friendly interface for any database manipulations and an advanced query builder. 
  • High performance. SQL Server beats MySQL in handling complex transactions and queries according to many benchmarks.
  • Comprehensive security. SQL Server offers more advanced security features than MySQL. For example, it protects data files and binaries, preventing any process from accessing or manipulating it. Instead, SQL Server requires users to design special routines for that purpose or access through the instance.
  • Backup. In MySQL, the database is exported as SQL statements, and DBMS blocks the database for the entire duration of backup or restore procedures. This method eliminates data loss or corruption risks, however, it causes essential system overhead and requires much time due to running bulk queries. In contrast, SQL Server does not block the database during backup or restore, which allows to save system resources. 
  • Top quality support. Microsoft developed SQL Server that provides proven enterprise-class support for all their products.

There are few popular approaches to convert MySQL to SQL Server. The whitepaper describes the most relevant solutions for this task. 

SQL Server Import & Export Wizard

This approach is based on the standard tool coming with a distribution pack of MS SQL. SQL Server Import and Export Wizard can help to convert MySQL to SQL Server according to the following steps: 

  1. The only prerequisite for this method is the installation of the MySQL ODBC Connector, which is the ODBC driver to access MySQL databases. To configure it after installation, open ODBC Data Source Administrator. Go to the ‘System DSN’ tab, click the ‘Add’ button, and specify MySQL ODBC driver. Input necessary information for establishing a connection to the MySQL server. 
  2. Launch the SQL Server Management Studio. Choose either to create a new SQL Server database or use an existing one.
  1. Launch the SQL Server Import and Export Wizard via right-clicking the MySQL database and selecting Tasks > Import Data menu item.
  2. Choose .NET Data Provider for ODBC as the ‘Data Source’ and select the DSN created on the first step.
  3. Choose the SQL Server Native Client as the target and enter the required connection details for the SQL Server.
  4. Finally, select to copy data from one or more tables and choose the tables to migrate.

After fulfilling these steps, SQL Server Import and Export Wizard will convert MySQL to SQL Server. 

MySQL to SQL Converter

The approach described above may take some time and essential human efforts since it requires a lot of manually implemented steps. For those users who need simple and automated way to convert MySQL to SQL Server there are commercial tools specially designed for this task. 

Intelligent Converters, a software vendor focused on database migration and synchronization for years, offers one of such tools called MySQL to SQL Server converter. The program has highly efficient engine for reading and writing data that combines low-level APIs with smart multi-threading algorithm. One of the most important features of the tool is automatic tuning number of working threads and memory usage based on the hardware platform specification. 

Capabilities of MySQL to SQL Server converter:

  • Converts schemas, data, indexes, constraints and views with all necessary attributes
  • Support for on-premises and cloud MySQL and SQL Server (including Amazon RDS, Azure SQL, Google Cloud)
  • Exports MySQL database into T-SQL script (workaround for situations when direct connection to SQL Server is not possible)
  • Allows to edit the target SQL Server tables (customize name, type, default value and other attributes of every column and exclude some fields from migration)
  • Merge or synchronize SQL Server tables with MySQL data
  • Allows to migrate result of SELECT-query as a regular table, that can be used for filtering data to migrate.
  • Command line version of the tool allows to convert MySQL to SQL Server automatically using Windows Task Scheduler

Visit official site of Intelligent Converters to learn more about how to convert MySQL to SQL Server and evaluate their tools for database migration and synchronization. 

Leave a Comment