Saturday 6 March 2010

Event ID : 3417 "Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.


Popular SQL Grim -  How to get around with it:

After a long when when I tried to run Share Point on my laptop - rather me seeing the central administration screen it served me with this message 'Cannot connect to the configuration database.' damn...

This clearly shows something is wrong with the database so off-course the first step to troubleshoot was checking the database. When I tried to run sql management studio it was telling me its own bleak story. Anyway got around with management studio by de-installation.

I also noticed the sql service was not running in services. When I tried to start the service it shown me the sql popular grim i.e. 3417 error. This error has to deal with the master database. Somehow (don't know the source but I've been messing around with the web installer) the master database was corrupted hence the service could not get started.

I found so many people ran into this issue and suggesting rebuilding the master database and restoration of other dbs. So I backed up all the database files (including the log files) and replaced the master data base with the one in 'Template Data' parallel with 'data' folder. 

After doing this when I started the sql sevice it got started without any prompt, Fantastic !

I restored the other databases including sharepoint ones which filled the remaining holes...

Conclusions:

To fix this error follow these steps

  1. Backup all your database files including the log files into backup directory or somewhere else where there's enough free disk space.
  2. Replace the master database file with the one in the 'template data' folder parallel to 'data' folder
  3. Start the sql services
  4. Go to 'Sql Server 2005 Surface Area' and click 'Add New Administrator'. In 'Available Privileges section' add the  'Member of SQL Server sysadmin role...' into 'Privileges that will be granted to section...'  and click ok. This action will allow the administrators to logon to sql database using windows authentication.
  5. Restore all SQL accounts (this is hard part, but this will restore the permissions while attaching the databases so you don't have to reset the security for individual dbs).
  6. Restore all backed up databases by using the attach option in management studio.

Hope this will help !


Majid







1 comment:

Alex said...

repair mdf can repair mdf files after various issues such as power failures, viruses. It works with big .mdf on all Windows OS. The application can view restored .mdf files from any version of SQL Server.

Iconise ‘Add Picture’ control in PowerApps

Default look you get for ‘Add Picture’ control is not very appealing for end user and there is no OTB way of specifying icon for this con...