SQL Server 2012笔记分享-47:Database Recovery Advisor

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

   

简单来说,两大优势:

  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.”

截图10

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. (注解:这里可以指定将数据库还原到哪个时间点,我们双击下图中时间轴上的数据库备份的图例,就可以准备定位到对应的时间点)

   

截图04

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还原数据库的向导界面没有配置时间线的地方。

截图07

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

截图12

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

截图09

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

关于尾部日志还原的实际应用,可以参考我的笔记:http://543925535.blog.51cto.com/639838/1427218

截图11

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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值