
In this post, let’s try to rebuild our entire SQL Server/Master Database. Once rebuild process is complete, You’ve to Restore all the User Databases from your Backups and Restore Master and Master Databases in case if you want to get back all your Logins, Jobs, Server objects etc….Yes! I agree that sounds like a very painful process….But if you’ve all your recent healthy backups and few other dependent objects…you are the champion:) So.if you don’t have a proper Backup/Restore Strategy in place…you are gone!!.You might even loose your Job for this single most important valid reason. There’s no single valid/good reason to do so…

You should never ever do this in a real environment. Note: On My laptop I Installed every thing Just on C Drive. My actual System Databases are located in DATA folder as shown below I repeat, these are Just templates which SQL Server will create behind the scenes during Installation Process.

These are not the actual system database files…. Let me show you what I’m talking about….You can see the templates folder which SQL Server created while initial Installation of this Instance on my machine. (This is the one of the main Reasons,you should place your SQL Binaries and actual System Databases on completely separate Physical Drives. Starting SQL Server 2008 it’ll rebuild based upon the TEMPLATES which it creates in your BINN Directory. Those days are gone.That was the case with SQL Server 2005 and earlier. There’s a misconception that we need the Actual SQL Server media and it’s mandatory to rebuild your Master. Rebuilding Master will actually create brand new System databases from scratch as if you just Installed your SQL Server. Have you ever been in a situation where you lost the complete Drive where your System Databases are residing and even SAN Admins were not able to bring the Drive back? Fortunately I’ve never been in that situation:) What would be our available options if that disaster strikes? In this scenario restoring System Databases won’t work because SQL Server Service itself is completely down and your System Databases mdf and ldf files are gone!!.So what should we do? REBUILD YOUR MASTER.
