SQLEXPRESS won't start up - getting errors 8313, 3409, 9003, 3417

  • Hi there,

    Enquired at MSDN, but no reply as yet.

    Got a problem. The company I work for currently runs a bespoke piece of software that uses a SQL Server 2005 Express Edition database. Unfortunately support of late from the developer (not in-house) has been very close to non-existent, and although I have experience with MySQL, SQL Server is pretty much a closed book to me.

    We have just recovered from a failed RAID 1 array rebuild. During the recovery, all the nVidia drivers were reinstalled, including the Ethernet adapter drivers. We had issues with the notorious ForceWare Netowrk Access Manager shoving its oar in, but we seem to have managed to get rid of it.

    The main issue that we now face is that the bespoke piece of software now refuses to work. Upon opening, I get the error "Run-time error '3709': The connection cannot be used to perform this operation. It is either closed or invalid in this context."

    In the ERRORLOG in the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG folder, I see the following:

    2009-03-06 13:16:18.96 Server Microsoft SQL Server 2005 - 9.00.3077.00 (Intel X86)

    Dec 17 2008 15:19:45

    Copyright (c) 1988-2005 Microsoft Corporation

    Express Edition on Windows NT 5.1 (Build 2600: Service Pack 3)

    2009-03-06 13:16:18.96 Server (c) 2005 Microsoft Corporation.

    2009-03-06 13:16:18.96 Server All rights reserved.

    2009-03-06 13:16:18.96 Server Server process ID is 2040.

    2009-03-06 13:16:18.96 Server Authentication mode is MIXED.

    2009-03-06 13:16:18.96 Server Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.

    2009-03-06 13:16:18.96 Server This instance of SQL Server last reported using a process ID of 2032 at 05/03/2009 07:34:02 (local) 05/03/2009 07:34:02 (UTC). This is an informational message only; no user action is required.

    2009-03-06 13:16:18.96 Server Registry startup parameters:

    2009-03-06 13:16:18.96 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

    2009-03-06 13:16:18.96 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

    2009-03-06 13:16:18.96 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

    2009-03-06 13:16:19.04 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

    2009-03-06 13:16:19.04 Server Detected 4 CPUs. This is an informational message; no user action is required.

    2009-03-06 13:16:19.25 Server Error: 8313, Severity: 16, State: 1.

    2009-03-06 13:16:19.25 Server Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    2009-03-06 13:16:19.25 Server Error: 3409, Severity: 16, State: 1.

    2009-03-06 13:16:19.25 Server Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    2009-03-06 13:16:19.71 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-03-06 13:16:19.71 Server Database mirroring has been enabled on this instance of SQL Server.

    2009-03-06 13:16:19.73 spid4s Starting up database 'master'.

    2009-03-06 13:16:19.78 spid4s Error: 9003, Severity: 20, State: 9.

    2009-03-06 13:16:19.78 spid4s The log scan number (268:480: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-03-06 13:16:19.78 spid4s 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.

    In the Event Viewer, I also note there is a warning: "The configuration of the AdminConnection\TCP protocol in the SQL instance SQLEXPRESS is not valid."

    I don't know what to do now. I've experimented with changing the IP Address under TCP in the SQL Server Network Configuration. Tried changing the port number in the AdminConnection setting in the registry. Tried changing the account for SQLEXPRESS to Local User. Tried altering the permissions on the folder. Checked that compression is not enabled on the folder. All to no avail. 🙁

    If anyone could shed any light on the matter, I'd be very grateful. I fancy we'll be moving away from this software in the not-too-distant future, but in the meantime it's a great inconvenience not to have it running.

    Thanks in advance!

  • Error: 9003, Severity: 20, State: 9.

    The log scan number (268:480: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.

    Your master database has been damaged. How, I can't tell.

    You have two options, you can restore the master database if you have a backup, or you can rebuild it.

    I'm not sure offhand how to rebuild master in SQL Express. It may be necessary to uninstall and reinstall Express.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for the reply. Would DBCC be any use in this situation? I've been trying to run CHECKDB but I can't seem to get past this message:

    HResult 0x2, Level 16, State 1

    Named Pipes Provider: Could not open a connection to SQL Server [2].

    Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..

    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

    I've followed this guide but no joy.

  • liam (3/6/2009)


    Thanks for the reply. Would DBCC be any use in this situation?

    No. Firstly SQL can't start up with a damaged master so there's no way to run checkdb. Second, that error is not repairable.

    Restore or rebuild master. Those are the only two things that can fix this

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (3/6/2009)


    Restore or rebuild master. Those are the only two things that can fix this

    OK, thanks. I'm now trying to rebuild the master with the following command, running from a command prompt, from a folder on my F:\ drive:

    setup.exe /qn INSTANCENAME=SQLExpress REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD= REINSTALLMODE=vomus

    No joy however. The Summary.txt file has this to say:

    Microsoft SQL Server 2005 9.00.4035.00

    ==============================

    OS Version : Microsoft Windows XP Professional Service Pack 3 (Build 2600)

    Time : Fri Mar 06 16:46:51 2009

    Machine : ***removed***

    Product : SQL Server Database Services

    Error : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."

    --------------------------------------------------------------------------------

    Machine : ***removed***

    Product : SQL Server Database Services

    Error : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."

    --------------------------------------------------------------------------------

    Machine : ***removed***

    Product : Microsoft SQL Server 2005 Express Edition

    Product Version : 9.3.4035.00

    Install : Failed

    Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0010_***removed***_SQL.log

    Last Action : InstallFinalize

    Error String : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."

    The error is (17058) .

    Error Number : 29503

    --------------------------------------------------------------------------------

    Machine : ***removed***

    Product : Microsoft SQL Server Setup Support Files (English)

    Product Version : 9.00.4035.00

    Install : Successful

    Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0010_***removed***_SQLSupport_1.log

    --------------------------------------------------------------------------------

    I'd be grateful if you have any further ideas!

    Thanks.

    Liam

    EDIT: I'm now getting "The error is (3417) . Error Number : 29503" instead of 17058. Looking at the modification dates of the files in the \Data folder, it's clear that the attempt to rebuild the databases isn't actually rebuilding them for some reason. Can't work out why. Could it be that it's failing to rebuild the databases, then attempting to connect, and therefore nothing's changed and it throws an error?

Viewing 5 posts - 1 through 4 (of 4 total)

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