不同库表数据库迁移工具

This article gives the overview of the Database Migration Assistant Tool to access, plan and migrate the SQL Server from an old version.

本文概述了用于从旧版本访问,计划和迁移SQL Server的数据库迁移助手工具。

Database migration is part of the DBA job. We can’t avoid it, and there are multiple options that can be taken:

数据库迁移是DBA工作的一部分。 我们无法避免,可以采取多种选择:

  • From SQL Server to SQL Server 从SQL Server到SQL Server
  • From another platform (Oracle Database, MySQL, PosgreSQL…) to SQL Server 从另一个平台(Oracle数据库,MySQL,PosgreSQL等)到SQL Server
  • From SQL Server to another platform (Oracle Database, MySQL, PosgreSQL…) 从SQL Server到另一个平台(Oracle数据库,MySQL,PosgreSQL等)

We can also perform a so-called “in-place” migration or a “side-by-side” migration. In the first one, everything will be performed on the same server. We could say that the source for the migration is also the destination of that migration. In the second, source and destination roles are physically separated. This means one server is the source and another server is the destination. Choosing one or the other depends on the migration context and environment, but in my career, we always chose a side-by-side migration because the OS and the server had to be upgraded or changed.

我们还可以执行所谓的“就地”迁移或“并排”迁移。 在第一个中,所有操作都将在同一服务器上执行。 我们可以说,迁移的来源也是该迁移的目的地。 第二,源角色和目标角色在物理上是分开的。 这意味着一台服务器是源,另一台服务器是目的地。 选择一个或另一个取决于迁移环境和环境,但是在我的职业生涯中,我们总是选择并行迁移,因为必须升级或更改OS和服务器。

You will definitely opt for a side-by-side migration when you want to migrate an Oracle database on Linux to a SQL Server on Windows so as a SQL Server on Windows to a SQL Server on Linux.

如果要将Linux上的Oracle数据库迁移到Windows上SQL Server,例如Windows上SQL Server到Linux上SQL Server,则肯定会选择并行迁移。

To help DBAs in this task that can be quite risky, Microsoft provides a bunch of tools that we will review in present article. You will find below a non-exhaustive list of these tools.

为了帮助DBA承担可能相当冒险的这项任务,Microsoft提供了很多工具,我们将在本文中对其进行回顾。 您会在下面找到这些工具的详尽列表。

  • Database Migration Guide 数据库迁移指南
  • Microsoft Assement and Planning Toolkit a.k.a MAP Microsoft评估和计划工具包又称为MAP
  • Database Migration Assistant a.k.a. DMA 数据库迁移助手又名DMA
  • Database Experimentation Assistant a.k.a DEA 数据库实验助手又名DEA
  • SQL Server Migration Assistant a.k.a. SSMA SQL Server迁移助手又名SSMA
    • For SQL MySQL 对于SQL MySQL
    • For Oracle 对于Oracle
    • For Access 用于访问
    • … …
  • … …

Let’s review some of these tools…

让我们回顾一下其中的一些工具...

数据库迁移指南 (Database Migration Guide)

Database Migration Guide is at first a website that will help you in a database migration. You can follow this link to get to the tool.

首先,《数据库迁移指南》是一个网站,它将帮助您进行数据库迁移。 您可以单击此链接转到该工具。

Here is how it looks like:

看起来是这样的:

It’s organized as follows:

它的组织如下:

  • First, there is a part to create a migration guide manual adapted to your migration context 首先,有一部分内容可以创建适合您的迁移环境的迁移指南手册
  • Then, there is a case studies section and also a partner tools sections. 然后,有一个案例研究部分和一个合作伙伴工具部分。

We will focus on the first part and click on “Start Here” button. It opens a form where we will first select a source data type with most commonly used ones:

我们将专注于第一部分,然后单击“从这里开始”按钮。 它将打开一个表单,在该表单中,我们将首先选择最常用的源数据类型:

The “other options” are at the moment this article has been written:

撰写本文时,“其他选项”如下:

  • PostgreSQL PostgreSQL
  • SAP ASE SAP ASE
  • Access 访问
  • MongoDB MongoDB
  • Azure Table Storage Azure表存储

Every time we select a source, all destination options will be displayed (either on-premise or in the Azure cloud). Once the source and destination RDBMS are defined, we’ll get to a summary of what has to be considered and how we can do it using.

每次我们选择一个源时,都会显示所有目标选项(内部部署或在Azure云中)。 定义了源RDBMS和目标RDBMS之后,我们将总结必须考虑的内容以及如何使用它。

For instance, if we select SQL Server as source, we will have two options: SQL Server or Azure

例如,如果我们选择SQL Server作为源,则将有两个选项:SQL Server或Azure

If we click on “SQL Server”, we will be redirected to a page that will sum up the work that has to be done:

如果单击“ SQL Server”,我们将被重定向到一个页面,该页面将总结必须完成的工作:

If you want to get more details about this kind of migration, you can go to this page.

如果您想获得有关这种迁移的更多详细信息,可以转到此页面 。

If you don’t know where to start, it’s the appropriate tool to use.

如果您不知道从哪里开始,那么它是适合使用的工具。

Microsoft评估和计划工具包(也称为MAP) (Microsoft Assessment and Planning Toolkit a.k.a. MAP)

This tool has been designed by Microsoft to help DBAs to perform common tasks that has to be done when we want to migrate:

Microsoft设计了此工具,以帮助DBA执行我们要迁移时必须完成的常见任务:

  • Inventory the existing system 盘存现有系统
  • Check for breaking changes and mandatory code adaptations before being able to migrate 在能够迁移之前,请检查重大更改和强制性代码改编
  • etc 等等

This tool has been well covered by an article entitled “How to use Microsoft Assessment and Planning Toolkit for SQL Server” written by Musab Umair and we won’t discuss it further, here.

Musab Umair撰写的标题为“ 如何使用SQL Server的Microsoft评估和计划工具包 ”的文章很好地介绍了此工具,在此不再赘述。

数据库迁移助手又名DMA (Database Migration Assistant a.k.a DMA)

What is it?

它是什么?

With Database Migration Assistant, you will be able to assess, plan and effectively upgrade older versions of SQL Server, starting SQL Server 2005, to a more recent version, from on-premise to Microsoft’s cloud.

使用Database Migration Assistant,您将能够评估,计划并有效地升级SQL Server的较旧版本(从SQL Server 2005开始)到从内部部署到Microsoft云的最新版本。

It can be downloaded following this link.

可以通过此链接下载。

Let’s review its installation process.

让我们回顾一下其安装过程。

Installation

安装

Click on next button.

单击下一步按钮。

Read the terms and accept them then click on Next button.

阅读条款并接受它们,然后单击下一步按钮。

Then you must agree the privacy policy and finally click on the Install button.

然后,您必须同意隐私政策,最后单击“安装”按钮。

If the installation is successful, you will get following pane. You can choose to either launch Database Migration Assistant or not when you click on the “Finish” button.

如果安装成功,将显示以下窗格。 单击“完成”按钮时,可以选择是否启动数据库迁移助手。

Using Database Migration Assistant

使用数据库迁移助手

Here is how the interface looks like at startup:

这是启动时界面的外观:

Let’s try it out and click on the “+” button on the left hand sidebar pointed out by the “Get started here” area.

让我们尝试一下,然后单击“开始于此处”区域指出的左侧边栏中的“ +”按钮。

A form will appear letting us choose between an assessment and a migration task. No matter the chosen option, we can see that a project name is absolutely necessary:

将出现一个表格,供我们在评估和迁移任务之间进行选择。 无论选择哪个选项,我们都可以看到项目名称是绝对必要的:

Using Database Migration Assistant to plan a migration

使用数据库迁移助手计划迁移

Let’s first choose the assessment project type and try to plan a SQL Server to SQL Server migration.

首先让我们选择评估项目类型,然后尝试计划从SQL Server到SQL Server的迁移。

One every parameter is set; we can push the “create” button.

每个参数都设置一个。 我们可以按“创建”按钮。

Once this button has been clicked, the tool will ask us more and more questions, starting with the target environment. We have following choices:

单击此按钮后,该工具将从目标环境开始向我们提出越来越多的问题。 我们有以下选择:

As I don’t have any SQL Server 2016 or 2017 available at the moment, let’s choose SQL Server 2014.

由于我目前没有任何SQL Server 2016或2017,因此我们选择SQL Server 2014。

By default, there is an option that will give advices on the new features that we would add benefits to the current situation.

默认情况下,有一个选项可以为新功能提供建议,以便为当前情况带来更多好处。

Once we set everything as we want, we can click on the next button to provide information about the source database(s).

设置完所需的所有内容后,我们可以单击下一步按钮以提供有关源数据库的信息。

Here is the screen where we provide source servers. We are directly on a form to add a new source where we can specify connection properties like server name, authentication type or connection properties like encryption usage.

这是我们提供源服务器的屏幕。 我们直接在表单上添加新的源,我们可以在其中指定连接属性(例如服务器名称,身份验证类型)或连接属性(例如加密使用情况)。

Notice the “SQL Server permissions” section on the screen that tells you what permissions are mandatory for the login used for connection.

注意屏幕上的“ SQL Server权限”部分,告诉您用于连接的登录必须具备哪些权限。

Once you provided correct credentials with appropriate permissions and clicked on the connect button, you will be shown a list of databases existing on the source server instance. You can select one or more databases and click on the “Add” button to actually add them as source databases for migration process. These databases will be analyzed to check if they can be migrated as is to the destination version of SQL Server.

一旦提供了具有适当权限的正确凭据并单击connect按钮,您将看到源服务器实例上现有数据库的列表。 您可以选择一个或多个数据库,然后单击“添加”按钮以将其实际添加为迁移过程的源数据库。 将分析这些数据库,以检查它们是否可以原样迁移到SQL Server的目标版本。

For instance:

例如:

Once we added all the databases, we get a summary with database names and sizes and we can click on a “Start assessment” button.

添加完所有数据库后,我们将获得一个包含数据库名称和大小的摘要,我们可以单击“开始评估”按钮。

We will have to wait a moment before getting back the results of this assessment in Database Migration Assistant. While waiting, we can notice that the report will either show compatibility issues or feature recommendations and that we will be able to look for a particular database. These filters can be found on the left part of the report pane:

我们将需要稍等片刻,然后才能在Database Migration Assistant中获取此评估的结果。 在等待期间,我们可以注意到该报告将显示兼容性问题或功能建议,并且我们将能够查找特定的数据库。 这些过滤器可以在报告窗格的左侧找到:

Once everything is done, we see that an assessment report is divided in multiple parts:

完成所有操作后,我们将看到评估报告分为多个部分:

First, there is an icon that visually tells you directly if the database can be migrated (orange rectangle in following screen capture). Then, we see that the tool will run an assessment task for each compatibility level option from current one to the one corresponding to destination’s SQL Server version (zone rounded in purple on following screen capture). Furthermore, for each compatibility level, we will see what the tool discovers in terms of breaking changes, behavior changes and depreciated features and we can click on each discovery to get a full explanation of the discoveries, and which objects are impacted (rounded in green in following screen capture). Finally, we can see there are three actions in Database Migration Assistant that we can perform:

首先,有一个图标直观地告诉您是否可以迁移数据库(以下屏幕截图中的橙色矩形)。 然后,我们看到该工具将为每个兼容性级别选项(从当前选项到与目标SQL Server版本相对应的选项)运行评估任务(在以下屏幕截图中,该区域以紫色四舍五入)。 此外,对于每个兼容性级别,我们将看到该工具在突破性更改,行为更改和折旧功能方面发现了什么,我们可以单击每个发现以完整了解发现以及受影响的对象(以绿色四舍五入)在以下屏幕截图中)。 最后,我们可以看到我们可以在数据库迁移助手中执行三个操作:

  • Restart the assessment 重新开始评估
  • Delete assessment results 删除评估结果
  • Export assessment report (to JSON or CSV) 导出评估报告(至JSON或CSV)

Using Database Migration Assistant to migrate databases and logins

使用数据库迁移助手来迁移数据库和登录名

Click on the “Plus” button on the left sidebar and create a new project, but this time, for migration purpose.

单击左侧工具栏上的“加号”按钮并创建一个新项目,但这一次是出于迁移目的。

Once clicked on the “Create” button, we will be directed to a form where we will first specify source and target server connection details. Once done, we can click on “Next” button.

单击“创建”按钮后,我们将定向到一个表单,在该表单中我们将首先指定源服务器和目标服务器的连接详细信息。 完成后,我们可以单击“下一步”按钮。

Once again, notice the “SQL Server permissions” text area that tells you exactly the permissions that are needed for the tool to run as expected.

再次注意“ SQL Server权限”文本区域,该区域准确地告诉您该工具按预期运行所需的权限。

If the provided credentials are correct and DMA can connect to source and destination server instances, we are asked to provide the list of databases that we have to migrate.

如果提供的凭据正确,并且DMA可以连接到源服务器和目标服务器实例,则要求我们提供必须迁移的数据库列表。

Actually, following screen will reveal how Database Migration Assistant will actually do the migration: using backup-restore technique.

实际上,以下屏幕将显示数据库迁移助手将如何实际执行迁移:使用备份-还原技术。

Thus, we need to provide a set of parameters inherent to this technique:

因此,我们需要提供此技术固有的一组参数:

  • Destination shared folder path for backup files 备份文件的目标共享文件夹路径
  • Destination path for data files 数据文件的目标路径
  • Destination path for transaction logs 事务日志的目标路径

These parameters will be used for all the databases selected in the tree panel on the left. We can specify different values for these parameters when clicking on a particular database in tree hierarchy

这些参数将用于在左侧树面板中选择的所有数据库。 单击树层次结构中的特定数据库时,我们可以为这些参数指定不同的值

We can see that, in the middle of the screen, there is an option that tells DMA to perform the backup, then copy backup files to a location that the service account under which SQL Server is running on destination server can read. If we click on that checkbox, here is what is added to the view:

我们可以看到,在屏幕中间,有一个选项告诉DMA执行备份,然后将备份文件复制到目标帐户上运行SQL Server的服务帐户可以读取的位置。 如果单击该复选框,则将以下内容添加到视图中:

Once we selected the databases to migrate and set parameters for backup-restore migration, we are invited to tell DMA which logins have to be kept. Database Migration Assistant will check for already existing logins and tell whether these logins are ready to be move, already exists or if there is a problem for them to be transferred.

一旦选择了要迁移的数据库并设置了用于备份-还原迁移的参数,我们将被邀请告诉DMA必须保留哪些登录信息。 数据库迁移助手将检查现有的登录名,并告知这些登录名是否已准备好移动,已经存在或是否存在传输问题。

Once we are ready, we can click on the “Start Migration Button”.

准备就绪后,我们可以单击“开始迁移按钮”。

If the migration is successful, you will be happy to get following view with 0 failed operations:

如果迁移成功,您将很高兴获得以下视图,其中包含0个失败的操作:

For each object considered, we can check logging information in a “migration details” column. If anything went wrong (with warning or error), we will be able to look at a more in-depth log:

对于所考虑的每个对象,我们都可以在“迁移详细信息”列中检查日志记录信息。 如果发生任何错误(警告或错误),我们将能够查看更深入的日志:

My opinion on the Database Migration Assistant

我对数据库迁移助手的看法

This tool is user-friendly in more than one way.

此工具通过多种方式对用户友好。

It provides valuable information for planning a migration and I would recommend using it.

它为计划迁移提供了宝贵的信息,我建议您使用它。

It can be used to perform migrations for small databases in small businesses or for non-IT people. However, as an IT professional, I don’t give a lot of credits to this tool as a professional migration tool that could be used in the environments I’m used to (24/7 with databases with database sizes over 100 Gb). Moreover, it won’t copy SQL Server Agent Jobs and settings, it won’t copy Linked Servers, it won’t copy Service Broker Endpoints…

它可用于为小型企业中的小型数据库或非IT人员执行迁移。 但是,作为一名IT专业人员,我不会将此工具誉为可以在我习惯的环境(数据库大小超过100 Gb的数据库为24/7)中使用的专业迁移工具。 此外,它不会复制SQL Server代理作业和设置,不会复制链接服务器,也不会复制Service Broker端点…

It’s however a good starting point for Microsoft as it’s quite a recent tool and it will evolve over time…

然而,对于Microsoft来说,这是一个很好的起点,因为它是一个相当新的工具,并且会随着时间的推移而发展……

数据库实验助手又名DEA (Database Experimentation Assistant a.k.a. DEA)

This tool allows a DBA to take the activity from source server and run it against destination server in order to check for performance issues, queries that have incompatibility errors, queries with degraded behavior or plans.

该工具允许DBA从源服务器获取活动,并在目标服务器上运行该活动,以检查性能问题,具有不兼容错误的查询,行为降级的查询或计划。

It can be download on following page.

可以在下一页下载。

A dedicated article will be online in following weeks.

接下来的几周将在线发表一篇专门的文章。

SQL Server迁移助手又名SSMA (SQL Server Migration Assistant a.k.a. SSMA)

SQL Server Migration assistant has the same purpose as Database Migration Assistant except that it’s designed for migrating data from a particular RDBMS that is not SQL Server.

SQL Server Migration Assistant具有与Database Migration Assistant相同的目的,除了它是为从不是SQL Server的特定RDBMS迁移数据而设计的。

There are multiple versions of SSMA, one for Oracle, one for MySQL, one for DB2…

SSMA有多种版本,一种用于Oracle,一种用于MySQL,一种用于DB2…

It can be download on following page.

可以在下一页下载。

A dedicated article will be online in the following weeks.

接下来的几周将在网上发表一篇专门的文章。

Next articles in this series:

本系列的下一篇文章:

  • Migrating an Oracle Database to SQL Server with Microsoft Data Migration Assistant – Installation Process and Short Overview使用Microsoft数据迁移助手将Oracle数据库迁移到SQL Server –安装过程和简短概述
  • A concrete example of migration between an Oracle Database and SQL Server using Microsoft Data Migration Assistant使用Microsoft数据迁移助手在Oracle数据库和SQL Server之间迁移的具体示例

翻译自: https://www.sqlshack.com/an-overview-of-sql-server-database-migration-tools-provided-by-microsoft/

不同库表数据库迁移工具

不同库表数据库迁移工具_Microsoft提供的数据库迁移助手工具概述相关推荐

  1. dts数据库迁移工具_干货分享丨DM8 DTS工具使用小技巧

    DTS工具的介绍 DM数据库为迁移提供了图形化工具--DTS.DTS可以从主流大型数据库迁移到DM.DM到DM.文件迁移到DM以及DM迁移到文件的功能,极大的简化了迁移操作,让数据迁移变得简单. DT ...

  2. 数据库审计系统提供服务器,数据库审计系统通用解决方案

    背景需求: 根据对其业务系统.数据中心的数据库系统的威胁与风险分析,用户数据库安全需求主要集中在以下方面:对一般操作行为如数据库的登录.注销动作,特定的操作如对数据表的插入.删除.修改,执行特定的存贮 ...

  3. 数据库迁移工具Kettle连接Mysql数据库报错:Driver class ‘org.gjt.mm.mysql.Driver‘ could not be found, make sure the解决

    报错信息: 错误连接数据库 [test] : org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while t ...

  4. MySQL 库表 employees, departments, locations, countries 测试数据

    库表数据和结构来源于Oracle数据库中的测试用示,为方便在MySQL下测试SQL语句,直接运行SQL语句就可导入数据 employees库表数据 /* Navicat MySQL Data Tran ...

  5. Oracle数据库数据同步方案,ORACLE数据库热备方案

    ORACLE数据库热备方案 相关指标 1.数据库秒级.事务级热备(可跨操作系统平台) 实时监控数据库,将数据库变化后的数据以秒级别的时间备份到备库,同时只备份主数据库已成功的事务. 2.备用数据库在线 ...

  6. java的netbeans数据库,使用 Java DB (Derby) 数据库

    使用 Java DB (Derby) 数据库 This tutorial needs a review. You can open a JIRA issue, or edit it in GitHub ...

  7. 达梦数据库的连接(四种方式-亲测可用)达梦数据库的几大小助手工具

    1.D M 管理工具连接数据库 2.d i s q l 连接数据库 [dmdba@localhost ~]$ disql disql V8 用户名:SYSDBA(也可以直接回车因为初始没有变化) 密码 ...

  8. Atitit. 数据库-----catalog与schema的设计区别以及在实际中使用 获取数据库所有库表 java jdbc php  c#.Net...

    Atitit. 数据库-----catalog与schema的设计区别以及在实际中使用 获取数据库所有库表 java jdbc php  c#.Net 1. -catalog与schema的设计区别1 ...

  9. mysql数据库:最全MySQL数据库设计建库、建表规范及经验(踩过坑才能积累经验!)

    废话 这两天还是在做刚接手的小项目,也是第一次一个人负责整个项目的所有流程,最后交给客户. 当自己去接触项目时,真的会踩很多很多坑,当然解决了就是很大的进步与成长.昨晚我就意识到自己给自己留了一个大坑 ...

最新文章

  1. linkedhashmap 顺序_有关于LinkedHashMap一份简单理解
  2. 牛津花卉数据集贴标签分类
  3. comsol计算数据导出matlab,comsol4.2怎样在matlab中通过函数输出数据
  4. lamber表达式sql_lambda表达式转换sql
  5. wurfl_比较OpenDDR与WURFL
  6. Asp.net MVC使用Filter解除Session, Cookie等依赖
  7. python读取多个文件夹_Python:从文件夹中读取多个json文件
  8. 数据分享 | 高光谱遥感影像数据集汇总
  9. SpringMVC中@RequestMapping参数设置
  10. 盘点12个yyds的微信小程序开源项目
  11. 姚前:新型货币战争才刚刚开始
  12. matlab中矩阵运算lu,matlab中矩阵lu分解
  13. 证书与签名(一):数字签名是什么
  14. 【Microsoft Azure 的1024种玩法】二十八. 基于Azure Cloud搭建IPS入侵防御系统实现安全流量实时分析
  15. 【区块链扩容】侧链技术 Plasma(Layer 2)
  16. 学习编程从哪里开始比较好呢?有什么推荐?
  17. 学完python可以从事哪些工作?
  18. 微信开发-错误码大全
  19. ISCA第一篇文献翻译:Automatic Abstraction and Fault Tolerance in Cortical Microachitectures
  20. Python 获取视频时长(附代码) | Python工具

热门文章

  1. 需求获取常见的方法是进行客户访谈,结合你的实践谈谈会遇到什么问题,你是怎么解决的?...
  2. QString string int double char 相互转化
  3. 用手机约会为何胜过电脑?
  4. mybatis 存储过程 tmp_count_MyBatis从入门到精通
  5. 在石家庄扣完五险一金到手5000,算什么水平?
  6. 旅游中用稳定器和相机拍视频是怎样的体验?
  7. “华为”和“荣耀”手机有什么区别?
  8. 现在为什么没有人再提“以厂为家”这样的词语啦?
  9. 祥林嫂形容哪类人?祥林嫂比喻什么样的人物?
  10. 终于明白我做小生意为啥赔钱了,主要原因还是进货渠道不行