Не удалось запустить службу 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 FilesMicrosoft SQL ServerMSSQL10_50.SQLEXPRESSMSSQLDATA нет необходимых файлов. Необходимо добавить с заменой файлы из папки C:Program FilesMicrosoft SQL ServerMSSQL10_50.SQLEXPRESSMSSQLTemplateData.
Код ошибки 3417
Решение:
Перед заменой файлов рекомендуется сохранить копию папки Data в отдельной директории.
Cкопировать данные из C:Program FilesMicrosoft SQL ServerMSSQLXXXMSSQLTemplate Data в C:Program FilesMicrosoft SQL ServerMSSQLXXXMSSQLDATA
Для 64-разрядных систем — C:Program Files (x86)Microsoft SQL ServerMSSQLXXXMSSQLTemplate Data в C:Program Files (x86)Microsoft SQL ServerMSSQLXXXMSSQLDATA
Если замена файлов не помогла, необходимо дать права на папку Microsoft SQL Server.
Код ошибки 17058
Решение:
Необходимо дать полные права на папки C:Program FilesMicrosoft SQL Server и C:Program Files (x86)Microsoft SQL Server. Если данное решение не поможет — в свойствах службы на вкладке Вход в систему поставьте флаг С системной учетной записью.
Код ошибки 17113
Решение:
Перед заменой файлов рекомендуется сохранить копию папки Data в отдельной директории.
Cкопировать данные из C:Program FilesMicrosoft SQL ServerMSSQLXXXMSSQLTemplate Data в C:Program FilesMicrosoft SQL ServerMSSQLXXXMSSQLDATA
title | description | ms.date | author | ms.author | ms.reviewer |
---|---|---|---|---|---|
Error 17113 when you start SQL Server service |
Provides resolutions for the Error 17113 problem that occurs when you start SQL Server service. |
12/17/2021 |
HaiyingYu |
haiyingyu |
ramakoni |
Service-specific error 17113 when you start SQL Server service
Applies to: SQL Server
Symptoms
In Microsoft SQL Server, the master
database records all the system-level information. The master
database also records the existence of all other databases, the location of those database files, and the initialization information for SQL Server. Therefore, SQL Server cannot start if the master
database is unavailable.
When you try to start SQL Server in this scenario, the SQL Server service doesn’t start, and you receive one of the following error messages depending on how you try to start the service:
-
By using the Services applet:
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 17113.
-
By using a command prompt:
C:\>NET START MSSQLSERVER The SQL Server (MSSQLSERVER) service is starting. The SQL Server (MSSQLSERVER) service could not be started. A service specific error occurred: 17113. More help is available by typing NET HELPMSG 3547.
Resolution
-
Check SQL Server error log and verify that the cause is the inaccessibility of the
master
database. For example, you might see a log entry that resembles the following:<Datetime> Server Error: 17113, Severity: 16, State: 1. <Datetime> Server Error 2(The system cannot find the file specified.) occurred while opening file 'C:Program FilesMicrosoft SQL ServerMSSQL15.MSSQLSERVERMSSQLDATAmaster.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.
-
Verify the location of the master.mdf file. If the path is incorrect, fix the path by using SQL Server Configuration Manager or Registry Editor.
-
By using SQL Server Configuration Manager:
Select Start, point to All Programs, point to Microsoft SQL Server, point to Configuration Tools, and then select SQL Server Configuration Manager.
[!NOTE]
Because SQL Server Configuration Manager is a snap-in for the Microsoft Management Console program and not a standalone program, SQL Server Configuration Manager does not appear as an application in newer versions of Windows. To open SQL Server Configuration Manager in Windows 11, 10, or 8, follow these steps for your version of Windows.-
Windows 10 and 11:
- Select Start Page, enter SQLServerManager13.msc (for SQL Server 2016 (13.x)). For different versions of SQL Server, replace 13 with the appropriate number.
- Select SQLServerManager13.msc to open the Configuration Manager. To pin the Configuration Manager to the Start Page or Task Bar, right-click SQLServerManager13.msc, and then select Open file location.
- In the Windows File Explorer, right-click SQLServerManager13.msc, and then select Pin to Start or Pin to taskbar.
-
Windows 8:
Press Windows logo key+Q to open the Search charm. Under Apps, enter SQLServerManager<version_number>.msc (for example, SQLServerManager13.msc), and then press Enter.
-
In SQL Server Configuration Manager, select SQL Server Services.
-
In the right pane, right-click SQL Server (<instance_name>), and then select Properties.
-
On the Startup Parameters tab, select the row that starts with -d in the Existing Parameters section. The current value is editable. Specify a startup parameter box. Fix the path to reflect the correct value, select Update, and then select OK to save the changes.
-
Restart the SQL Server service.
-
For more information regarding configuring startup options, see Configure Server Startup Options (SQL Server Configuration Manager).
-
For more information regarding database engine service startup options, see Database Engine Service Startup Options.
-
-
By using Registry Editor:
-
Navigate to the
HKLMSoftwareMicrosoftMicrosoftSQL ServerMSSQL{nn}.MyInstance
hive for your SQL server instance. -
Locate the SQLArg0 value under
MSSQLServerParameters
. -
Change the value to reflect the correct path for the
master
database. -
Restart the SQL Server Service.
-
-
-
If the
master
database does exist but is unusable you can return the database to a usable state by using one of the following methods:-
Check the permissions for the service account on the folder where the file is located.
-
Restore the master database from a full database backup — if you can start the server instance.
-
If server damage to the
master
database prevents you from starting SQL Server, rebuild the master database.[!CAUTION]
Rebuilding themaster
database rebuilds all the system databases. Therefore, any user modifications to these databases will be lost.
-
- Remove From My Forums
-
Question
-
I am running into a strange error while trying to perform a master database restore.
While trying to start the Server in Single user mode I get a error 17113, the Server stas in multi user mode as expected, but using the command line
sqlservr.exe –m –s SERVERSQL1 I get the Empty message box, setting single user mode -m in the Startup Parameters for SQL Server also fails with the following message in the sql log2013-04-12 18:33:47.46 Server Registry startup parameters:
-m -dE:SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmaster.mdf
-e E:SQL_DataSQL1MSSQL10_50.SQL1MSSQLLogERRORLOG
-l E:SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmastlog.ldf
2013-04-12 18:33:47.46 Server Error: 17113, Severity: 16, State: 1.
2013-04-12 18:33:47.46 Server Error 3(failed to retrieve text for this error. Reason: 15100) occurred while opening file ‘master.mdf’ to obtain configuration information at startup. An invalid startup option might have caused the
error. Verify your startup options, and correct or remove them if necessary.The -f option gives similar behaviour, the SQL Server is a fresh install over a previouly uninstalled SQL Server.
Answers
-
The registry startup parameters are sensitive to extra spaces, and so the reported parameters in the log are not necessarily the ones you are actually using. And the UI for setting them before SQL 2012 is horrible and allowed you to insert hard-to-find
extraneous spaces.To start the SQL Service in single user mode, but not in the console window use the /m switch on NET START:
net start mssqlserver /m
You can also restrict the client app name to ensure that you can be the one user:
net start mssqlserver /mSQLCMD
Will start the service in single user mode, and only accept connections from the SQLCMD program.
David
David http://blogs.msdn.com/b/dbrowne/
-
Proposed as answer by
Friday, April 12, 2013 3:55 PM
-
Edited by
davidbaxterbrowneMicrosoft employee
Friday, April 12, 2013 3:56 PM -
Marked as answer by
Olaf HelperMVP
Saturday, April 20, 2013 4:38 PM
-
Proposed as answer by
-
* -dE:*SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmaster.mdf
* -d E:*SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmaster.mdf
The only difference I see is in the log: A (missing) space Parameter -d and the file Name; but even with this it should work. Very strange.
No, that is the very issue. When you see something like that in the SQL Server error log, you know that the option is not interpreted as intended. This is how it looks in the errorlog on my instance:
2013-04-12 23:52:50.97 Server Registry startup parameters:
-m
-d C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATAmaster.mdf
-e C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLLogERRORLOG
-l C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATAmastlog.ldfNote that every option is on its own line. David did something wrong when he entered the -m option. Maybe he forgot to add a semicolon to the option, so that -d and everthing that follows it became an argument to -m and then it went downhill from there.
The dialog for adding startup parameters in SQL 2005 and SQL 2008 is very error-prone as you easily can miss a semicolon, and a space too many or whatever. And reading the full string is difficult. Thankfully, the SQL 2012 Configuration Manager, there is
a dialog similar to what we had in SQL 2000.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
-
Marked as answer by
Olaf HelperMVP
Saturday, April 20, 2013 4:38 PM
-
Marked as answer by
- Remove From My Forums
-
Question
-
I am running into a strange error while trying to perform a master database restore.
While trying to start the Server in Single user mode I get a error 17113, the Server stas in multi user mode as expected, but using the command line
sqlservr.exe –m –s SERVERSQL1 I get the Empty message box, setting single user mode -m in the Startup Parameters for SQL Server also fails with the following message in the sql log2013-04-12 18:33:47.46 Server Registry startup parameters:
-m -dE:SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmaster.mdf
-e E:SQL_DataSQL1MSSQL10_50.SQL1MSSQLLogERRORLOG
-l E:SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmastlog.ldf
2013-04-12 18:33:47.46 Server Error: 17113, Severity: 16, State: 1.
2013-04-12 18:33:47.46 Server Error 3(failed to retrieve text for this error. Reason: 15100) occurred while opening file ‘master.mdf’ to obtain configuration information at startup. An invalid startup option might have caused the
error. Verify your startup options, and correct or remove them if necessary.The -f option gives similar behaviour, the SQL Server is a fresh install over a previouly uninstalled SQL Server.
Answers
-
The registry startup parameters are sensitive to extra spaces, and so the reported parameters in the log are not necessarily the ones you are actually using. And the UI for setting them before SQL 2012 is horrible and allowed you to insert hard-to-find
extraneous spaces.To start the SQL Service in single user mode, but not in the console window use the /m switch on NET START:
net start mssqlserver /m
You can also restrict the client app name to ensure that you can be the one user:
net start mssqlserver /mSQLCMD
Will start the service in single user mode, and only accept connections from the SQLCMD program.
David
David http://blogs.msdn.com/b/dbrowne/
-
Proposed as answer by
Friday, April 12, 2013 3:55 PM
-
Edited by
davidbaxterbrowneMicrosoft employee
Friday, April 12, 2013 3:56 PM -
Marked as answer by
Olaf HelperMVP
Saturday, April 20, 2013 4:38 PM
-
Proposed as answer by
-
* -dE:*SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmaster.mdf
* -d E:*SQL_DataSQL1MSSQL10_50.SQL1MSSQLDATAmaster.mdf
The only difference I see is in the log: A (missing) space Parameter -d and the file Name; but even with this it should work. Very strange.
No, that is the very issue. When you see something like that in the SQL Server error log, you know that the option is not interpreted as intended. This is how it looks in the errorlog on my instance:
2013-04-12 23:52:50.97 Server Registry startup parameters:
-m
-d C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATAmaster.mdf
-e C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLLogERRORLOG
-l C:Program FilesMicrosoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLDATAmastlog.ldfNote that every option is on its own line. David did something wrong when he entered the -m option. Maybe he forgot to add a semicolon to the option, so that -d and everthing that follows it became an argument to -m and then it went downhill from there.
The dialog for adding startup parameters in SQL 2005 and SQL 2008 is very error-prone as you easily can miss a semicolon, and a space too many or whatever. And reading the full string is difficult. Thankfully, the SQL 2012 Configuration Manager, there is
a dialog similar to what we had in SQL 2000.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
-
Marked as answer by
Olaf HelperMVP
Saturday, April 20, 2013 4:38 PM
-
Marked as answer by
Relocating SQL 2008 Std server running on Win2003 Server. Server renamed, drives remapped onto new SAN.
Service account is a Machine admin, and said account has full control of every drive letter in the machine.
Startup parameters were modified to read:
-eD:Program FilesMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLLogERRORLOG; -dE:SQLmaster.mdf; -lL:SQLmastlog.ldf
All paths are valid and I checked the permissions.
Doing a plain old NET START MSSQLSERVER yields an error 17113 with this detail:
«Error 3(The system cannot find the path specified.) occurred while opening file ‘master.mdf’ to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.»
master.mdf is in the listed folder. I even matched the case of every letter in the path. Still 17113.
NOW HERE IS the RUB!
If I do this:
net start mssqlserver /dE:SQLmaster.mdf /lL:SQLmastlog.ldf
everything starts normally.
No idea of my error. The parameters in Config manager look perfect.
Please assist. Production servers depend upon this.
Thanks
John