A qualified DBA must have a technical review!

Source: Internet
Author: User
Tags mssqlserver

Restore the deleted master database in SQL2008
1. In the experiment environment, the dc is used, and the. COM password for the SQL2008.DC domain that is added to the domain is P @ ss0rd.

First, create a t1 table in the master database. We do not recommend that you create a table in the work environment. This is only for verification)
Back up the master database of sql2008 and delete the two files of the master database.
1. Rebuild the system database and mount the sql2008 CD.
Enter setup.exe/q/ACTION = REBUILDDATABASE/INSTANCENAME = mssqlserver/SQLSYSADMINACCOUNTS = a \ administrator/SAPWD = P @ ssw0rd
2. After the system database is rebuilt, The SQLServer service can be started, but the content of the original master database is lost, and backup and recovery of the master database is required.
3. After the SQLServer service is stopped, enter the single-user mode.
Enter
Cd "C: \ ProgramFiles \ MicrosoftSQLServer \ MSSQL10_50.MSSQLSERVER \ MSSQL \ Binn"
Enter the path
Sqlservr-c-m
4. Restore the MASTER database
On the SQL console, type RESTOREDATABASEmasterfromdisk = 'C: \ specific backup file name'

At this time, we can verify that the master database has table t1!

This article is from "perfect world !" Blog, please be sure to keep this source http://shyln.blog.51cto.com/6890594/1302928

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.