master db consistency errors

  • Please help -- I need options asap... 

    CHECKDB found 0 allocation errors and 3 consistency errors in database 'master'.

    repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (master ).

    Can this be done on the fly in production without impacting anything? 

  • No, you master database has significant corruption and "allow data loss" could mean such things as logins, security rights or user databases "disappearing".

    First, make a backup of the master database.

    Second, Run DBCC CHECKDB( 'master', REPAIR_ALLOW_DATA_LOSS)

    Finally, see if everything is still working.

    If not, hopefully, you have a backup of the master database that can be restored.

    First restore the backup under a different database name and then run checkdb.

    If errors are reported from the restored database, you may need to reverse engineer out the logins, detach all of the user database, rebuild master, re add logins, attach user databases and hope all this works.

    See "HOW TO: Transfer Logins and Passwords Between Instances of SQL Server" and use the stored procedures sp_hexadecimal and sp_help_revlogin. They are at http://support.microsoft.com/default.aspx?scid=kb;EN-US;246133

    Finally, try to determine the cause of the corruption, which is usually the disk drives, controller or disk drivers. Look in the System Event log for any alerts.

    SQL = Scarcely Qualifies as a Language

  • What about a repair index -- can this be done on the fly for the master db?

    info from checkdb (master):

    Server: Msg 2534, Level 16, State 1, Line 1

    Table error: Page (1:1028) with object ID 6, index ID 0 in its header is allocated by another object.

    Server: Msg 8979, Level 16, State 1, Line 1

    Table error: Object ID 6, index ID 1. Page (1:1028) is missing references from parent (unknown) and previous (page (1:1174)) nodes. Possible bad root entry in sysindexes.

    Server: Msg 2533, Level 16, State 1, Line 1

    Table error: Page (1:1028) allocated to object ID 94, index ID 0 was not seen.  Page may be invalid or have incorrect object ID information in its header.

    There are 2243 rows in 1155 pages for object 'syscomments'.

    CHECKDB found 0 allocation errors and 2 consistency errors in table 'syscomments' (object ID 6).

    There are 67 rows in 12 pages for object 'sysaltfiles'.

    CHECKDB found 0 allocation errors and 1 consistency errors in table 'sysaltfiles' (object ID 94).

  • You could try, but then run checkdb again.

    SQL = Scarcely Qualifies as a Language

  • How?  DBCC DBREINDEX is not supported for use on system tables.

  • Sorry, you are correct but there are workarounds.

    See "How can I fix a corruption in a system table? " at http://www.windowsitpro.com/Articles/Index.cfm?ArticleID=14051&DisplayTab=Article

    As the stored procedure sp_fixindex will check to confirm that the database is in single user mode and for master, this means that SQL Server must be running in single user mode, add the "-m" without the double quotes as a start-up parameter and then restart SQL Server.

    SQL = Scarcely Qualifies as a Language

  • Thank you.  Unable to put the db in single-user mode now; I have to try it this weekend.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply