Windows could not start sql server on local computer

For some reasons I moved this folder : (Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL) to another drive, then returned it to the same location, but sql server has stopped working, showing this error when trying to start it again:

Windows could not start the SQL Server (MSSQLSERVER) 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.

I tried many solutions discussed in different forums, but none of them work for me.

The folder is not compressed or encrypted.

My sql server version is 2012:
Microsoft SQL Server Management Studio      11.0.3128.0
Microsoft Analysis Services Client Tools    11.0.3128.0
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML             3.0 4.0 6.0 
Microsoft Internet Explorer         9.0.8112.16421
Microsoft .NET Framework            4.0.30319.18047
Operating System                6.1.7601

Thanks for your kind help in advance.

Aruna's user avatar

Aruna

12k3 gold badges28 silver badges42 bronze badges

asked Jun 24, 2013 at 10:15

Kardo's user avatar

4

Very simple to solve this problem.

Just open RUN window(Window+R) and type services.msc:

Services.msc window

Find the SQL within name column and right click on that.

right click on SQL as in screenshot

enter image description here

You will get properties option, click on properties.

One new window will be open and there you have to click on Log On tab. And select the Local System Account. then apply and okay.

Select Local system Account

enter image description here

After that come again in services.msc window. and right click on sql and click start.

And finally, SQL Server services started successfully. enjoy and keep learning.

Vy Do's user avatar

Vy Do

47.2k61 gold badges216 silver badges323 bronze badges

answered Dec 10, 2017 at 17:44

Nandan Sony's user avatar

Nandan SonyNandan Sony

8496 silver badges4 bronze badges

5

Run this command after opening cmd as administrator

net start mssqlserver /T902

This command is called trace flag 902. It is used to bypass script upgrade mode. Every time when you try to start your sql service it also looks for script upgrades. and when the script upgrade fail your service unable to start. So, Whenever we have such upgrade script failure issue and SQL is not getting started, we need to use trace flag 902 to start SQL.

I hope this will help you..

answered Jan 10, 2020 at 6:52

Abdulhakim Zeinu's user avatar

Abdulhakim ZeinuAbdulhakim Zeinu

3,3731 gold badge31 silver badges37 bronze badges

0

Check if you did compress the driver or folder in where you put the .mdf file.

If so, plesae goto the driver or folder, change the compress option by

Properties -> Advanced and unticked the “Compress contents to save disk space” checkbox.

After above things, you should be able to start the service again.

Ajay2707's user avatar

Ajay2707

5,7106 gold badges40 silver badges58 bronze badges

answered Sep 25, 2013 at 3:12

gino's user avatar

ginogino

1791 silver badge3 bronze badges

2

In my particular case, I fixed this error by looking in the Event Viewer to get a clue as to the source of the issue:

enter image description here

I then followed the steps outlined at Rebuilding Master Database in SQL Server.

Note: Take some good backups first. After erasing the master database, you will have to attach to all of your existing databases again by browsing to the .mdf files.

In my particular case, the command to rebuild the master database was:

C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\SQLServer2012>setup /ACTION=rebuilddatabase /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=mike /sapwd=[insert password]

Note that this will reset SQL server to its defaults, so you will have to hope that you can restore the master database from E:\backup\master.bak. I couldn’t find this file, so attached the existing databases (by browsing to the existing .mdf files), and everything was back to normal.

After fixing everything, I created a maintenance plan to back up everything, including the master database, on a weekly basis.

In my particular case, this whole issue was caused by a Seagate hard drive getting bad sectors a couple of months after its 2-year warranty period expired. Most of the Seagate drives I have ever owned have ended up expiring either before or shortly after warranty — so I’m avoiding Seagate like the plague now!!

answered Sep 20, 2014 at 21:32

Contango's user avatar

ContangoContango

76.8k58 gold badges262 silver badges307 bronze badges

I have had the same error recently. I have checked the folder Log of my Server instance.

x:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\

and I have found this errors in logs

Starting up database 'master'.
Error: 17204, Severity: 16, State: 1.
FCB::Open failed: Could not open file
x:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf for file number 1.  OS error: 5(Access is denied.).
Error: 5120, Severity: 16, State: 101.
Unable to open the physical file "E:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf". Operating system error 5:    "5(Access is denied.)".
Error: 17204, Severity: 16, State: 1. FCB::Open failed: Could not open file E:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf for file number 2.  OS  error: 5(Access is denied.).
Error: 5120, Severity: 16, State: 101.  Unable to open the physical file "E:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf". Operating system error 5: "5(Access is denied.)".
SQL Server shutdown has been initiated

So for me it was an easy fix. I just added proper access rights to this files to the sql server service account.
I hope it will help

answered Mar 4, 2017 at 15:52

Marcin Pazgier's user avatar

This usually occurs when the master.mdf or the mastlog.ldf gets corrupt. In order to solve the issue go to the following path C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL , there you will find a folder ” Template Data ” , copy the master.mdf and mastlog.ldf and replace it in C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Data folder . That’s it. Now start the MS SQL service and you are done.

Positive Navid's user avatar

answered Jul 21, 2014 at 9:36

sohaiby's user avatar

sohaibysohaiby

1,1683 gold badges24 silver badges39 bronze badges

3

What is System Event Log saying?

Have you tried to repair:
Sql Server Installation Center -> Maintenance -> Repair

enter image description here

Contango's user avatar

Contango

76.8k58 gold badges262 silver badges307 bronze badges

answered Jun 24, 2013 at 10:57

Hankman3000's user avatar

1

In My case I had to Upgrade the SQL Server since evaluation licence had been expired.

enter image description here

answered Apr 18, 2018 at 11:25

MAFAIZ's user avatar

MAFAIZMAFAIZ

6816 silver badges13 bronze badges

I was getting this error today. And above answers didn’t help me. I was getting this error when I try to start the SQL Server(SQLEXPRESS) service in Services(services.msc).

When I checked the error log at the location C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Log, there was an entry related TCP/IP port.

2018-06-19 20:41:52.20 spid12s TDSSNIClient initialization failed
with error 0x271d, status code 0xa. Reason: Unable to initialize the
TCP/IP listener. An attempt was made to access a socket in a way
forbidden by its access permissions.

Recently I was running a MSSQLEXPRESS image in my docker container, which was using the same TCP/IP port, that caused this issue.

enter image description here

So, what I did is, I just reset my TCP/IP by doing the below command.

netsh int ip reset resetlog.txt

enter image description here

Once the resetting is done, I had to restart the machine and when I try to start the SQLEXPRESS service again, it started successfully. Hope it helps.

answered Jun 19, 2018 at 15:55

Sibeesh Venu's user avatar

Sibeesh VenuSibeesh Venu

19k12 gold badges103 silver badges143 bronze badges

Go to the services and check if the SQL Server (MSSQLSERVER) service is running. Stop it and start your SQL Server (SQLEXPRESS) service. It should work.

see the image:

enter image description here

Positive Navid's user avatar

answered Jul 20, 2020 at 13:46

MJ X's user avatar

MJ XMJ X

8,58612 gold badges74 silver badges101 bronze badges

0

Make sure both drive have the same partition — ( like FAT or NTFS, preferably NTFS ) also make sure he NETWORK SERVICE account, has the access.

answered Jun 24, 2013 at 10:47

Rajeev Bera's user avatar

Rajeev BeraRajeev Bera

2,0211 gold badge16 silver badges30 bronze badges

Database rebuild fixed it for me as well. Also had to restore the old database from backup as it got corrupted during power outage…
The copy master.mdf procedure did not work for me.

answered Mar 13, 2015 at 5:48

Ivo's user avatar

i had the same problem before

the error code 3417 : the SQL SERVER cannot start the master database,
without master db SQL SERVER can’t start
MSSQLSERVER_3417

The master database records all the system-level information for a SQL Server system. This includes instance-wide metadata such as logon accounts, endpoints, linked servers, and system configuration settings. In SQL Server, system objects are no longer stored in the master database; instead, they are stored in the Resource database. Also, master is the database that records the existence of all other databases and the location of those database files and records the initialization information for SQL Server. Therefore, SQL Server cannot start if the master database is unavailable
MSDN Master DB
so you need to reconfigure all settings after restoring master db

solutions

  • replace master mdf and ldf files with the same files from another instance of sql Server as long as its the same version reference
  • Rebuild System Databases refrence
  • reinstall sql server

answered Oct 5, 2015 at 17:53

Yehia's user avatar

YehiaYehia

3862 silver badges9 bronze badges

I copied a master.mdf und mastlog.ldf from another Computer (luckily, we have a lot of Clients with the same configuration, otherwise template data would be perhaps necessary). I backed up the damaged master.mdf and mastlog.mdf. After that I replaced the bad ones with the ones from another Computer. And it worked. I needed to start the MSSQLSERVER Service of course. But, after that I had Problem that the user was already existing but orphaned (error code 15023), I executed the query

USE Database_name
EXEC sp_change_users_login ‘Auto_Fix’, ‘username’

after that, everything was working smoothly. Hope this helps you and many thanks for this thread, saved me :)

answered Oct 12, 2017 at 17:07

Zvero's user avatar

Just rename the current ErrorLog to any other name like Errorlog _Old and change any old Log file to Error log file

try to start the SQL server services.. That’s it. it will work..

Sql server error log file got corrupted. that is why it gives the problem even when you have all permissions.. when you delete it. new file will be generated.

answered Oct 30, 2017 at 6:32

Praveen's user avatar

Re-entering credentials will help to start the services:

  1. Start > Services
  2. Right click on SQL Sever > Properties
  3. Log On
  4. Re-enter credentials and apply
  5. Start the services now

answered Jun 18, 2020 at 11:48

Ramanujam Allam's user avatar

The reason behind getting this Error Code : 3417 may be as follows:

  • One cause may be due to the Network account for the Data folder in
    Program files.
  • The other reason may be because of some Windows
    settings changed somehow.

Example: If for some reasons you have moved this folder (Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL) to another location then returned it to the same location. So, though it was returned to the same location the server may stop working and show error code 3417 when trying to start it again.

How To Fix SQL Error 3417

  • Go to «C:Program Files Microsoft SQLServerMSSQL.1MSSqLData»
  • Security/Permission settings
  • Network Service Account
  • Add a Network Service account
  • Then again check all

As stated here, you can try this third party tool as well.

answered Oct 30, 2020 at 9:53

Vignesh Kumar A's user avatar

Vignesh Kumar AVignesh Kumar A

27.9k13 gold badges63 silver badges115 bronze badges

A few times now, I’ve experienced various instances MS SQL Server to fail with this error after a Windows update. Most of the quick fixes above did not work for me.

What did:

  • copy all production databases over to some safe place
  • remove everything SQL Server via add/remove programs
  • get the latest SQL Server Express or Dev & install it
  • move the databases over to their home and reattach them.

For me, this was the fastest solution. Trying to find the cause of the error and fixing it is an afternoon of googling misty error messages. But YMMV.

answered Jan 29, 2021 at 19:32

RolfBly's user avatar

RolfBlyRolfBly

3,6225 gold badges33 silver badges46 bronze badges

In my case problem was about evaluation period expiration. I also went through this thread of StackOverFlow.You can investigate your problem by going to Event Viewer --> Windows Log (Application) and then search for your error id. For Step by Step guide to view error id in event viewer visit this…

answered Jan 17, 2022 at 14:44

Ishtiaq's user avatar

IshtiaqIshtiaq

2381 gold badge2 silver badges9 bronze badges

Не удалось запустить службу SQL Server на Локальный компьютер. Подробности содержатся в журнале системных событий. Если эта служба разработана не в Майкрософт, обратитесь к разработчику службы, и сообщите специфический для этой службы код ошибки…:

Код ошибки 13

Решение:

При появлении данной ошибки необходимо зайти в Пуск  Microsoft SQL Server → Средства настройки  Диспетчер конфигурации SQL Server / SQL ServerConfiguration Manager  Конфигурация сети SQL Server  Протоколы для SQLEXPRESS и проверить, включены ли протоколы (все протоколы должны быть включены).

Код ошибки 1814

Вариант ошибки на английском:
Windows could not start the SQL Server 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 — 1814.

Причина: Ошибка возникает, когда по какой-то причине путь к файлам базы по умолчанию не соответствует действительному.

Решение:
Возможно в папке C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA нет необходимых файлов. Необходимо добавить с заменой файлы из папки C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\TemplateData.

Код ошибки 3417

Решение:

Перед заменой файлов рекомендуется сохранить копию папки Data в отдельной директории.

Cкопировать данные из C:\Program Files\Microsoft SQL Server\MSSQLXXX\MSSQL\Template Data в C:\Program Files\Microsoft SQL Server\MSSQLXXX\MSSQL\DATA

Для 64-разрядных систем — C:\Program Files (x86)\Microsoft SQL Server\MSSQLXXX\MSSQL\Template Data в C:\Program Files (x86)\Microsoft SQL Server\MSSQLXXX\MSSQL\DATA

Если замена файлов не помогла, необходимо дать права на папку Microsoft SQL Server.

Код ошибки 17058

Решение:

Необходимо дать полные права на папки C:\Program Files\Microsoft SQL Server\ и C:\Program Files (x86)\Microsoft SQL Server. Если данное решение не поможет — в свойствах службы на вкладке Вход в систему поставьте флаг С системной учетной записью.

Код ошибки 17113

Решение:

Перед заменой файлов рекомендуется сохранить копию папки Data в отдельной директории.

Cкопировать данные из C:\Program Files\Microsoft SQL Server\MSSQLXXX\MSSQL\Template Data в C:\Program Files\Microsoft SQL Server\MSSQLXXX\MSSQL\DATA

  • Remove From My Forums
  • Question

  • I have two instances of SQL on this machine, 2005 and 2008 R2.  The 2005 server starts and works fine but the 2008 R2 is giving me the above error when trying to start.

    Here is the contents of the ERRORLOG file:

    2014-07-23 11:02:34.95 Server      Microsoft SQL Server 2008 R2 (SP2) — 10.50.4000.0 (X64)

     Jun 28 2012 08:36:30
     Copyright (c) Microsoft Corporation
     Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

    2014-07-23 11:02:34.95 Server      (c) Microsoft Corporation.
    2014-07-23 11:02:34.95 Server      All rights reserved.
    2014-07-23 11:02:34.95 Server      Server process ID is 628.
    2014-07-23 11:02:34.95 Server      System Manufacturer: ‘Hewlett-Packard’, System Model: ‘HPE-500y’.
    2014-07-23 11:02:34.95 Server      Authentication mode is MIXED.
    2014-07-23 11:02:34.95 Server      Logging SQL Server messages in file ‘c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\Log\ERRORLOG’.
    2014-07-23 11:02:34.95 Server      This instance of SQL Server last reported using a process ID of 7844 at 7/23/2014 10:55:02 AM (local) 7/23/2014 4:55:02 PM (UTC). This is an informational message only; no user action is required.
    2014-07-23 11:02:34.95 Server      Registry startup parameters:

      -d c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\DATA\master.mdf
      -e c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\Log\ERRORLOG
      -l c:\Program Files\Microsoft SQL Server\MSSQL10_50.MITEK_TP\MSSQL\DATA\mastlog.ldf
    2014-07-23 11:02:34.99 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2014-07-23 11:02:34.99 Server      Detected 6 CPUs. This is an informational message; no user action is required.
    2014-07-23 11:02:35.09 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.
    2014-07-23 11:02:35.16 Server      Node configuration: node 0: CPU mask: 0x000000000000003f:0 Active CPU mask: 0x000000000000003f:0. This message provides a description of the NUMA configuration for this computer. This is an informational
    message only. No user action is required.
    2014-07-23 11:02:35.19 spid6s      Starting up database ‘master’.
    2014-07-23 11:02:35.31 spid6s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = ‘MITEK_TP’.
    2014-07-23 11:02:35.34 spid6s      SQL Trace ID 1 was started by login «sa».
    2014-07-23 11:02:35.34 spid6s      Starting up database ‘mssqlsystemresource’.
    2014-07-23 11:02:35.36 spid6s      The resource database build version is 10.50.4000. This is an informational message only. No user action is required.
    2014-07-23 11:02:35.52 spid10s     Starting up database ‘model’.
    2014-07-23 11:02:35.52 spid6s      Server name is ‘TPT\MITEK_TP’. This is an informational message only. No user action is required.
    2014-07-23 11:02:35.52 spid6s      Informational: No full-text supported languages found.
    2014-07-23 11:02:35.52 spid6s      Starting up database ‘msdb’.
    2014-07-23 11:02:35.69 Server      A self-generated certificate was successfully loaded for encryption.
    2014-07-23 11:02:35.69 Server      Error: 17182, Severity: 16, State: 1.
    2014-07-23 11:02:35.69 Server      TDSSNIClient initialization failed with error 0xffffffff, status code 0x80. Reason: Unable to initialize SSL support.

    2014-07-23 11:02:35.69 Server      Error: 17182, Severity: 16, State: 1.
    2014-07-23 11:02:35.69 Server      TDSSNIClient initialization failed with error 0xffffffff, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors.

    2014-07-23 11:02:35.69 Server      Error: 17826, Severity: 18, State: 3.
    2014-07-23 11:02:35.69 Server      Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
    2014-07-23 11:02:35.69 Server      Error: 17120, Severity: 16, State: 1.
    2014-07-23 11:02:35.69 Server      SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

Answers

  • Hi,

    According to the second link as Shanky’s post, the error is mainly caused by an incorrect protocol setting in SQL Server Configuration Manager (SSCM). Could you please try to disable the TCP/IP and Named Pipes? After that, start the SQL Server service and
    check if the error still occurs. For more details about status code 0x80, please review this similar thread:

    Install succeeds but service won’t start.

    Thanks
    Lydia Zhang

    • Marked as answer by

      Friday, July 25, 2014 10:24 PM

SQL Server is a popular relational database management system developed by Microsoft. It is widely used in businesses, government institutions, and non-profit organizations due to its reliability, scalability and security features. However, sometimes SQL Server may encounter issues that prevent it from starting, resulting in the error «Windows could not start the SQL Server (MSSQLSERVER) on Local Computer… (error code 3417)». This error is typically related to a problem with the database engine’s master database and can have various root causes such as corruption of system databases, misconfigured files, or problems with the Windows registry. In this article, we will provide several methods to help you fix this error and get your SQL Server up and running again.

Method 1: Restore Master Database

If you are encountering the error «Windows could not start the SQL Server (MSSQLSERVER) on Local Computer… (error code 3417)», then restoring the master database can help you fix the issue. Here’s how you can do it:

Step 1: Stop the SQL Server Service

Step 2: Copy the Master Database Files

Copy the master database files from their current location to a safe location. By default, the master database files are located in the following directory:

C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA

Step 3: Restore the Master Database

USE master;
GO

-- Set the database to single user mode
ALTER DATABASE master SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO

-- Restore the master database
RESTORE DATABASE master FROM DISK = 'C:\path\to\backup\master.bak' WITH REPLACE;
GO

-- Set the database back to multi-user mode
ALTER DATABASE master SET MULTI_USER;
GO

Step 4: Start the SQL Server Service

After following these steps, your SQL Server should start without any issues.

Method 2: Repair the Windows Registry

If you are facing the error «Windows could not start the SQL Server (MSSQLSERVER) on Local Computer… (error code 3417)» while trying to start the SQL Server, you can try repairing the Windows Registry to fix the issue. Here are the steps to do it:

  1. Press Windows Key + R on your keyboard to open the Run dialog box.

  2. Type regedit in the Run dialog box and press Enter to open the Registry Editor.

  3. Navigate to the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\Parameters

    Note: The registry key path may vary depending on the version of SQL Server installed on your machine.

  4. In the right pane, double-click on the SQLArg0 value to edit it.

  5. In the Edit String dialog box, add -m at the beginning of the string in the Value data field. For example, if the string is "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" -sMSSQLSERVER, change it to "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" -mMSSQLSERVER.

  6. Click OK to save the changes and close the Edit String dialog box.

  7. Close the Registry Editor.

  8. Restart the SQL Server service.

  9. Once the service is started, remove the -m from the SQLArg0 value in the registry key.

Here is the code example to add -m to the SQLArg0 value in the registry key:

$regPath = "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\Parameters"
$valueName = "SQLArg0"
$value = Get-ItemProperty -Path $regPath -Name $valueName
$newValue = $value."$valueName" -replace "^(.*)$", "-m$1"
Set-ItemProperty -Path $regPath -Name $valueName -Value $newValue

Here is the code example to remove -m from the SQLArg0 value in the registry key:

$regPath = "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\Parameters"
$valueName = "SQLArg0"
$value = Get-ItemProperty -Path $regPath -Name $valueName
$newValue = $value."$valueName" -replace "^-m(.*)$", "$1"
Set-ItemProperty -Path $regPath -Name $valueName -Value $newValue

Note: Make sure to run these commands as an administrator.

Method 3: Run DBCC CHECKDB

To fix the error «Windows could not start the SQL Server (MSSQLSERVER) on Local Computer… (error code 3417)» using «Run DBCC CHECKDB», follow these steps:

  1. Open SQL Server Management Studio.
  2. Connect to the instance of SQL Server that you need to repair.
  3. Open a new query window.
  4. Type the following command and press Enter:
  1. Type the following command and press Enter:
ALTER DATABASE [YourDatabaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
  1. Type the following command and press Enter:
DBCC CHECKDB ([YourDatabaseName], REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;
GO

Note: Replace [YourDatabaseName] with the name of the database that you need to repair.

  1. Type the following command and press Enter:
ALTER DATABASE [YourDatabaseName] SET MULTI_USER;
GO
  1. Close the query window.

Now, try to start the SQL Server service again. If the error persists, you may need to try other methods to fix the issue.

Note: The «REPAIR_ALLOW_DATA_LOSS» option is used to repair the errors found in the database. However, this option may result in data loss. Therefore, it is recommended to take a backup of the database before running this command.

Method 4: Rebuild System Databases

If you encounter the error «Windows could not start the SQL Server (MSSQLSERVER) on Local Computer… (error code 3417)» while trying to start SQL Server, you can try to fix it by rebuilding the system databases. Here are the steps:

  1. Stop SQL Server service.
  1. Open Command Prompt as administrator.

  2. Navigate to the SQL Server instance’s Binn folder.

cd C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn
  1. Run the following command to rebuild the system databases:
sqlservr.exe -c -m -T3608
  1. Once the rebuild is complete, stop SQL Server service.
  1. Restart SQL Server service.
  1. Open SQL Server Management Studio and connect to the instance.

  2. Execute the following command to reset the password for the sa account:

ALTER LOGIN sa WITH PASSWORD='new_password'
  1. Restart SQL Server service.
net stop MSSQLSERVER
net start MSSQLSERVER
  1. Try to connect to the instance using SQL Server Management Studio.

If you still encounter the error, you may need to check the SQL Server error log for more information.

Method 5: Repair or Reinstall SQL Server

If you are encountering the error code 3417 when trying to start the SQL Server (MSSQLSERVER) on your local machine, you can try to fix it by repairing or reinstalling SQL Server. Here are the steps to do it:

  1. Close all running applications and stop all SQL Server services. You can do this by opening the Services app, selecting all SQL Server services, and clicking on the Stop button.

  2. Go to the Control Panel and select Programs and Features. Find the SQL Server installation that you want to repair or reinstall, right-click on it, and select the Repair option. If you want to reinstall SQL Server, select the Uninstall option instead.

  3. Follow the instructions of the SQL Server Setup wizard. If you selected the Repair option, you will be prompted to choose the instance of SQL Server that you want to repair, and then to select the features that you want to repair. Make sure to select all the features that you need, including the Database Engine Services.

  4. If you selected the Uninstall option, follow the instructions to completely remove SQL Server from your machine. Then, download the latest version of SQL Server from the official website and install it again.

  5. After the repair or reinstallation is complete, restart your machine and try to start the SQL Server service again. If it starts successfully, you should be able to connect to your databases and perform your tasks as usual.

Here are some sample code snippets that you can use to stop and start SQL Server services:

Get-Service -Name "MSSQL*" | Stop-Service -Force

Get-Service -Name "MSSQL*" | Start-Service
REM Stop all SQL Server services
net stop MSSQLSERVER
net stop MSSQL$SQLEXPRESS

REM Start all SQL Server services
net start MSSQLSERVER
net start MSSQL$SQLEXPRESS

Remember to replace «MSSQLSERVER» and «MSSQL$SQLEXPRESS» with the names of your SQL Server services, if they are different.

Windows is a widely used operating system that has many features to offer. One of its most popular features is the Microsoft SQL Server. The SQL Server is a database management system that is used to store and retrieve data. It is necessary for many applications and services to run properly. However, one problem that Windows users often encounter is the error message «Windows could not start the SQL Server on local computer».

This error message means that the SQL Server service is not starting properly. There can be many reasons for this error, such as incorrect configuration or missing files. To solve this error, we will outline several troubleshooting steps that can help resolve the issue.

Step 1: Check the SQL Server configuration

The configuration of the SQL Server is critical for it to function properly. Often, simple mistakes in the configuration can prevent the SQL Server service from starting. To check the configuration, follow the steps below:

  1. Click on the «Start» button and type «Services» in the search box.

  2. Click on «Services» in the search results to open the Services window.

  3. Locate the SQL Server service in the list of services.

  4. Right-click on the SQL Server service and select «Properties».

  5. Check to see if the Startup Type is set to «Automatic».

  6. If the Startup Type is not set to «Automatic», change it to «Automatic».

  7. Click on the «Apply» button to save the changes.

Step 2: Check if the SQL Server service is running

If the SQL Server service is not running, it could cause the error message. To check if the service is running, follow the steps below:

  1. Click on the «Start» button and type «Services» in the search box.

  2. Click on «Services» in the search results to open the Services window.

  3. Locate the SQL Server service in the list of services.

  4. Check to see if the SQL Server service is running.

  5. If the SQL Server service is not running, right-click on it and select «Start».

  6. Wait for the service to start and try to start the SQL Server again.

Step 3: Check the SQL Server error log

The SQL Server error log can provide valuable information about the cause of the error message. To access the SQL Server error log, follow the steps below:

  1. Click on the «Start» button and type «Event Viewer» in the search box.

  2. Click on «Event Viewer» in the search results to open the Event Viewer.

  3. Double-click on «Windows Logs» in the left pane.

  4. Click on «Application» in the left pane to view the Application log.

  5. Look for any errors related to the SQL Server in the list of events in the right pane.

  6. Review the error message and try to fix the issue based on the information provided.

Step 4: Reinstall the SQL Server

If none of the above steps work, it may be necessary to reinstall the SQL Server. To reinstall the SQL Server, follow the steps below:

  1. Click on the «Start» button and type «Programs and Features» in the search box.

  2. Click on «Programs and Features» in the search results to open the Programs and Features window.

  3. Locate the SQL Server in the list of programs.

  4. Right-click on the SQL Server and select «Uninstall».

  5. Follow the instructions to uninstall the SQL Server.

  6. Download the latest version of the SQL Server from the Microsoft website.

  7. Install the SQL Server on your computer.

  8. Restart your computer and try to start the SQL Server.

Conclusion

Windows could not start the SQL Server on local computer is a common error message that Windows users encounter. However, it is a problem that can be easily fixed by following the troubleshooting steps outlined above. By checking the SQL Server configuration, ensuring the SQL Server service is running, reviewing the SQL Server error log, and reinstalling the SQL Server, Windows users should be able to resolve the issue and have the SQL Server running smoothly once again.

here are some additional information and details about the previous topics mentioned in the article:

SQL Server Configuration

The SQL Server configuration is critical for it to function properly. When installing the SQL Server, it is important to ensure that the settings and configurations are correctly set. Incorrect configurations can cause many issues, including the one where Windows could not start the SQL Server on local computer error message. The SQL Server Configuration Manager is a tool that can be used to manage and configure the SQL Server services, including changing the startup type of the services, setting the account to run the services, and managing the SQL Server network settings.

SQL Server Service

The SQL Server service is responsible for starting and managing the SQL Server on the local computer. When the service is not running, then the SQL Server will not function properly. There are various reasons why the service may not be running, including incorrect settings, missing files, or corrupted system files. To ensure that the service is running, it is recommended to check the SQL Server service in the Services window and verify if it is set to Automatic and start the service if it is not running.

SQL Server Error Log

The SQL Server error log is a log file that stores information about the SQL Server and its related components, such as the SQL Server Agent and Database Engine Service. The error log can provide valuable information about the cause of the error message, including the time and date of the event, the error message itself, and the severity level of the error. The information contained in the SQL Server error log can help troubleshoot and resolve issues related to the SQL Server. It is recommended to review the SQL Server error log when encountering the Windows could not start the SQL Server on local computer error message.

Reinstalling SQL Server

When all else fails, it may be necessary to reinstall the SQL Server on the local computer. Reinstalling the SQL Server involves uninstalling the existing SQL Server and then installing a fresh copy. Care should be taken when uninstalling the SQL Server to ensure that all the data and files are backed up. It is also recommended to download the latest version of the SQL Server from the Microsoft website to ensure that the SQL Server will function optimally.

In conclusion, troubleshooting and resolving the Windows could not start the SQL Server on local computer error message can be accomplished by checking the SQL Server configuration, ensuring the SQL Server service is running, reviewing the SQL Server error log, and reinstalling the SQL Server. By following the steps outlined above, users can ensure that their SQL Server is running smoothly and avoid encountering the same error message in the future.

Popular questions

  1. What does the error message «Windows could not start the SQL Server on local computer» mean?

Answer: This error message means that the SQL Server service is not starting properly on the local computer.

  1. What are some reasons why the SQL Server service may not be starting?

Answer: There can be many reasons for this error, such as incorrect configuration or missing files. Other possible reasons include improper installation or faulty hardware.

  1. How can I check the SQL Server configuration?

Answer: To check the configuration of the SQL Server, follow these steps:

  • Click on the «Start» button and type «Services» in the search box.
  • Click on «Services» in the search results to open the Services window.
  • Locate the SQL Server service in the list of services.
  • Right-click on the SQL Server service and select «Properties».
  • Check to see if the Startup Type is set to «Automatic».
  • If the Startup Type is not set to «Automatic», change it to «Automatic».
  • Click on the «Apply» button to save the changes.
  1. What should I do if the SQL Server service is not running?

Answer: If the SQL Server service is not running:

  • locate it in the list of services
  • right-click on it, and select «Start»
  1. Should I reinstall the SQL Server if all other troubleshooting methods fail?

Answer: If all other troubleshooting methods fail, it may be necessary to reinstall the SQL Server. However, this should be considered a last resort since it involves uninstalling the existing SQL Server and then installing a fresh copy. Care should be taken when uninstalling the SQL Server to ensure that all the data and files are backed up.

Tag

Error

  • Windows could not prepare the computer to boot into the next phase of installation
  • Windows create file cmd windows
  • Windows could not start because the following file is missing or corrupt ntoskrnl exe
  • Windows create bootable usb from iso
  • Windows create a symbolic link