Friday, April 30, 2010

SQL Server Instance Does Not Start After Restoring Model System Database

Microsoft SQL Server holds a set of the system database that are required for options of Microsoft SQL Server instance. You should backup the system database after each critical update, to prevent database corruption. The system database backup must include model, master, and msdb. You can restore Microsoft SQL Server easily from backup, in the event of the system failure. However, in some situations, the SQL Server's MDF (Master Database File) file may become completely inaccessible after you restore a model system database from backup. It leads to critical data loss situations and requires SQL Database Recovery to work around the problem if backup is not updated.

In a practical scenario, you may not start an instance of SQL Server successfully, when you attempt to initialize any instance of MS SQL Server after restoring model system database using 'WITH NORECOVERY' option. Furthermore, you may come across the below error message in the application error log of Microsoft SQL Server at the same time:

“2003-04-18 09:37:38.85 spid5 Starting up database 'model'.
2003-04-18 09:37:39.24 spid5 Bypassing recovery for database 'model' because it is marked IN LOAD. 2003-04-18 09:37:39.65 spid5 Database 'model' cannot be opened. It is in the middle of a restore.”

This behavior of Microsoft SQL Server renders entire MDF database file inaccessible and serious data loss occurs. To retrieve data from affected database, you need to Repair SQL Server database file by fixing this problem.

Root of the problem

When the model system database is restored using 'WITH NORECOVERY' option, restore options leaves your SQL Server model database in unrecovered state. Thus, you can no longer use the model system database as expected. Due to the same, SQL Server may not function effectively.

Resolution

To sort out this behavior, clear 'Loading' status of model system database in instance of Microsoft SQL Server. In case the SQL Server database is severely damaged and model database is also affected, reinstall SQL Server application and restore database from updated backup.

If you do not have backup, use third-party MS SQL Recovery software to repair and restore the database into accessible and working state. The SQL Recovery applications use advanced scanning algorithms to systematically scan whole database and extract all inaccessible objects from it.

SQL Recovery is a powerful, yet easy to use and safe utility to ensure absolute recovery in all SQL Server database corruption scenarios. The software works well with Microsoft SQL Server 2008, 2005, and 2000. It restores all MDF file objects, such as tables, reports, forms, macros, constraints, stored procedures, and triggers.

No comments:

Post a Comment