博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SQL Server 2012笔记分享-47:Database Recovery Advisor
阅读量:7122 次
发布时间:2019-06-28

本文共 4184 字,大约阅读时间需要 13 分钟。

下面英文的部分,参考了官方的语言。

   

简单来说,两大优势:

  1. 帮助数据库管理员创建最佳的恢复序列

  2. 使用msdb中的备份历史纪录

The Database Recovery Advisor(数据库恢复顾问)

The DRA is new to SQL 2012.  A user accesses the DRA via the “Object Explorer” in SSMS and the intended purpose of the DRA is to assist DBAs in creating restore sequences that are optimal and correct.  The DRA can choose a restore sequence based on information it has about backups associated with a database.

The DRA Interface – “General” Page

The “General” page can be used to specify the required information about the target and source databases needed for a database restore operation.  This page is split into three different sections “Source”, “Destination”, and “Restore Plan.”

Source – This section contains areas where it can be specified the location of the backup sets for the database and which backup sets are to be restored.

?Database – Use the drop-down list box to select the database to restore.

?Device –  Used to point to specific backup files or devices.  Note: This is required if the database backup was taken on a different instance of SQL Server. Up to 64 devices can be selected that belong to a single media set.(注解:如果要从备份设备还原,必须之前创建了备份设备并且将备份存放在备份设备中,关于如何创建备份设备,可参考我之前的笔记:http://543925535.blog.51cto.com/639838/1426808)

?Database – Select the database name from which the backups should be restored from the dropdown list.

Destination – This section is used to identify the database and the restore point.

?Database - Enter the database to restore in the list.

?Restore to - The “Restore to” box will be set "To the last backup taken" by default.  You can also click Timeline to show the Backup Timeline dialog box, which displays the database backup history in the form of a timeline. (注解:这里可以指定将数据库还原到哪个时间点,我们双击下图中时间轴上的数据库备份的图例,就可以准备定位到对应的时间点)

   

Restore Plan

Backup site to restore - Displays the backup sets available for the specified location. Each backup set, the result of a single backup operation, is distributed across all of the devices in the media set.  By default, a recovery plan is suggested to achieve the goal of the restore operation that is based on the selection of the required backup sets.  SQL Server Management Studio (SSMS) uses the backup history in msdb to identify which backups are required to restore a database, and creates a restore plan.  For example, the restore plan selects the most recent full database backup followed by the most recent subsequent differential database backup, if any exist. Under the full recovery model, the restore plan then selects all subsequent log backups.

To override the suggested recovery plan, you can change the selections in the grid.  Any backups that depend on a deselected backup are deselected automatically.

Verify Backup Media(验证备份介质) - This button allows you to check the integrity of the selected backup files prior to restoring them.

When checking the integrity of backup sets, the progress status at the bottom left of the dialog box will read "Verifying" rather than "Executing."

==================================================================

还原数据库所需要的权限

Permissions - If the database being restored does not exist, the user must have CREATE DATABASE permissions to be able to execute RESTORE. If the database exists, RESTORE permissions default to members of the sysadmin and dbcreator fixed server roles and the owner (dbo) of the database.

RESTORE permissions are given to roles in which membership information is always readily available to the server. Because fixed database role membership can be checked only when the database is accessible and undamaged, which is not always the case when RESTORE is executed, members of the db_owner fixed database role do not have RESTORE permissions.

======================================================================

我们可以对比看一下SQL server 2008R2的还原数据库界面,下图是2008R2的还原界面。

SQL server 2008R2还原数据库的向导界面没有配置时间线的地方。

在SQL server 2012的还原数据库向导中,多出了一个“文件”选项卡“,可以将数据库文件还原到新的位置,如图。

在SQL server 2008R2中,还原为是集中在”选项“界面中的,下图。

对比上图,我们可以看到在SQL server 2012的选项界面,多了一个结尾日志备份,也就是说在还原之前会做一遍结尾日志的备份操作,同时我们可以选择是否在还原时关闭所有到这个数据库的连接,如图。

关于尾部日志还原的实际应用,可以参考我的笔记:

=====================================================================

总结:整体来说还原向导有变化,大部分功能一样,但是增加了一些新功能。

转载地址:http://yixel.baihongyu.com/

你可能感兴趣的文章
Android技术提升
查看>>
bind, apply, call
查看>>
Servlet 3.0 异步处理详解
查看>>
动画机制总结
查看>>
长长的望远镜
查看>>
在给予react的ANTD中如何改变某些固定项?
查看>>
慕课网_《使用Google Guice实现依赖注入》学习总结
查看>>
Calendar工具类对跨年的星期的处理个人总结
查看>>
云计算和DevOps那点事
查看>>
什么是客户端负载均衡
查看>>
【mongoDB查询进阶】聚合管道(二) -- 阶段操作符
查看>>
2017-07-15 前端日报
查看>>
Android布局优化:ViewStub标签实现延迟加载(源码解析原理)
查看>>
Webpack快速入门
查看>>
HandlerThread与AsyncQueryHandler源码分析
查看>>
caffe原理之softmax函数
查看>>
数据分组统计
查看>>
记录fastclick中一次手动触发click事件失败
查看>>
云框架发布KONG API Gateway主题,开源求助攻~
查看>>
从一次报错聊聊 Point 事件
查看>>