none
MSSQLSERVER won't start event 9003 logged master corrupt

    Question

  • Hi,

    I am running SBS2003 R2 as a test server - no backup and I know I should have. Following Patch Tuesday this week the server was stuck in "Server is shutting down" process. I left this for 24 hours or so but eventually had to hit the reset button due to performance issues.

    Since this reboot SQLServer fails to start. EventID 9003 is logged which points to a corrupt master db. I have googled and found sites stating to use DBCC but as the service wont start I can not connect to it to run DBCC.

    eventvwr events
    Event Type: Error
    Event Source: MSSQLSERVER
    Event Category: (2)
    Event ID: 9003
    Date:  27/11/2009
    Time:  11:25:32
    User:  N/A
    Computer: SBS2K3R2
    Description:
    The log scan number (225:112:1) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 2b 23 00 00 14 00 00 00   +#......
    0008: 09 00 00 00 53 00 42 00   ....S.B.
    0010: 53 00 32 00 4b 00 33 00   S.2.K.3.
    0018: 52 00 32 00 00 00 00 00   R.2.....
    0020: 00 00                     ..     


    Event Type: Information
    Event Source: MSSQLSERVER
    Event Category: (2)
    Event ID: 3417
    Date:  27/11/2009
    Time:  11:25:33
    User:  N/A
    Computer: SBS2K3R2
    Description:
    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.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 59 0d 00 00 0a 00 00 00   Y.......
    0008: 09 00 00 00 53 00 42 00   ....S.B.
    0010: 53 00 32 00 4b 00 33 00   S.2.K.3.
    0018: 52 00 32 00 00 00 00 00   R.2.....
    0020: 00 00                     ..     

     

    ERRORLOG
    2009-11-27 11:25:28.20 Server      Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)
     Nov 24 2008 13:01:59
     Copyright (c) 1988-2005 Microsoft Corporation
     Workgroup Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

    2009-11-27 11:25:28.24 Server      (c) 2005 Microsoft Corporation.
    2009-11-27 11:25:28.24 Server      All rights reserved.
    2009-11-27 11:25:28.24 Server      Server process ID is 3300.
    2009-11-27 11:25:28.24 Server      Authentication mode is MIXED.
    2009-11-27 11:25:28.25 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG'.
    2009-11-27 11:25:28.25 Server      This instance of SQL Server last reported using a process ID of 6440 at 27/11/2009 10:52:37 (local) 27/11/2009 10:52:37 (UTC). This is an informational message only; no user action is required.
    2009-11-27 11:25:28.34 Server      Registry startup parameters:
    2009-11-27 11:25:28.36 Server        -d C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\master.mdf
    2009-11-27 11:25:28.36 Server        -e C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG
    2009-11-27 11:25:28.36 Server        -l C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\mastlog.ldf
    2009-11-27 11:25:28.45 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2009-11-27 11:25:28.45 Server      Detected 2 CPUs. This is an informational message; no user action is required.
    2009-11-27 11:25:29.34 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2009-11-27 11:25:30.52 Server      Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
    2009-11-27 11:25:32.41 Server      Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
    2009-11-27 11:25:32.50 Server      Database mirroring has been enabled on this instance of SQL Server.
    2009-11-27 11:25:32.66 spid5s      Starting up database 'master'.
    2009-11-27 11:25:32.94 spid5s      Error: 9003, Severity: 20, State: 1.
    2009-11-27 11:25:32.94 spid5s      The log scan number (225:112:1) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
    2009-11-27 11:25:33.01 spid5s      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.


    Thanks in advance

    Cheers

    Nigel

    Friday, November 27, 2009 11:47 AM

All replies

  • Hello,

    First run, run a diagnostic tool and correct any problems on your storage.

    Second, rebuild the master database:

    http://msdn.microsoft.com/en-us/library/aa213831(SQL.80).aspx

    http://msdn.microsoft.com/en-us/library/aa197950(SQL.80).aspx

    Finally, try to restore your master database from backup.:

    Hope this helps.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Friday, November 27, 2009 12:07 PM
    Moderator
  • Try:

    start /wait <CD or DVD Drive>\setup.exe /qn INSTANCENAME=<InstanceName> REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=<NewStrongPassword>

    If you are using a default instance, the INSTANCENAME should be "MSSQLSERVER" without the quotes.

    Hope this helps,
    Sean
    Friday, November 27, 2009 12:11 PM
    Answerer
  • Alberto,

    I can't start SQLServer in single user mode. I get

    C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn>sqlservr.exe -m
    2009-11-27 12:59:10.74 Server      Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)
            Nov 24 2008 13:01:59
            Copyright (c) 1988-2005 Microsoft Corporation
            Workgroup Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

    2009-11-27 12:59:10.99 Server      (c) 2005 Microsoft Corporation.
    2009-11-27 12:59:11.04 Server      All rights reserved.
    2009-11-27 12:59:11.08 Server      Server process ID is 7152.
    2009-11-27 12:59:11.12 Server      Authentication mode is MIXED.
    2009-11-27 12:59:11.17 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG
    \ERRORLOG'.
    2009-11-27 12:59:11.25 Server      This instance of SQL Server last reported using a process ID of 3300 at 27/11/2009 11:25:33
    (local) 27/11/2009 11:25:33 (UTC). This is an informational message only; no user action is required.
    2009-11-27 12:59:11.35 Server      Registry startup parameters:
    2009-11-27 12:59:11.41 Server            -d C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\master.mdf
    2009-11-27 12:59:11.45 Server            -e C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG
    2009-11-27 12:59:11.49 Server            -l C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\mastlog.ldf
    2009-11-27 12:59:11.52 Server      Command Line Startup Parameters:
    2009-11-27 12:59:11.56 Server            -m
    2009-11-27 12:59:11.76 Server      SQL Server is starting at normal priority base (=7). This is an informational message only.
    No user action is required.
    2009-11-27 12:59:11.84 Server      Detected 2 CPUs. This is an informational message; no user action is required.
    2009-11-27 12:59:12.28 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner b
    locks per node.  This is an informational message only.  No user action is required.
    2009-11-27 12:59:13.04 Server      Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an
    informational message only. No user action is required.
    2009-11-27 12:59:17.57 Server      Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Tran
    saction Coordinator (MS DTC). This is an informational message only. No user action is required.
    2009-11-27 12:59:17.71 Server      Database Mirroring Transport is disabled in the endpoint configuration.
    2009-11-27 12:59:17.79 spid5s      Warning ******************
    2009-11-27 12:59:17.83 spid5s      SQL Server started in single-user mode. This an informational message only. No user action i
    s required.
    2009-11-27 12:59:17.98 spid5s      Starting up database 'master'.
    2009-11-27 12:59:18.27 spid5s      Error: 9003, Severity: 20, State: 1.
    2009-11-27 12:59:18.27 spid5s      The log scan number (225:112:1) passed to log scan in database 'master' is not valid. This e
    rror may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred durin
    g replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
    2009-11-27 12:59:18.47 spid5s      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.

    C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Binn>

    Cheers

    Nigel

    Friday, November 27, 2009 1:01 PM
  • Hi,

    I am running SBS2003 R2 as a test server - no backup and I know I should have.

    Nigel


    Nigel,

    If the methods suggested by Alberto will not help, since this is a test server, how about just reinstalling SQL Server after hardware check?

    Kalman Toth SQL SERVER 2012 & BI TRAINING
    New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012


    • Edited by Kalman Toth Wednesday, October 03, 2012 5:19 AM
    Friday, November 27, 2009 1:07 PM
  • Sean,

    I am actually running SBS2003R2 and on the DVD there are 25 different Setup.exe on there. Presumably I should use one from the sql2005 folders listed below and presumably one of the larger ones.


     Directory of d:\PREMTECH\SQL2005\SERVERS 14/10/2005  10:51         2,068,184 SETUP.EXE
                   1 File(s)      2,068,184 bytes

     Directory of d:\PREMTECH\SQL2005\SERVERS\SETUP 14/10/2005  10:32           419,032 SETUP.EXE
                   1 File(s)        419,032 bytes

     Directory of d:\PREMTECH\SQL2005\TOOLS 14/10/2005  10:51         2,068,184 SETUP.EXE
                   1 File(s)      2,068,184 bytes

     Directory of d:\PREMTECH\SQL2005\TOOLS\SETUP 14/10/2005  10:32           419,032 SETUP.EXE
                   1 File(s)        419,032 bytes

    Cheers

    Nigel

     

    Friday, November 27, 2009 1:13 PM
  • Hello Nigel,

    I think Kalman is right.

    Please choose the first folder.

    d:\PREMTECH\SQL2005\SERVERS

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Friday, November 27, 2009 1:49 PM
    Moderator
  • Kalman,

    As this is an SBS2003R2 box would you know if I need to uninstall and then install SQLServer?

    Also would you know if there would be any issues if any Service Packs have been installed since the original install from the DVD?

    There are 3 other SQL Server instances that I can connect to on this box and they all have a 'play' button in a green circle - msfw, sbsmonitoring and sharepoint. WSUS has a plain white circle but default/mssqlserver has 'stop' icon.

    If other instances are running do I need to uninstall/install SQL Server?

    Cheers

    Nigel
    Friday, November 27, 2009 1:51 PM
  • Nigel,

    I'm not sure which of the top two it would be.

    As SQLUSA pointed it, it might be a better option to get things back up and running by installing a new instance.

    -Sean
    Friday, November 27, 2009 1:55 PM
    Answerer
  • Kalman,


    If other instances are running do I need to uninstall/install SQL Server?

    Cheers

    Nigel
    Nigel,

    I am afraid I can only assist with straight SQL Server.

    The likelyhood is high that you need a clean reinstall of all SQL Server instances on the same physical server. In the damaged instance copy over the database files (.mdf, .ndf, .ldf) to an archive folder. In the other instances, backup the databases prior to reinstall. You can also detach them. After install you should apply the latest service pack.

    I suggest you open a thread on an SBS forum also.

    Kalman Toth, SQL Server & BI Training, SSAS, SSIS, SSRS; http://www.SQLUSA.com
    • Edited by Kalman Toth Friday, November 27, 2009 2:16 PM
    Friday, November 27, 2009 2:01 PM
  • Hello Nigel,

    The following article may help you:

    http://support.microsoft.com/?kbid=924000


    Regards,


    Alberto Morillo
    Friday, November 27, 2009 2:10 PM
    Moderator