Sunday, February 21, 2010

How to Fix Master Database Corruption in MS SQL Server

In Microsoft SQL Server, all the system-level data/information are stored in a Master database. It includes the instance-wide meta data like logon accounts, linked servers, system configuration settings, and endpoints. Furthermore, master database records the creation of other database and location of the database files and initialization information for MS SQL Server. Thus, Microsoft SQL Server can't start if master database is missing, damaged, or unavailable. Corruption of the master database leads to critical data loss situations and requires SQL Recovery.

Microsoft SQL Server facilitate checking the integrity, both logical and physical, of all objects in specified database through DBCC CHECKDB. It includes three modules- DBCC CHECKALLOC, DBCC CHECKTABLE, and DBCC CHECKCATALOG, which are used to perform specific operations. If you run DBCC CHECKDB on any database, you need not run any of its modules on the affected SQL Server database. It also validates contents of indexed view, link-level consistency among file system files/directories and table meta data, and Service Broker data in SQL database.

However, the DBCC CHECKDB can not handle database corruption in all cases and thus your master database may remain inaccessible in those cases. The problem generally occurs in case of severe corruption to the database.

Read more: .NET Journal

Posted via email from jasper22's posterous