Get the App
SLTechnology News&Howtos  ›  Database  › 

How to restore master Database by Reconstruction in SQL Server

Shulou Source: shulou.com Published: 2022-05-31 19:33:39 11月15日 Update

In this issue, Xiaobian will bring you about how to restore the master database through reconstruction in SQL Server. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.

specific contents are as follows

1. Backup master database

2. Stop the service and delete the master data file directly.

3, rebuild the master data file with the installer

Go to the installation directory under the console and don't say it

D:\SetUp\sqlserver2012>Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=sqlserver2012 /SQLSYSADMINACCOUNTS=UserName /SAPWD= ***

4. Start SQL Server service in single-user mode and restore backup files

Single user mode startup: net start mssql$sqlserver2012 /m

sqlcmd connection: sqlcmd -S "ServerName\InstanceName"

If the master file itself is not damaged and there is a backup of the master, just restore the master in step 4.

5. Restart the database service, and then you can access it normally

The above is how to restore the master database through reconstruction in SQL Server shared by everyone. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.

Tags: Data database file method content backup service mode single user analysis professional small and medium rich in content that is articles more steps directories knowledge programs Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft NVidia Apple Shulou Tech Info Linux