You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sql-server/migrate/guides/mysql-to-sql-server.md
+42-44Lines changed: 42 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,14 @@
1
1
---
2
2
title: "MySQL to SQL Server: Migration guide"
3
-
description: 'This guide teaches you how to migrate your MySQL databases to Microsoft SQL Server by using SQL Server Migration Assistant for MySQL (SSMA for MySQL).'
3
+
description: "This guide teaches you how to migrate your MySQL databases to Microsoft SQL Server by using SQL Server Migration Assistant for MySQL (SSMA for MySQL)."
4
+
author: MashaMSFT
5
+
ms.author: mathoma
6
+
ms.reviewer: randolphwest
7
+
ms.date: 01/20/2023
4
8
ms.service: sql
5
-
ms.reviewer: ""
6
9
ms.subservice: migration-guide
7
10
ms.topic: how-to
8
-
author: MashaMSFT
9
-
ms.author: mathoma
10
-
ms.date: 10/05/2021
11
-
ms.custom:
12
-
- intro-migration
11
+
ms.custom: intro-migration
13
12
---
14
13
15
14
# Migration guide: MySQL to SQL Server
@@ -18,7 +17,7 @@ ms.custom:
18
17
19
18
In this guide, you learn how to migrate your MySQL databases to SQL Server.
20
19
21
-
For other migration guides, see [Azure Database Migration Guides](/data-migration).
20
+
For other migration guides, see [Azure Database Migration Guides](/data-migration).
22
21
23
22
## Prerequisites
24
23
@@ -42,25 +41,25 @@ To create an assessment:
42
41
1. On the **File** menu, select **New Project**.
43
42
1. Enter the project name and a location to save your project and the migration target. Then select **SQL Server** in the **Migrate To** option.
44
43
45
-

44
+
:::image type="content" source="./media/mysql-to-sql-server/new-project.png" alt-text="Screenshot that shows New Project option.":::
46
45
47
46
1. In the **Connect to MySQL** dialog box, enter connection details, and then connect to your MySQL server.
48
47
49
-

48
+
:::image type="content" source="./media/mysql-to-sql-server/connect-to-mysql.png" alt-text="Screenshot that shows Connect to MySQL option.":::
50
49
51
50
1. Select the MySQL databases you want to migrate.
52
51
53
-

52
+
:::image type="content" source="./media/mysql-to-sql-server/select-database.png" alt-text="Screenshot that shows selecting the MySQL database you want to migrate.":::
54
53
55
54
1. Right-click the MySQL database in **MySQL Metadata Explorer**, and select **Create Report**. Alternatively, you can select the **Create Report** tab in the upper-right corner.
56
55
57
-

56
+
:::image type="content" source="./media/mysql-to-sql-server/create-report.png" alt-text="Screenshot that shows Create Report feature.":::
58
57
59
58
1. Review the HTML report to understand conversion statistics and any errors or warnings. You can also open the report in Excel to get an inventory of MySQL objects and the effort required to perform schema conversions. The default location for the report is in the report folder within SSMAProjects, as shown here:

61
+
62
+
:::image type="content" source="./media/mysql-to-sql-server/conversion-report.png" alt-text="Screenshot that shows a conversion report.":::
64
63
65
64
### Validate the type mappings
66
65
@@ -69,7 +68,7 @@ Validate the default data type mappings and change them based on requirements, i
69
68
1. On the **Tools** menu, select **Project Settings**.
70
69
1. Select the **Type Mapping** tab.
71
70
72
-

71
+
:::image type="content" source="./media/mysql-to-sql-server/type-mappings.png" alt-text="Screenshot that shows Type Mapping feature.":::
73
72
74
73
1. You can change the type mapping for each table by selecting the table in **MySQL Metadata Explorer**.
75
74
@@ -85,24 +84,24 @@ To convert the schema:
85
84
86
85
1. (Optional) To convert dynamic or ad-hoc queries, right-click the node and select **Add Statement**.
87
86
1. Select the **Connect to SQL Server** tab.
88
-
1. Enter connection details for your SQL Server instance.
89
-
1. Select your target database from the drop-down list, or enter a new name, in which case a database will be created on the target server.
90
-
1. Enter authentication details, and then select **Connect**.
87
+
1. Enter connection details for your SQL Server instance.
88
+
1. Select your target database from the drop-down list, or enter a new name, in which case a database will be created on the target server.
89
+
1. Enter authentication details, and then select **Connect**.
91
90
92
-

91
+
:::image type="content" source="./media/mysql-to-sql-server/connect-to-sql-server.png" alt-text="Screenshot that shows Connect to SQL Server.":::
93
92
94
93
1. Right-click the MySQL database in **MySQL Metadata Explorer**, and then select **Convert Schema**. Alternatively, you can select the **Convert Schema** tab in upper-right corner.
95
94
96
-

95
+
:::image type="content" source="./media/mysql-to-sql-server/convert-schema.png" alt-text="Screenshot that shows Convert Schema option.":::
97
96
98
97
1. After the conversion finishes, compare and review the converted objects to the original objects to identify potential problems and address them based on the recommendations.
99
98
100
-

99
+
:::image type="content" source="./media/mysql-to-sql-server/table-comparison.png" alt-text="Screenshot that shows comparing and reviewing objects.":::
101
100
102
101
1. Compare the converted Transact-SQL text to the original code, and review the recommendations.
103
102
104
-

105
-
103
+
:::image type="content" source="./media/mysql-to-sql-server/procedure-comparison.png" alt-text="Screenshot that shows comparing and reviewing converted code.":::
104
+
106
105
1. In the output pane, select **Review results** and review the errors in the **Error List** pane.
107
106
1. Save the project locally for an offline schema remediation exercise. On the **File** menu, select **Save Project**. This step gives you an opportunity to evaluate the source and target schemas offline and perform remediation before you publish the schema to SQL Server.
108
107
@@ -115,16 +114,16 @@ After you have the necessary prerequisites in place and have completed the tasks
115
114
You have two options for migrating data:
116
115
117
116
-**Client-side data migration**
118
-
- To perform client-side data migration, select the **Client Side Data Migration Engine** option in the **Project Settings** dialog box.
117
+
- To perform client-side data migration, select the **Client Side Data Migration Engine** option in the **Project Settings** dialog box.
119
118
120
-
> [!NOTE]
121
-
> When SQL Express edition is used as the target database, only client-side data migration is allowed and server-side data migration isn't supported.
119
+
> [!NOTE]
120
+
> When SQL Express edition is used as the target database, only client-side data migration is allowed and server-side data migration isn't supported.
122
121
123
122
-**Server-side data migration**
124
-
- Before you perform data migration on the server side, ensure that:
125
-
- The SSMA for MySQL Extension Pack is installed on the instance of SQL Server.
126
-
- The SQL Server Agent service is running on the instance of SQL Server.
127
-
- To perform server-side data migration, select the **Server Side Data Migration Engine** option in the **Project Settings** dialog box.
123
+
- Before you perform data migration on the server side, ensure that:
124
+
- The SSMA for MySQL Extension Pack is installed on the instance of SQL Server.
125
+
- The SQL Server Agent service is running on the instance of SQL Server.
126
+
- To perform server-side data migration, select the **Server Side Data Migration Engine** option in the **Project Settings** dialog box.
128
127
129
128
> [!IMPORTANT]
130
129
> If you plan to use the Server Side Data Migration Engine, before you migrate data, you must install the SSMA for MySQL Extension Pack and the MySQL providers on the computer that's running SSMA for MySQL. The SQL Server Agent service must also be running. For more information about how to install the extension pack, see [Installing SQL Server Migration Assistant Components on SQL Server (MySQL to SQL)](../../../ssma/mysql/installing-ssma-components-on-sql-server-mysqltosql.md).
@@ -133,23 +132,23 @@ To publish your schema and migrate the data:
133
132
134
133
1. Publish the schema by right-clicking the database in **SQL Server Metadata Explorer** and selecting **Synchronize with Database**. This action publishes the MySQL database to the SQL Server instance.
135
134
136
-

135
+
:::image type="content" source="./media/mysql-to-sql-server/synchronize-database.png" alt-text="Screenshot that shows Synchronize with Database.":::
137
136
138
137
1. Review the mapping between your source project and your target.
139
138
140
-

139
+
:::image type="content" source="./media/mysql-to-sql-server/synchronize-database-review.png" alt-text="Screenshot that shows reviewing the synchronization with the database.":::
141
140
142
141
1. Migrate the data by right-clicking the database or object you want to migrate in **MySQL Metadata Explorer** and selecting **Migrate Data**. Alternatively, you can select the **Migrate Data** tab. To migrate data for an entire database, select the check box next to the database name. To migrate data from individual tables, expand the database, expand **Tables**, and then select the check boxes next to the tables. To omit data from individual tables, clear the check boxes.
143
142
144
-

143
+
:::image type="content" source="./media/mysql-to-sql-server/migrate-data.png" alt-text="Screenshot that shows Migrate Data option.":::
145
144
146
145
1. After migration is completed, view the **Data Migration Report**.
147
146
148
-

147
+
:::image type="content" source="./media/mysql-to-sql-server/migration-report.png" alt-text="Screenshot that shows the Data Migration Report.":::
149
148
150
149
1. Connect to your SQL Server instance by using [SQL Server Management Studio](../../../ssms/download-sql-server-management-studio-ssms.md), and validate the migration by reviewing the data and schema.
151
150
152
-

151
+
:::image type="content" source="./media/mysql-to-sql-server/validate-in-ssms.png" alt-text="Screenshot that shows validation in SQL Server Management Studio.":::
153
152
154
153
## Post-migration
155
154
@@ -172,23 +171,22 @@ The test approach for database migration consists of the following activities:
172
171
173
172
The post-migration phase is crucial for reconciling any data accuracy issues, verifying completeness, and addressing performance issues with the workload.
174
173
175
-
> [!Note]
174
+
> [!NOTE]
176
175
> For more information about these issues and the steps to mitigate them, see the [Post-migration validation and optimization guide](../../../relational-databases/post-migration-validation-and-optimization-guide.md).
177
176
178
177
## Migration assets
179
178
180
179
For more assistance with completing this migration scenario, see the following resource. It was developed in support of a real-world migration project engagement.
|[Data Workload Assessment Model and Tool](https://www.microsoft.com/download/details.aspx?id=103130)| This tool provides suggested "best fit" target platforms, cloud readiness, and application or database remediation level for a given workload. It offers simple, one-click calculation and report generation that helps to accelerate large estate assessments by providing an automated and uniform target platform decision process.|
185
-
|[MySQL to SQL Server - Database Compare utility](https://www.microsoft.com/download/details.aspx?id=103016)|The Database Compare utility is a Windows console application that you can use to verify that the data is identical both on source and target platforms. You can use the tool to efficiently compare data down to the row or column level in all or selected tables, rows, and columns.|
181
+
| Title | Description |
182
+
| --- | --- |
183
+
|[Data Workload Assessment Model and Tool](https://www.microsoft.com/download/details.aspx?id=103130)| This tool provides suggested "best fit" target platforms, cloud readiness, and application or database remediation level for a given workload. It offers easy calculation and report generation that helps to accelerate large estate assessments by providing an automated and uniform target platform decision process. |
184
+
|[MySQL to SQL Server - Database Compare utility](https://www.microsoft.com/download/details.aspx?id=103016)|The Database Compare utility is a Windows console application that you can use to verify that the data is identical both on source and target platforms. You can use the tool to efficiently compare data down to the row or column level in all or selected tables, rows, and columns.|
186
185
187
186
The Data SQL Engineering team developed these resources. This team's core charter is to unblock and accelerate complex modernization for data platform migration projects to Microsoft's Azure data platform.
188
187
189
-
190
188
## Next steps
191
189
192
-
-To learn more about migrating MySQL databases to SQL Server, see [SQL Server Migration Assistant documentation for MySQL](../../../ssma/mysql/sql-server-migration-assistant-for-mysql-mysqltosql.md).
193
-
-For a matrix of Microsoft and third-party services and tools that are available to assist you with various database and data migration scenarios and specialty tasks, see [Services and tools for data migration](/azure/dms/dms-tools-matrix).
194
-
-For other migration guides, see [Azure Database Migration Guides](https://datamigration.microsoft.com/).
190
+
-[SQL Server Migration Assistant documentation for MySQL](../../../ssma/mysql/sql-server-migration-assistant-for-mysql-mysqltosql.md)
191
+
-[Services and tools for data migration](/azure/dms/dms-tools-matrix)
0 commit comments