![]() 16:00:51.61 spid9s Starting up database ‘mssqlsystemresource’. Notice the path and filename which I highlighted below. Well, you might have guessed it, we won’t be able to start SQL. Let’s see what would happen if I just move the files and start SQL Server. When SQL was packaged, we didn’t know you are going to use F drive (or any other drive) to keep system databases so the path is from a machine where SQL product was packaged. If we rebuild the system databases, setup would move the files from above location to the proper location and (this is important) it modifies the path of other databases which is stored in master database. Setup does few more things other than copy paste. Now, you may ask, what would happen if I just copy those files from Templates to data folder? I’ll explain then in a bit. So the logic in rebuilding the system databases is to get these files and copy them into your DATA directory to obtain your new system databases. You can easily locate similar folder for SQL 2008 or R2 as well.Ĭ:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn\Templates The path of setup.exe for SQL 2012 is “C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\SQLServer2012”. ![]() In this directory you will find master, model, and msdb database and log files that were copied from your installation source as part of setup. During installation of SQL, setup does the caching of setup.exe (and other files needed for setup) and also the MDF and LDF file in Template folder. In SQL 2008 onwards, we don’t need DVD or media to rebuild system databases. In earlier version of SQL (20) if there is a need to rebuild system databases, we need to get the installation media (DVD or network share). Let’s first understand why we keep those file in that location. So, thought of writing a blog post (for better search because Facebook comments are not shown as result by search engines) I have explained that why above will not work but there is so much a write about it. One of the community member mentioned that we can take the master database files from below locationĬ:\Program Files\Microsoft SQL Server\\MSSQL\ Binn\TemplatesĪnd keep them to the current location of master. In my recent conversation on SQL Bangalore User Group page, I had interesting discussion about rebuilding system database in SQL Server 2008.
0 Comments
Leave a Reply. |