title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | ms.collection | helpviewer_keywords | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Connecting to Azure SQL Database (MySQLToSQL) |
Connecting to Azure SQL Database (MySQLToSQL) |
cpichuka |
cpichuka |
11/16/2020 |
sql |
ssma |
conceptual |
|
|
To migrate MySQL databases to [!INCLUDE ssazure-sqldb], you must connect to the target instance of [!INCLUDE ssazure-sqldb]. When you connect, SSMA obtains metadata about all the databases in the instance of [!INCLUDE ssazure-sqldb] and displays database metadata in the Azure SQL Database Metadata Explorer. SSMA stores information of the instance of [!INCLUDE ssazure-sqldb] you are connected to, but does not store passwords.
Your connection to [!INCLUDE ssazure-sqldb] stays active until you close the project. When you reopen the project, you must reconnect to [!INCLUDE ssazure-sqldb] if you want an active connection to the server. You can work offline until you load database objects into [!INCLUDE ssazure-sqldb] and migrate data.
Metadata about the instance of [!INCLUDE ssazure-sqldb] is not automatically synchronized. Instead, to update the metadata in Azure SQL Database Metadata Explorer, you must manually update the [!INCLUDE ssazure-sqldb] metadata. For more information, see the "Synchronizing Azure SQL Database Metadata" section later in this topic.
The account that is used to connect to [!INCLUDE ssazure-sqldb] requires different permissions depending on the actions that the account performs:
-
To convert MySQL objects to [!INCLUDEtsql] syntax, to update metadata from [!INCLUDE ssazure-sqldb], or to save converted syntax to scripts, the account must have permission to log on to the instance of [!INCLUDE ssazure-sqldb].
-
To load database objects into [!INCLUDE ssazure-sqldb], the account must be a member of the db_ddladmin database role.
-
To migrate data to [!INCLUDE ssazure-sqldb], the account must be a member of the db_owner database role.
Before you convert MySQL database objects to [!INCLUDE ssazure-sqldb] syntax, you must establish a connection to the instance of [!INCLUDE ssazure-sqldb] where you want to migrate the MySQL database or databases.
When you define the connection properties, you also specify the database where objects and data will be migrated. You can customize this mapping at the MySQL schema level after you connect to [!INCLUDE ssazure-sqldb]. For more information, see Mapping MySQL Databases to SQL Server Schemas (MySQLToSQL).
Important
Before you try to connect to [!INCLUDE ssazure-sqldb], make sure that your IP address is allowed through the [!INCLUDE ssazure-sqldb] firewall.
To connect to [!INCLUDE ssazure-sqldb]:
-
On the File menu, select Connect to Azure SQL Database (this option is enabled after the creation of a project). If you have previously connected to [!INCLUDE ssazure-sqldb], the command name will be Reconnect to Azure SQL Database.
-
In the connection dialog box, enter or select the server name of [!INCLUDE ssazure-sqldb].
-
Enter, select or Browse the Database name.
-
Enter or select Username.
-
Enter the Password.
-
SSMA recommends encrypted connection to [!INCLUDE ssazure-sqldb].
-
Click Connect.
Metadata about databases in [!INCLUDE ssazure-sqldb] is not automatically updated. The metadata in Azure SQL Database Metadata Explorer is a snapshot of the metadata when you first connected to [!INCLUDE ssazure-sqldb], or the last time that you manually updated metadata. You can manually update metadata for all databases, or for any single database or database object. To synchronize metadata:
-
Make sure that you are connected to [!INCLUDE ssazure-sqldb].
-
In Azure SQL Database Metadata Explorer, select the check box next to the database or database schema that you want to update. For example, to update the metadata for all databases, select the box next to Databases.
-
Right-click Databases, or the individual database or database schema, and then select Synchronize with Database.
The next step in the migration depends on your project needs:
- To customize the mapping between MySQL schemas and [!INCLUDE ssazure-sqldb], see Mapping MySQL Databases to SQL Server Schemas (MySQLToSQL).
- To customize configuration options for the projects, see Setting Project Options (MySQLToSQL).
- To customize the mapping of source and target data types, see Mapping MySQL and SQL Server Data Types (MySQLToSQL).
- If you do not have to perform any of these tasks, you can convert the MySQL database object definitions into [!INCLUDE ssazure-sqldb] object definitions. For more information, see Converting MySQL Databases (MySQLToSQL).
Migrating MySQL Databases to SQL Server - Azure SQL Database (MySQLToSQL)