mysql 映射_将 MySQL 数据库映射到 SQL Server 架构 (MySQLToSQL)

将 MySQL 数据库映射到 SQL Server 架构 (MySQLToSQL)Mapping MySQL Databases to SQL Server Schemas (MySQLToSQL)

01/19/2017

本文内容

默认情况下,SSMA for MySQL 将 MySQL 架构中的所有对象迁移到 SQL ServerSQL Server 名为的或 AZURE SQL 数据库的架构。By default, SSMA for MySQL migrates all objects in a MySQL schema to a SQL ServerSQL Server or Azure SQL Database named for the schema. 但是,你可以自定义 MySQL 架构和 SQL ServerSQL Server 或 AZURE SQL 数据库之间的映射。However, you can customize the mapping between MySQL schemas and SQL ServerSQL Server or Azure SQL Database.

MySQL、SQL Server 或 SQL Azure 架构MySQL and SQL Server or SQL Azure Schemas

架构的 MySQL 概念映射到数据库的 SQL Server 概念及其架构之一。The MySQL concept of a schema maps to the SQL Server concept of a database and one of its schemas. SSMA 是指作为架构的数据库和架构的 SQL Server 组合。SSMA refers to the SQL Server combination of database and schema as a schema.

架构的 MySQL 概念映射到数据库的 SQL Server 概念及其架构之一。The MySQL concept of a schema maps to the SQL Server concept of a database and one of its schemas. 例如,MySQL 可能有一个名为HR的架构。For example, MySQL might have a schema named HR. SQL Server 的实例可能有一个名为HR的数据库,该数据库中的数据库是架构。An instance of SQL Server might have a database named HR, and within that database are schemas. 一个架构是dbo (或数据库所有者) 架构。One schema is the dbo (or database owner) schema. 默认情况下,MySQL schema hr将映射到 SQL ServerSQL Server 数据库,架构hr. dbo。By default, the MySQL schema HR will be mapped to the SQL ServerSQL Server database and schema HR.dbo. SSMA 是指 SQL ServerSQL Server 作为架构的数据库和架构的组合。SSMA refers to the SQL ServerSQL Server combination of database and schema as a schema.

可以修改 MySQL 和 SQL ServerSQL Server 或 Azure 架构之间的映射。You can modify the mapping between MySQL and SQL ServerSQL Server or Azure schemas.

修改目标数据库和架构Modifying the Target Database and Schema

在 SSMA 中,可以将 MySQL 架构映射到任何可用 SQL ServerSQL Server 或 SQL Azure 架构。In SSMA, you can map a MySQL schema to any available SQL ServerSQL Server or SQL Azure schema.

修改数据库和架构To modify the database and schema

在 MySQL 元数据资源管理器中,选择 "架构"。In MySQL Metadata Explorer, select Schemas.

选择各个架构时,还可以使用 "架构映射" 选项卡。The Schema Mapping tab is also available when you select individual schemas. 为所选对象自定义 "架构映射" 选项卡中的列表。The list in the Schema Mapping tab is customized for the selected object.

在右侧窗格中,单击 "架构映射" 选项卡。In the right pane, click the Schema Mapping tab.

你将看到所有 MySQL 架构的列表,后跟目标值。You will see a list of all MySQL schemas, followed by a target value. 此目标以两部分表示法表示, (database. schema) SQL ServerSQL Server 或 SQL Azure 其中将迁移对象和数据。This target is denoted in a two part notation (database.schema) in SQL ServerSQL Server or SQL Azure where your objects and data will be migrated.

选择包含要更改的映射的行,然后单击 "修改"。Select the row that contains the mapping that you want to change, and then click Modify.

在 "选择目标架构" 对话框中,您可以浏览可用目标数据库和架构,或在两部分表示形式的文本框中输入数据库和架构名称 (database. Schema) ,然后单击 "确定"。In the Choose Target Schema dialog box, you may browse for available target database and schema or type the database and schema name in the textbox in a two part notation (database.schema) and then click OK.

"架构映射" 选项卡上的目标更改。The target changes on the Schema Mapping tab.

映射模式Modes of Mapping

映射到 SQL ServerMapping to SQL Server

您可以将源数据库映射到任何目标数据库。You can map source database to any target database. 默认情况下,源数据库映射到 SQL ServerSQL Server 使用 SSMA 连接的目标数据库。By default source database is mapped to target SQL ServerSQL Server database with which you have connected using SSMA. 如果要映射的目标数据库在上不 SQL ServerSQL Server 存在,则系统会提示你提供消息 "目标元数据中不存在数据库和/或架构 SQL ServerSQL Server 。它将在同步过程中创建。是否要继续? "If the target database being mapped is non-existing on SQL ServerSQL Server, then you will be prompted with a message "The Database and/or schema does not exist in target SQL ServerSQL Server metadata. It would be created during synchronization. Do you wish to continue?" 单击“是”。Click Yes. 同样,你可以将架构映射到目标数据库下将在 SQL ServerSQL Server 同步过程中创建的非现有架构。Similarly, you can map schema to non-existing schema under target SQL ServerSQL Server database which will be created during synchronization.

映射到 SQL AzureMapping to SQL Azure

您可以将源数据库映射到连接目标数据库 SQL ServerSQL Server 或连接的目标数据库中的任何架构 SQL ServerSQL Server 。You can map the source database to the connected target SQL ServerSQL Server database or to the any schema in the connected target SQL ServerSQL Server database. 如果将源架构映射到已连接目标数据库下的任何非现有架构,则系统会提示您输入消息 "目标元数据中不存在架构"。它将在同步过程中创建。是否要继续?" 单击" 是 "。If you map source Schema to any non-existing schema under connected target database, then you will be prompted with a message "Schema does not exist in target metadata. It would be created during synchronization. Do you wish to continue? " Click Yes.

恢复到默认数据库和架构Reverting to the Default Database and Schema

如果自定义 MySQL 架构与 SQL Server 架构之间的映射,则可以将映射恢复为默认值。If you customize the mapping between a MySQL schema and a SQL Server schema, you can revert the mapping back to the default values.

恢复为默认数据库和架构To revert to the default database and schema

在 "架构映射" 选项卡下,选择任意行,然后单击 "重置为默认值" 以还原为默认数据库和架构。Under the schema mapping tab, select any row and click Reset to Default to revert to the default database and schema.

后续步骤Next Steps

如果要分析 MySQL 对象到 SQL Server 或 SQL Azure 对象的转换,则可以创建转换报告,否则可将 mysql 数据库对象定义转换为 SQL Server 或 SQL Azure 架构If you want to analyze the conversion of MySQL objects into SQL Server or SQL Azure objects, you can create a conversion report otherwise you can Convert the MySQL database object definitions into SQL Server or SQL Azure schemas

另请参阅See Also

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值