In the command prompt, change the directory location of the server instance to the location where the SQL Server 2016 installation media.The steps that are followed for rebuilding are: Cut all the healthy system files, save them in a new folder, and delete corrupted master mastlog, tempdb, & templog files.Note: Keep in mind this location, as this is where the master database files will be rebuild automatically. Browse to the location where all the system files of a particular SQL Server instance are stored.Ĭ:\Program Files\Microsoft SQL Server\\MSSQL\DATA.Right click on the service and select Stop option for stopping all the services one by one.This will list all the services that are currently running. From the left pane, select SQL Server Services option.The files that need to be backed up are MSDB Data, MSDB Log, model & model Log In order to do so, follow the below mentioned steps:
Since, only the master database is corrupt, therefore, in order to ensure the authenticity of other system database files, it gets necessary to take their backup. The entire process, which we will discuss in this write up, will be divided into three sections for the convenience of the users. The following procedure will help you to rebuild master database in SQL Server. How to Rebuild Master Database in SQL Server?
It has been observed that many SQL Server administrators, in fact majority of them, backup their user databases regularly, but turn a blind eye to the system databases.