SQL Server 2012 notes Sharing-51: Understanding System Database Recovery

Source: Internet
Author: User

is an important table detailing the backup requirements of the system database, the recovery model supported, and the options for restore.

master database: requires backup and needs to be restored in single-user mode

model database: need to be backed up, the way to recover the database is T3608 trace flag

msdb database: requires backup, restore Mode is simple by default, restore database in the same way as normal database, no special requirements

tempdb database: No backup is required because tempdb rebuilds when the instance is started;

650) this.width=650; "title=" clipboard "style=" Border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clipboard "Src=" Http://img1.51cto.com/attachment/201407/6/639838_1404611811LEkN.png "height=" 395 "/>


The detailed steps can be consulted

Http://msdn.microsoft.com/zh-cn/library/dd207003.aspx

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

The following is a description of the functions of each system database

Recovering System Databases

Master

The master database holds all system level configurations. SQL Server cannot start up normally without the Master database. Restoring/rebuilding the master database take a set of special procedures which would be discussed in upcoming slides.

Model

The model database is used as the template for all databases this is created on the instance of SQL Server. If the model database is corrupt or missing, the instance of SQL Server cannot start. Therefore A restore cannot be issued unless special steps is first taken. In case of a corrupt model database The instance must is started with the-t3608 trace flag. T3608 is used to only startup the master database. Then the model database can be restored using a normal RESTORE statement.

Msdb

The MSDB database is used by SQL Server Agent for scheduling alerts and jobs, and for recording operators. MSDB also contains history tables such as the backup and restore history tables. in case of a corrupt msdb, SQL Agent is not being working. From a-a restore perspective, MSDB is just the like any and the user database and can be restored as such.

Resource DB

The Resource database is a read-only database, contains copies of all system objects, ship with Microsoft SQL Serv ER 2012. No backup can be done for the this database, as it is hidden. In case of an corruption of the database it can restored using a file restore or through running the setup of SQL S Erver.

Tempdb

Tempdb is a workspace for holding temporary or intermediate result sets. This database is re-created every time a instance of SQL Server is started. When the server instance are shut down, any data in tempdb is deleted permanently. A Backup cannot be-done and was unnecessary on tempdb as it's recreated with every restart of the instance. A Restart of the instance is can recover tempdb in most corruption cases.

Reference:

Considerations for backing up and Restoring System Databases:

http://go.microsoft.com/fwlink/?LinkID=233398

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

This article from "Zeng Hung Xin Technical column" blog, declined to reprint!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.