糖尿病康复,内容丰富有趣,生活中的好帮手!
糖尿病康复 > SQL Server 笔记分享-47:Database Recovery Advisor

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

时间:2020-06-16 15:39:00

相关推荐

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

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

简单来说,两大优势:

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

使用msdb中的备份历史纪录

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

TheDRA is new to SQL . 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 selectedthat belong to a single media set.(注解:如果要从备份设备还原,必须之前创建了备份设备并且将备份存放在备份设备中,关于如何创建备份设备,可参考我之前的笔记:http://543925535./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 msdbto 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 R2的还原数据库界面,下图是R2的还原界面。

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

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

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

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

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

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

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

如果觉得《SQL Server 笔记分享-47:Database Recovery Advisor》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。