How to Fix SQL Server Error 17112 (Msg 17112)
You get sql server error 17112 when the engine reads an invalid startup option. To fix it, correct or remove that option from the registry or command prompt. This failure holds a severity level of 16 in the database engine. It stops the service from starting until an admin fixes the bad startup string. The error text names the exact string that caused the service to fail. What causes sql server error 17112 The database engine reads startup rules before it opens any system databases. Admins p
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You get sql server error 17112 when the engine reads an invalid startup option. To fix it, correct or remove that option from the registry or command prompt.
This failure holds a severity level of 16 in the database engine. It stops the service from starting until an admin fixes the bad startup string. The error text names the exact string that caused the service to fail.
What causes sql server error 17112
The database engine reads startup rules before it opens any system databases. Admins pass these rules through the system registry or a command prompt start. If one rule has a typo, the engine throws message 17112 right away.
The official message says an invalid startup option was supplied to the server. It tells you to check the registry or the command prompt for errors. Then you must correct or remove the bad option to start the server.
Most cases happen after manual edits to the service startup list. A stray space, a missing dash, or a wrong letter will break the start. Sometimes a team copies startup text from a web page with bad characters. Other times, an old script passes an option that the engine does not know.
Because the engine halts early, no user can log in to the database. Apps will see timeouts because the server process is not running at all. You must fix the host service settings before the database can run again.
How to find and fix the bad startup option
Start by reading the text log on the host machine or event viewer. Look for the message code 17112 and note the string inside the quotes. That string is the exact value that the engine rejected during start.
Next, check how your team starts the database service on that host. If an admin ran it from a command prompt, check the typed line. Remove the bad text from the command and run the start task again.
Kubernetes API Server Access + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
If the service starts on its own, check the host service manager tool. Look at the list of startup options saved in the system registry. Compare each entry against the bad string shown in the error log. Fix the typo or delete the broken entry, then start the service.
Keeping database permissions safe during repairs
When a server fails to start, teams often rush and grant wide rights. Avoid giving every engineer full admin rights on the database or host. Once the service runs again, use strict roles for daily database checks.
In SQL Server, a database user is the identity of a login inside a database. People who need many databases often use a login in the master database. For one or a few databases, a contained database user is an option. An admin must enable contained databases on the server and database first.
Use fixed roles to keep data safe when engineers inspect the live system. Members of the datareader role can read all data from user tables and views. Members of the datawriter role can add, delete, or change table data. Never use the owner role for basic checks, as it can drop the database. Note that you cannot change the permissions assigned to fixed database roles.
You should also protect sensitive fields when engineers run queries after a fix. Data masking can rewrite matched fields like emails, phone numbers, and card numbers. This keeps private values safe while engineers check table rows and test apps.
Govern SQL Server queries and responses in flight
Table grants decide which SQL Server objects a caller may touch. They do not check query intent or rewrite sensitive values in results across every client and agent. By design, hoop.dev sits inline in the TDS wire protocol next to SQL Server as a sidecar for your SQL Server. On every production batch from an engineer or AI agent, hoop.dev decides to pass, mask, block, or hold it for approval.
With hoop.dev guardrails and hoop.dev data masking, banned statements are refused or held for review, matched sensitive fields in supported result columns are masked in memory, and each decision is logged. Check out the code on GitHub.
Frequently asked questions
What does severity 16 mean for message 17112?
Severity 16 marks errors that the user or admin can fix directly. For message 17112, it means the admin must fix the bad startup option.
Where do I find the exact option that caused the error?
Check the Windows event log or the SQL Server error log file. The message prints the bad startup string inside single quotes for easy spotting.
Do I need the database owner role to check tables after recovery?
No, the owner role has full control and can even drop the database. Use the datareader role instead to read user tables and views safely.
Related guides
In this post