Windows could not start the sql server on local computer

You will fail to connect to your database if the SQL Server service is not running. If you try running the SQL Server service from the Services.msc app, you will encounter an error that says Windows could not start the SQL Server on Local Computer. Let us see how to fix the issue.

Windows could not start the SQL server on the local computer

Windows could not start the SQL Server (<DB-NAME>) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417.

AND

Windows could not start the SQL Server Reporting Services service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion.

If Windows could not start the SQL server on the local computer, you can follow the solutions mentioned below.

  1. Change the Log on type
  2. Check Server Dependencies
  3. Create SevicesPipeTimeout registry entry
  4. Configure the computer to not retrieve trusted and untrusted CTLs

1] Change the Log on type

First, change the log-on type to make sure that you are logging in using the Local System Account. Many users have been able to resolve the issue by switching to a local system account, hopefully, that will do the job for you. Follow the steps mentioned below.

  1. Open Run by Win + R, type “Services.msc”, and click Ok.
  2. Now, look for SQL Server, right-click on it, and select Properties.
  3. Go to the Log on tab, and set Log on as Local System Account.
  4. Click on Apply > OK.

Finally, check if the server starts. If the services start, try connecting to your database. Hopefully, you will be able to connect without any issues, but if that doesn’t work, you need to restart the service (right-click on the service and select Restart) and then connect to the database.

2] Check Service Dependencies

Checking Service Dependencies is an important step because SQL Server might rely on other services to function correctly. SQL Server won’t start if these dependent services aren’t running. Follow the steps given below.

  • Open Run by Win + R, type Services.msc, and click on Ok.
  • Now, look for the SQL Server (instance name or db name) service, right-click on it, and click on Properties from the context menu.
  • Go to the Dependencies tab to see all the services upon which your SQL Server service depends. These could include services like:
    • Windows Management Instrumentation (WMI)
    • Remote Procedure Call (RPC)
    • SQL Server Browser (if using named instances)
  • Now, return to the Services screen, and ensure all the services are running. If not, manually start them by right-clicking on the service and selecting Start.

Once you have started all the services, start the SQL Service again and see if it starts. If it has already started, restart the service and try connecting to the database.

3] Create SevicesPipeTimeout registry entry

The ServicesPipeTimeout Registry entry in Windows is used to specify the amount of time (in milliseconds) that the Service Control Manager (SCM) will wait for a service to start before it times out. This is particularly useful for services that require more time to start due to various reasons, such as heavy load or dependencies on other services. You may encounter error 1053 related to SQL Server Reporting Service due to the fact that service timeout is not set, we can set it, and resolve the issue.

  • First of all, create a backup of registry.
  • Now, open the Registry Editor and navigate to the following location.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
  • Right-click on the Control folder, and select New > DWORD (32-bit) Value.
  • Name it ServicesPipeTimeout.
  • Double-click on ServicesPipeTimeout, 180000, and click on.

Finally, reboot your computer, and start the service and see.

4] Configure the computer to not retrieve trusted and untrusted CTLs

SQL Server Reporting Services might not start if it can’t access certificate lists from Windows Update. This can happen if the system isn’t connected to the Internet or if a firewall blocks Windows Update. The service takes too long to get the certificate lists, so it times out. If it takes more than 30 seconds to start, Windows stops the service. In the previous solution, we increased the time for service timeout, in this, we will configure the network. Try the following workaround.

If you have Group Policy Editor, open it, go to the following setting:

Computer Configuration > Policies > Windows Settings > Security Settings > Public Key Policies > Certificate Path Validation Settings

Select the Network Retrievaltab, tick Define these policy settings check box, and clear the Automatically update certificates in the Microsoft Root Certificate Program (recommended) checkbox. Finally, click on OK.

As for Windows Home users, open the Registry Editor, go to HKLM\Software\Policies\Microsoft\SystemCertificatesright-click on AuthRoot, select New, and then click on DWORD.

Type DisableRootAutoUpdate and press Enter. Right-click on DisableRootAutoUpdate, select Modify, and in the Value data box, type ‘1‘, then click OK. Finally, click Exit from the File menu.

Hopefully, you will be able to resolve the issue using the solutions mentioned in this post.

Read: How to install MongoDB on Windows 11?

How do I start Local SQL Server on Windows?

To start the Local SQL Server on your computer, open the Services app by searching it out of the Start Menu. Now, search for SQL Server, right-click on it, select Properties, set the Startup type to Automatic, and click on Start. The service might take a little time to start.

Read: How to install SQL Developer in Windows 11

Can I run a SQL Server on a Local computer?

Yes, you can install SQL Server on your computer and then access it using the SQL Server Management Sudio. We recommend you check our post on how to install and configure SQL Server Management Studio to know more.

Read: Install Oracle Database on Windows 11.

SQL Server error 3417

Microsoft SQL Server is the most popular and robust relational database management system. This application is widely used in organizations to store and manage data. Due to different reasons the user have to face different problems, SQL Server error code 3417 is the common issue faced by the database administrators. Let us have a look at this query asked by the user in the forum site.

“Please help when I tried to start the SQL Server I got an error like this Windows could not start the SQL server on local computer error code 3417. Can anybody know the exact reason behind this problem? Is there have any issues with MDF and the LDF files? If so can anyone help me to provide an instant solution to this problem?”

If you are facing a similar issue or this error, then in this article we will discuss the reason behind this problem and also the best possible issue to resolve this issue. Before coming to the solution part let us first discuss the reason issue.

SQL Error 3417 Code Common User Queries

Before we step ahead, it’s beneficial if we simply look at what users go through. It can help us understand the entire problem which leads to providing effective results.

It was a hectic day for our entire team when this 3417 error suddenly popped up in our Windows. That’s exactly when we started panicking. However, our tech expert Daniel was present that way who somehow fixed that error temporarily. Is there any easy way to fix this error 3417 SQL Server issue without any hassles?
– Christine H.

 I don’t know why I got this Windows could not start the SQL Server on local computer error 3417. How do I solve this error without any complex manual procedures? I only trust SysTools as I’ve already had one another problem solved by them recently. Please explain how to fix this SQL Server error 3417 too.
– Adam S.

Main Causes of SQL Server Error 3417

There are various reasons why Windows could not start the SQL server on local computer error code 3417. Users must know that any sort of hardware failure, virus intrusion, improper shutdown (between a running query), lack of memory space, media storage issues, etc can cause this critical issue. Also, under the data folder of the program files, any discrepancy in the network account might be a reason for this SQL error 3417 code.

When we divide these causes, we get:

  • Severe Factors – Due to corruption issues such as hardware failure, virus attack, or corruption in the MDF and NDF files.
  • Human Error – In case of changes or modifications in Windows settings, such as the SQL Server folder movement.
  • Network & Settings Issues – If any inconsistency occurs in the network account for the data folder in the program files.

3417 error causes

g=”1″ /&gt;

Fix Windows Could Not Start the SQL Server On Local Computer Error Code 3417

The user can try the below discussed ways to tackle this problem

Method 1: First check if whether the MDF file is compressed

    • Find the .mdf database file click on properties.
    • Click on the Advanced button.
    • Uncheck the option compress content to save disks space.

Method2: By Granting the Network Permission in the Folder

  1. First Go to the data folder and then click on Security / Permissions.
  2. Now add the network service account, check whether the issue resolved or not.

Method 3: Repair Corrupted SQL database with SQL Database Recovery

In case if you have tried above two ways to Windows could not start the SQL Server on the local computer error code 3417 problems, and still, you are facing this problem then there is a corruption occur in the SQL database. So in that case, the user can take the help of SQL Database Recovery. By using this software the user can easily recover the SQL database objects such as SQL tables, stored procedure, triggers, functions, etc. Also, it helps to preview the deleted SQL tables record in color. Also, this software is compatible with SQL Server 2019 and its below version. For complete information, the user can try the demo version of this software.

Step-1. Launch the tool and then Hit the Open button.

open button

Step-2. Select the Advance or Quick Scan Mode here. 

select scan mode

Step-3. Select the Destination Platform with Objects.

select destination

Step-4. Hit Save button to fix SQL Server error 3417.

Hit export or save

Note: The user can also read the post How to recover SQL database from MDF/ NDF files.

Final Words

In this article, We have discussed the reasons for Windows could not start the SQL server on local computer error code 3417. Also, we have discussed the reasons for this problem. The user can try the manual ways to fix this issue. If the problem is still there then the user can use the SQL Recovery tool to recover MDF database file easily.

FAQs

Q-1. Does this tool recover SQL DB once the damages in the file are fixed?

Ans: Yes, the software can export the healthy file to the destination after recovering it. Moreover, it offers three options; SQL Server, CSV file, and SQL Scripts format.

Q-2. Can we fix the damaged BAK file to fix this SQL error 3417 or not?

Ans: It is possible but for fixing the corruption issues present in the SQL BAK files, users need to get the SQL Backup Recovery Tool instead of the above-mentioned one.  

Q-3. Is the SQL Server error 3414 similar to error code 3417?

Ans: No, The 3414 arises during the setup of the SQL Server which is not the case with our 3417 error code.

Q-4. Can we remove this Windows could not start the SQL Server on local computer error 3417 by fixing the connection issues?

Ans: Well, it depends if you have any more issues like stated above, then fixing only the connection issues will not be enough. However, if your database is only struggling with connection & network issues, then you might get back on track by fixing this.

error-3417

MS SQL Server gives the most steady and strong database the board framework and is used primarily by overall entrepreneurs and enterprises for its graphical UI and extreme features. But, more clients, more issues. Because of various reasons, various errors emerge. For example, MS SQL database errors 824, and 825, the database can not open because of inaccessible files error 945, etc. So, in this blog, we will discuss one of the errors, which is Windows could not start the SQL Server on the local computer error 3417.

Before discussing this Windows cannot start SQL server on local computer issue further, let us have a look at the user’s Query first:

Due to plenty of reasons, I finally decided & then moved this folder Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL to another location, after that, returned it to the exactly the same location, But when I tried to start it  Microsoft SQL Server has stopped working, please help me to resolve this issue”

Important Note: In case you are facing the SQL database is inaccessible and you are looking for Quick ways to recover crucial database components. The user can download the SysTools SQL MDF Recovery Tool. This can easily remove corruption issues. Moreover, the software supports SQL Server 2019 and below.

Fix Windows Could Not Start the SQL Server On Local Computer

  • Launch the Software in Your System.
  • Click Open to Add MDF Data Files.
  • Select Quick or Advanced Scan Mode.
  • Set the Destination Location for Files.
  • Click on the Start Export button to End.

These are the simple quick steps for users to solve the problem caused by corruption in data files. Continue further for the detailed results.

Reasons for Windows Could Not Start SQL Server Error

There could be different reasons for this “Windows could not start SQL Server on Local Computer” error. Some of them are here below.

  1. Changes in Windows settings, for example, SQL organizer development.
  2. Irregularity in the system represents the Data folder in Program Files.
  3. SQL Server database corruption brought by hardware failure, virus assault, MDF/ NDF damage, and so forth.

Top Three Ways to Troubleshoot the Issue

Users can also try to troubleshoot the issue at first using some basic tricks. If the issue continues, then manual or automated methods can be taken into consideration for the resolution of the problem.

Un-Updated Password
It’s very important for users to update the password on the SQL Server instance once they change it. Without this, users can not be able to resolve the issue even with automated or manual solutions. This is one of the most common reasons why the majority of users face such errors.

False File Paths & Locations
This is another issue that often disturbs users & results in startup failures. If a user keeps the master database on a drive & then the files of the database are not available or accessible. Users will get this error. Make sure the file paths & locations are correct otherwise, the error will trouble users.

Corruption in the LOG Files or Accidental Deletion
At last, we have the issue where the MDF, LDF, or NDF files of the SQL database get corrupted. This makes the database unhealthy & Windows could not start the SQL Server on the local computer. We will discuss this point & its solution in depth below.

Fix Windows Could Not Start SQL Server on Local Computer Error 3417

Now, in order to overcome this problem, there are 3 solutions to fix this error.

  • Select Log System Account
  • Check if the MDF File is compressed
  • Repair corrupted database files.

# Method 1:  Select Log System Account

To select the log system account, follow the given below steps:

  1. Press Windows + R and type msc.
  2. Find the SQL inside the Name section and right-click on the SQL.
  3. You will get Properties alternative, click on Properties.
  4. One new window will be open and there you need to tap on the Log On
  5. Now, select the Local System Account and click on the apply button, and then Ok.
  6. After that return again in msc window. And, right-click on SQL and click on the start button.
  7. Lastly, SQL Server administrations began effectively to fix Windows could not start SQL Server on Local Computer issue.

# Method 2: Check if the MDF file is Compressed

If you are not able to fix the problem by selecting a log system account then, check whether the MDF file is compressed or not.

Now, to check whether the MDF file is compressed or not, follow the steps.

  1. Find the folder where your MDF file is located.
  2. Click on the Properties then Advanced.
  3. Finally, click on the checkbox and untick the “Compress contents to save disk space” checkbox.

# Method 3: Repair corrupted database files

After using the above methods, if you are still not able to fix the problem then probably the problem is in the database files. So, to repair the corrupted database files the best and most accurate method is by using the SysTools SQL Recovery tool. This tool has the ability to repair corrupted database files easily. Additionally, this tool has a very simple interface so that any user can easily fix the database files with speed and accuracy.

Download Now Purchase Now

Now, follow the below steps to fix Windows could not start the SQL server on local computer error smartly.

Step-1. Launch the SysTools SQL Recovery tool and open the MDF file.

Step-2. Now, scan the MDF file and auto-detect the SQL server file.

Step-3. Preview the database objects and select database objects.

Step-4. Finally, click on the Export button to export SQL database components to SQL Server.

Conclusion

MS SQL is a widely used database by many big organizations and users. It is in use for managing the database but, sometimes due to many reasons, error comes up. And because of this, users face many problems such as inaccessibility of databases, database corruption, etc.

Therefore, in this blog, we have discussed one such problem which is “Windows could not start SQL Server on Local Computer error 3417”. Also, we have discussed the solutions to fix this problem. And, if you are not familiar with the SQL Server database. Then, we suggest you to use the SQL recovery tool to fix SQL server errors easily.

FAQs

Q-1. How do I start SQL Server on a local computer?

Ans: Follow the simple steps to Start SQL Server Configuration Manager. Follow the below steps for the same.

  • Go to Start & All Programs.
  • Search & Open SQL Server.
  • Open Your SQL Server Now.
  • Go to Configuration Tools.
  • Select SQL Server Configuration Manager.

Q-2. How do I fix SQL Server not starting?

Ans: Troubleshoot the error & then follow the below steps:

  • In summary.txt log, or UI users can determine the error.
  • Verify if it’s a manual type service or automatic type.
  • Now check if the account the password is expired.
  • Cross-check the ERRORLOG if the service doesn’t start.

Q-3. Why can’t I connect to localhost SQL Server?

Ans: Firstly, just check if the TCP/IP or named pipes are allowed for use or not. Through the SQL Server Configuration Manager, users can enable them if disabled in the first place.

Q-4. What is error 3417 in SQL Server service not starting?

Ans: Failing to bring the compressed MDF or TEMPDB file online causes this error. Also, without having the folder’s access rights, this error might cause.

If you’ve ever experienced the dreaded «Windows could not start the SQL Server on Local Computer» error, you’re not alone. This common hiccup in running Microsoft SQL Server services can leave even seasoned IT professionals scratching their heads. Luckily, there are several proven solutions for this issue, and we’re here to guide you through every step.
But before we roll up our sleeves and dive into fixes, let’s explore what’s going on beneath the hood. Why does this happen? What does it mean for your system? And, most importantly, how can you get things back on track?


Windows Could Not Start SQL Server' Error: A Step-by-Step Guide'. Error message on screen stating Windows couldn't start SQL Server on Local Computer.

What’s the Problem?​

Microsoft SQL Server, like any other background service on your Windows machine, needs to run properly for you to access databases. When this service falters, you’re presented with errors—particularly this classic one:

“Windows could not start the SQL Server (<DB-NAME>) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417.”

Or, worse, sometimes you’ll see the equally head-scratching:

“Error 1053: The service did not respond to the start or control request in a timely fashion.”

These errors could arise for multiple reasons, such as misconfigured services, dependency issues, timeout errors, or even network hiccups. Updating Windows itself or network configurations can also throw these errors due to compatibility or permission mishaps. Now that we’ve identified why things go awry, let’s tackle it head-on.


Step-by-Step Guide to Fix SQL Server Start-Up Errors​

Here are four concrete fixes to resolve the issue. Each solution targets a specific root cause of the problem.


1. Change the Login Type

This might sound simple, but ensuring the SQL Server logs in using the correct account can quickly resolve the issue. By switching to the Local System Account, you eliminate permission errors. Follow these steps:

  • Open the Run dialog using Win + R.
  • Type Services.msc and hit Enter.
  • Locate the SQL Server service (look for something like SQL Server (MSSQL$<InstanceName>)).
  • Right-click on it and select Properties.
  • Navigate to the Log On tab.
  • Set the option to Local System Account.
  • Click Apply and then OK.

After making the changes, restart the SQL Server service. Test connecting to your database. If this doesn’t work, don’t worry—there’s more you can do.


2. Check and Activate Service Dependencies

SQL Server depends on a chain of other background services to function. If one of these dependencies isn’t running, SQL Server won’t start either. Fixing it is straightforward:

  • Open Services using Win + RServices.msc.
  • Locate the SQL Server service again and open its Properties.
  • In the Dependencies tab, you’ll see a list of other services it relies on. Examples include:
  • Windows Management Instrumentation (WMI)
  • Remote Procedure Call (RPC)
  • SQL Server Browser (if using named instances)
  • Navigate back to the main Services screen and ensure that all dependent services are started. If not, right-click on each one, and select Start.

Restart SQL Server and try again. Dependencies often cause silent failures, so this is an important step.


3. Set Up the ServicesPipeTimeout Registry Key

Sometimes, this error occurs because Windows assigns a predefined time for services to start (usually 30 seconds) and gives up if the service is delayed. Setting your system to allow more time can help overcome these delays.
Here’s how to increase the timeout duration:

  • Backup Your Registry
  • Use Win + Rregedit.
  • Go to File > Export, and save a backup of the registry.
  • Add ServicesPipeTimeout Key
  • Navigate to this key:

    Code:

         HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

  • Right-click on the Control folder, and select New > DWORD (32-bit) Value.
  • Name it ServicesPipeTimeout.
  • Double-click the new key and set its value to 180000 (this equals 3 minutes in milliseconds).
  • Click OK, then exit.
  • Reboot Your PC
    After restarting your system, open the Services app and start the SQL Server service again.

This method often resolves timeout errors (Error 1053) by allowing the SQL service more time to initialize.


4. Adjust Certificate Settings (CTL Workaround)

In some cases, SQL Server Reporting Services fail to start because it cannot access Certificate Trust Lists (CTLs) from Windows Update. This might occur if your system isn’t connected to the internet or if Windows Update has been blocked. Here’s how to tweak those settings:

For Users with Group Policy Editor:

  • Open the Group Policy Editor (Win + Rgpedit.msc).
  • Navigate to:

    Code:

       Computer Configuration > Policies > Windows Settings > Security Settings > Public Key Policies > Certificate Path Validation Settings

  • Open the Network Retrieval tab.
  • Tick Define these policy settings.
  • Disable Automatically update certificates in the Microsoft Root Certificate Program.
  • Click OK.

For Windows Home Edition Users (Registry Alternative):

  • Open regedit via the Run dialog.
  • Navigate to:

    Code:

       HKLM\Software\Policies\Microsoft\SystemCertificates

  • Create a new key named AuthRoot.
  • Right-click AuthRootNew > DWORD → Name it DisableRootAutoUpdate.
  • Set its value to 1.
  • Exit and restart your system.

With this change, the service will no longer depend on fetching certificates, which often prevents it from starting in a timely manner.


How to Start SQL Server Manually in the Future​

Once the service is fixed, you might wonder how to start it manually if needed. Follow these simple steps:

  • Go to the Start Menu or open Run (Win + R).
  • Type Services.msc and find the SQL Server instance.
  • Right-click on the service and choose Properties.
  • Set the Startup type to Automatic so it starts at boot.
  • Click Start to launch it immediately.

Can You Run SQL Server on Your Local Computer?​

Yes, and it’s actually quite common! SQL Server installations (via Microsoft Management Studio) are used by developers, testers, database administrators, and more. You can run and administer the database system directly on a local machine, perfect for training or development environments.
If you’re unsure how to proceed, check out our guides on installing and configuring SQL Server Management Studio or even other C/RDBMS platforms like MongoDB.


In Summary​

The “Windows could not start the SQL Server on Local Computer” error might seem daunting, but with the solutions above, you’ll be back in business without breaking a sweat. Whether it’s changing login settings, fixing service dependencies, or adding a custom timeout in the registry, these methods address the problem at its core. The fixes are easy to replicate, even if you’re not a SQL wizard.
Still scratching your head? Join the discussion on WindowsForum.com and share your experiences or ask for support. Let’s tackle those errors together!


Source: The Windows Club Windows could not start the SQL Server on Local Computer

Microsoft‘s SQL Server is one of the most popular enterprise-grade database management systems. It offers advanced data warehousing capabilities along with extensive business intelligence and analytics features.

However, a commonly reported error by SQL Server DBAs and developers is:

«Windows could not start the SQL Server (MSSQLSERVER) service on Local Computer»

This indicates that the database engine instance is not starting properly, hence preventing connectivity for data access and modifications.

In this detailed guide, we will analyze the fundamentals of this error along with a step-by-step approach to troubleshoot and resolve this issue on Windows systems.

Underlying Cause Analysis

There could be numerous reasons why SQL Server service fails to start on a host Windows machine:

Missing Runtime Files or Dependencies

SQL Server relies on multiple shared .DLL files e.g. ssms.exe, sqlservr.exe as well as Visual C++ runtime libraries. If any of these are corrupted or deleted, the service does not initialize correctly.

Incorrect Permissions

By default, the service runs with LocalSystem privileges. However, if manually configured otherwise e.g. LocalService, it could fail due to access issues.

Authentication Errors

Choosing wrong authentication mode – Windows auth vs SQL server auth, or expired passwords could also lead to startup failures.

Database Inconsistencies

Corrupt system databases like master/model/MSDB containing meta-data could prevent successful initialization.

System File Corruption

Malware attacks or unexpected shutdowns while writing transactions could lead to inconsistencies in data/log files eventually crashing the SQL Server service.

There could be additional reasons like registry issues, cluster failures, memory leaks etc. as well which act as contributing factors.

Step-by-Step Troubleshooting

With numerous factors at play, structured troubleshooting is key to resolve the root cause. We will explore an effective sequence to diagnose and fix this error.

1. Review SQL Server Error Logs

SQL server maintains extensive logs under %ProgramFiles%\Microsoft SQL Server\MSSQL\Log folder. Analyzing the latest errorlog file reveals detailed trace information on service crash.

2022-02-22 00:22:07.34 Server      Microsoft SQL Server vNext (CTP1.0) - 15.0.1000.34 (X64) 
    Feb 22 2022 00:22:07 Copyright (C) 2019 Microsoft Corporation
2022-02-22 00:22:07.34 Server      UTC adjustment: 0:00
2022-02-22 00:22:07.34 Server      (c) Microsoft Corporation.
2022-02-22 00:22:07.34 Server      All rights reserved.
2022-02-22 00:22:07.34 Server      Server process ID is 948.
2022-02-22 00:22:07.34 Server      System Manufacturer: ‘Microsoft Corporation‘, System Model: ‘Virtual Machine‘.
2022-02-22 00:22:07.34 Server      Authentication mode is MIXED.
2022-02-22 00:22:07.34 Server      Logging SQL Server messages in file ‘C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG‘.
2022-02-22 00:22:07.34 Server      The service account is ‘NT Service\MSSQL$MSSQLSERVER‘. This is an informational message; no user action is required.
2022-02-22 00:22:07.35 Server      Registry startup parameters: 
     -d C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf
     -e C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG
     -l C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2022-02-22 00:22:07.35 Server      Command Line Startup Parameters:
     -s "MSSQLSERVER"
2022-02-22 00:22:07.36 Server      SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2022-02-22 00:22:07.36 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2022-02-22 00:22:07.36 Server      Detected 2 CPUs. This is an informational message; no user action is required.

2022-02-22 00:22:07.54 Server      Using conventional memory in the memory manager.
2022-02-22 00:22:07.58 Server      Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2022-02-22 00:22:07.61 Server      Buffer pool extension is already disabled. No action is necessary. 
2022-02-22 00:22:07.61 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2022-02-22 00:22:07.61 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
2022-02-22 00:22:07.76 Server      Software Usage Metrics is disabled.
2022-02-22 00:22:08.13 Server      Database Instant File Initialization: enabled 
            For security and performance considerations see the topic ‘Database Instant File Initialization‘ in SQL Server Books Online. This is an informational message only. No user action is required.
2022-02-22 00:22:08.31 Server      Query Store settings initialized with enabled = 1, 
2022-02-22 00:22:08.44 Server      The maximum number of dedicated administrator connections for this instance is ‘1‘
2022-02-22 00:22:08.45 Server      Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2022-02-22 00:22:08.53 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.
2022-02-22 00:22:08.63 Server      In-Memory OLTP initialized on lowend machine.
2022-02-22 00:22:08.81 Server      [WARN] Failed to initialize the Cryptography Provider - Error 0xf0091016.  Signatures, encryption and Checksumming are disabled.
2022-02-22 00:22:08.81 Server      Software Usage Metrics is disabled.

2022-02-22 00:22:08.94 spid9s      Starting up database ‘master‘.
2022-02-22 00:22:09.25 spid9s      Recovery is writing a checkpoint in database ‘master‘ (1). This is an informational message only. No user action is required.
2022-02-22 00:22:10.36 spid9s      Resource governor reconfiguration succeeded.
2022-02-22 00:22:10.38 spid9s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2022-02-22 00:22:10.38 spid9s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
2022-02-22 00:22:10.65 spid9s      SQL Trace ID 1 was started by login "sa".
2022-02-22 00:22:10.72 spid9s      Server name is ‘MSSQLSERVER‘. This is an informational message only. No user action is required.
2022-02-22 00:22:10.77 Server      Common language runtime (CLR) functionality initialized.

2022-02-22 00:22:10.93 spid19s     A self-generated certificate was successfully loaded for encryption.
2022-02-22 00:22:11.01 spid19s     Server local connection provider failed to listen on [ \\.\pipe\SQLLocal\MSSQLSERVER ]. Error: 0x2746. [CLIENT: <named pipe>]

2022-02-22 00:22:11.63 spid9s      Dedicated admin connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated admin connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2022-02-22 00:22:11.70 spid9s      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER ] for the SQL Server service. Windows return code: 0x2098, state: 15. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2022-02-22 00:22:11.71 spid9s      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER:1433 ] for the SQL Server service. Windows return code: 0x2098, state: 15. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2022-02-22 00:22:11.75 spid9s      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.mydomain.com ] for the SQL Server service. Windows return code: 0x2098, state: 15. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2022-02-22 00:22:11.79 spid9s      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/MSSQLSERVER.1433.mydomain.com ] for the SQL Server service. Windows return code: 0x2098, state: 15. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2022-02-22 00:22:11.95 spid9s      SQL Server is now ready for client connections. This is an informational message; no user action is required.

2022-02-22 00:22:14.20 spid59      Error: 17207, Severity: 16, State: 1.
2022-02-22 00:22:14.20 spid59      FCB::Open failed: Could not open file E:\data\TestData.mdf for file number 1.  OS error: 5(Access is denied.).
2022-02-22 00:22:14.21 spid59      File activation failure. The physical file name "E:\data\TestData.mdf" may be incorrect. 
2022-02-22 00:22:14.21 spid59      Error: 5120, Severity: 16, State: 101.
2022-02-22 00:22:14.21 spid59      Unable to open the physical file "E:\data\TestData.mdf". Operating system error 5: "5(Access is denied.)".
2022-02-22 00:22:28.56 Logon       Error: 18456, Severity: 14, State: 38.
2022-02-22 00:22:28.56 Logon       Login failed for user ‘myUser‘. Reason: Failed to open the explicitly specified database ‘TestData‘. [CLIENT: <local machine>]
2022-02-22 00:22:28.58 Logon       Error: 18456, Severity: 14, State: 38.
2022-02-22 00:22:28.58 Logon       Login failed for user ‘myUser‘. Reason: Failed to open the explicitly specified database ‘TestData‘. [CLIENT: <local machine>]

This shows the start sequences like memory/buffer configuration followed by critical failures like:

  • Unable to open physical file TestData.mdf at location E:\data – Access denied
  • Login failed for user ‘myUser‘ while connecting to database TestData

So we diagnose that one of the databases specified at startup itself is inaccessible leading to aborted initialization.

2. Review Service Log On Account

The log snippet reveals that the service is attempting to start under NT Service\MSSQL$MSSQLSERVER account. This could be lacking necessary permissions.

We can validate permissions by opening the Services management console (services.msc), right-click on SQL Server service and select Properties. Navigate to Log On tab.

If the service is configured under Network Service or other limited permission account, startup failures can occur due to restricted resources access.

Setting the Log On As option to Local System resolves most permission limitations.

3. Grant Folder/File Access

If changing service logon does not resolve, focus on the files/folder access errors indicated.

For database files residing locally, grant FULL CONTROL access to following users:

  • Local System
  • Administrators Group
  • MSSQLServer Group

For folders hosting database files (E:\data in above log snippet), the permissions need adjustment so that SQL Server process can read/write smoothly both during initialization as well as regular operations.

4. Configure Server Authentication

Another key reason for 17207 unable to open database file error is that the database specified (TestData) requires SQL Server authentication. But only Windows auth mode is enabled by default during installation.

We can verify and fix this using SQL Server Configuration Manager:

SQL Server Configuration Manager -> SQL Server Services -> Protocols for MSSQLSERVER -> Properties

In Properties dialog, open the Flag tab. Enable:
- TCP/IP
- Named Pipes

Navigate to the Logon tab. Set Security -> Server Authentication to:
SQL Server and Windows Authentication mode

Restart SQL Server service post authentication changes.

5. Start Rebuilding System Databases

If the master or model system databases have become corrupted or inconsistent, the DB Engine can fail to start with cryptic errors.

Attempting the following sequence will recreate system databases without data loss to functioning state:

1. Start SQL service in Minimal Configuration mode 
   (-f bootonly startup parameter)

2. Open new query window 

3. Execute the following to rebuild master data and log files empty:
   - ALTER DATABASE master SET SINGLE_USER WITH ROLLBACK IMMEDIATE
   - EXEC sp_detach_db ‘master‘
   - sp_attach_db ‘master‘ 

4. Similarly detach/attach model and MSDB files

5. Stop/Restart SQL server normally

On restart, system databases will be recreated while user databases attached from their files. Validate connectivity post reboot.

If the rebuilt master database is still inaccessible, rename corrupt data file instead to forcefully rebuild entire master content.

Following these sequential steps resolves SQL server failed to start issues due to multiple underlying factors. Reach out in comments for any other specific troubleshooting advice.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Почему компьютер не выключается после завершения работы windows 10 что делать
  • Dxcpl download windows 10
  • Какой код активации windows 10
  • Как открыть настройки биос на windows 10
  • Диагностика времени загрузки windows