Help solve sql 2017 express services fail to start

SQL SERVER 2017 EXPRESS SERVICES FAIL TO START. Error

I TRIED TO REPAIR BY RUNNING REPAIR WIZARD I GOT THIS ERROR

Overall summary:
  Final result:                  Failed: see details below
  Exit code (Decimal):           -2061893606
  Start time:                    2023-04-15 14:13:40
  End time:                      2023-04-15 14:21:26
  Requested action:              Repair

Setup completed with required actions for features.
Troubleshooting information for those features:
  Next step for SQLEngine:       Use the following information to resolve the error, and then try the setup process again.


Machine Properties:
  Machine name:                  SERVER-PC
  Machine processor count:       4
  OS version:                    Microsoft Windows 10 Pro (10.0.19044)
  OS service pack:               
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x64
  Process architecture:          64 Bit
  OS clustered:                  No

Product features discovered:
  Product              Instance             Instance ID                    Feature                                  Language             Edition              Version         Clustered  Configured
  SQL Server 2017      SQLEXPRESS           MSSQL14.SQLEXPRESS             Database Engine Services                 1033                 Express Edition      14.0.1000.169   No         Yes       

Package properties:
  Description:                   Microsoft SQL Server 2017 
  ProductName:                   SQL Server 2017
  Type:                          RTM
  Version:                       14
  SPLevel:                       0
  Installation location:         C:\Users\SERVER\Downloads\SQLEXPR_x64_ENU\x64\setup\
  Installation edition:          Express

User Input Settings:
  ACTION:                        Repair
  AGTDOMAINGROUP:                <empty>
  AGTSVCACCOUNT:                 NT AUTHORITY\NETWORKSERVICE
  AGTSVCPASSWORD:                <empty>
  AGTSVCSTARTUPTYPE:             Disabled
  ASCONFIGDIR:                   Config
  ASSVCACCOUNT:                  <empty>
  ASSVCPASSWORD:                 <empty>
  ASTELSVCACCT:                  <empty>
  ASTELSVCPASSWORD:              <empty>
  ASTELSVCSTARTUPTYPE:           0
  CLTSTARTUPTYPE:                0
  CLTSVCACCOUNT:                 <empty>
  CLTSVCPASSWORD:                <empty>
  CONFIGURATIONFILE:             
  CTLRSTARTUPTYPE:               0
  CTLRSVCACCOUNT:                <empty>
  CTLRSVCPASSWORD:               <empty>
  ENU:                           true
  EXTSVCACCOUNT:                 <empty>
  EXTSVCPASSWORD:                <empty>
  FAILOVERCLUSTERGROUP:          <empty>
  FAILOVERCLUSTERNETWORKNAME:    <empty>
  FTSVCACCOUNT:                  <empty>
  FTSVCPASSWORD:                 <empty>
  HELP:                          false
  IACCEPTPYTHONLICENSETERMS:     false
  IACCEPTROPENLICENSETERMS:      false
  INDICATEPROGRESS:              false
  INSTANCENAME:                  SQLEXPRESS
  ISMASTERSVCACCOUNT:            NT AUTHORITY\Network Service
  ISMASTERSVCPASSWORD:           <empty>
  ISMASTERSVCPORT:               8391
  ISMASTERSVCSSLCERTCN:          <empty>
  ISMASTERSVCSTARTUPTYPE:        Automatic
  ISMASTERSVCTHUMBPRINT:         <empty>
  ISSVCACCOUNT:                  NT AUTHORITY\Network Service
  ISSVCPASSWORD:                 <empty>
  ISSVCSTARTUPTYPE:              Automatic
  ISTELSVCACCT:                  <empty>
  ISTELSVCPASSWORD:              <empty>
  ISTELSVCSTARTUPTYPE:           0
  ISWORKERSVCACCOUNT:            NT AUTHORITY\Network Service
  ISWORKERSVCCERT:               <empty>
  ISWORKERSVCMASTER:             <empty>
  ISWORKERSVCPASSWORD:           <empty>
  ISWORKERSVCSTARTUPTYPE:        Automatic
  MRCACHEDIRECTORY:              
  QUIET:                         false
  QUIETSIMPLE:                   false
  SQLSVCACCOUNT:                 NT Service\MSSQL$SQLEXPRESS
  SQLSVCPASSWORD:                <empty>
  SQLTELSVCACCT:                 NT Service\SQLTELEMETRY$SQLEXPRESS
  SQLTELSVCPASSWORD:             <empty>
  SQLTELSVCSTARTUPTYPE:          Automatic
  SUPPRESSPRIVACYSTATEMENTNOTICE: false
  UIMODE:                        AutoAdvance
  X86:                           false

  Configuration file:            C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20230415_141339\ConfigurationFile.ini

Detailed results:
  Feature:                       Database Engine Services
  Status:                        Failed
  Reason for failure:            An error occurred during the setup process of the feature.
  Next Step:                     Use the following information to resolve the error, and then try the setup process again.
  Component name:                SQL Server Database Engine Services Instance Features
  Component error code:          0x851A001A
  Error description:             Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
  Error help link:               https://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.1000.169&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026

  Feature:                       SQL Browser
  Status:                        Passed

  Feature:                       SQL Writer
  Status:                        Passed

  Feature:                       SQL Client Connectivity
  Status:                        Passed

  Feature:                       SQL Client Connectivity SDK
  Status:                        Passed

  Feature:                       Setup Support Files
  Status:                        Passed

Rules with failures:

Global rules:

There are no scenario-specific rules.

Rules report file:               C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log\20230415_141339\SystemConfigurationCheck_Report.htm

The following warnings were encountered while configuring settings on your SQL Server.  These resources / settings were missing or invalid so default values were used in recreating the missing resources.  Please review to make sure they don’t require further customization for your applications:

Service SID support has been enabled on the service.
Service SID support has been enabled on the service.

The following resources could not be configured during repair without additional user input.  Review the warnings to understand your next steps:

The service failed to start for an unknown reason. For more information, see the event logs and the SQL Server error logs.

I CAN’T LOGIN USING SSMS TOO. I GOT THIS ERROR .

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

Cannot connect to SERVER-PC\SQLEXPRESS.

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

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

------------------------------
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver--1-database-engine-error

------------------------------
Error Number: -1
Severity: 20
State: 0


------------------------------
Program Location:

   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
   at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

This error seems to be caused by a partition with a sector size greater thank 4KB (4096B) but mostly with Windows 11 and it appears you’re using 10. So I’m not sure if it’s the same.

In an command prompt running with admin permissions, execute the following command:

fsutil fsinfo ntfsinfo c:

Where c: is the drive to which you’re installing.

Look for this line:
image

If that value is greater than 4096, please see this MS doc:

1 Like

byte per claster

Well, shoot.

Uninstall then try install again. If it fails, open the event viewer and look in windows logs → application or setup and see if there are any entries. If so, copy the errors here and we’ll go from there.

Also, do you have any other instance installed? Maybe ones that share an instance name, perhaps?

Take a look in services after you uninstall and see if you see any remnants like this:
image

1 Like

If I uninstall, can I still get my data when I install new one? The business has been existing.

Yes. Data files should be found at %PROGRAMFILES%\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA. Worse case scenario, you have to manually attach the databases. If installing a later version (2019. 2022) moving the files may be needed.

But I want to hold right here for a moment.

With there being existing databases on this computer, was SQL Server running in the past and then suddenly stopped?
Were you upgrading an instance?
What was being done on the computer prior to SQL Server stopping working?

2 Likes

The client called and I saw this

Uninstalled.

Re-Installation was successful.

How do I attach data.?

you load a backup of their database

1 Like

Sorry for the late reply: power was out most of the day yesterday.

As Jesse suggested, restoring a backup would be the easiest, unless there is a naming conflict because the database files already exist.

See this link (the section "Attach database with log file):

3 Likes