Monday, October 13, 2008

Rebuilding the master DB for SQL Server 2005

I was starting the SQL Server 2005 instance. The service failed to start.

I checked the event log and found the following error:

Error 2(The system cannot find the file specified.) occurred while opening file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.

I went to that folder and sure enough, the master database does not exist. So how do you build one? It appears that you have to change the installation in order to do that.

Control Panel --> Add/Remove Programs --> Microsoft SQL Server 2005.

Click on Change. You should get a Microsoft SQL Server 2005 Maintenance dialogue.

First: Component Selection --> Select the troubled instance.

Next.

Second: Feature Maintenance --> I selected Database Engine.

Next. That should start a Microsoft SQL Server 2005 Setup Dialogue.

No comments: