How to Fix SQL Server Error 17148 (Msg 17148)
You see sql server error 17148 when Service Control Manager tells the database engine to stop. To fix unplanned stops, check Windows system logs to find which user or task sent the stop signal. This event is message 17148 with a severity level of 10. It is an info message, not a database crash or data corruption failure. The database engine writes this log entry to show a clean shutdown started from outside SQL Server. What causes sql server error 17148 in production The official message sta
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 see sql server error 17148 when Service Control Manager tells the database engine to stop. To fix unplanned stops, check Windows system logs to find which user or task sent the stop signal.
This event is message 17148 with a severity level of 10. It is an info message, not a database crash or data corruption failure. The database engine writes this log entry to show a clean shutdown started from outside SQL Server.
What causes sql server error 17148 in production
The official message states that SQL Server is stopping due to a Service Control Manager stop request. Service Control Manager is the Windows component that starts and stops system services. When it sends a stop signal, the database engine rolls back active work and shuts down.
Planned maintenance is the most common cause of this log message. A system admin might stop the service through a management tool or a scheduled script. Automated patching tools also stop the database service before they install Windows updates or reboot the host.
Unplanned stops happen when backup tools, cluster managers, or monitoring scripts misfire. A bad script might trigger a service restart during peak business hours. Another admin logged into the Windows host might also stop the wrong instance by mistake.
How to diagnose and fix unexpected stop requests
Start by checking the SQL Server error log right around the time of message 17148. Look at the timestamps to see when the shutdown started and finished. Next, open the Windows Event Viewer on the host machine to find the matching system event.
Check the System log and the Security log at that exact timestamp. The Windows logs show the account name and process that asked Service Control Manager to stop the service. Once you find the account or task, you can fix the schedule or revoke host rights.
If a human user stopped the service by mistake, review your server permission model. Admins often log into the Windows host only because they need to run a quick database check. You can stop this habit by giving them scoped database accounts instead of full host rights.
Kubernetes API Server Access + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
In SQL Server, a database user is the identity of a login when it connects to a database. For people who need access to many databases on an instance, a SQL user with a master login works well. For one or a few databases, a contained database user with its own password is an option.
An admin must first enable contained databases on the server and the database. You can then assign fixed database roles to limit what each person can do. Note that you cannot change the permissions assigned to fixed database roles.
For example, the fixed owner role can run all maintenance tasks and can drop the database. Do not grant that role to people who only need to inspect tables or check data. Instead, use the fixed data reader role so members can only read data from user tables and views.
How to prevent unplanned service stops
Lock down who can log into the Windows server and touch Service Control Manager. Only core platform ops staff and verified patching tools should hold rights to stop Windows services. Remove local admin rights from developers and analysts who only query data.
Review all scheduled tasks, backup jobs, and host scripts that interact with the database service. Make sure automated OS patching runs only inside approved maintenance windows. When fewer people and scripts can touch the host service, unexpected stops go away.
Check SQL Server batches and results on the wire
SQL Server logins and roles decide who connects. They do not check what each TDS batch does or mask sensitive values in returned rows. With hoop.dev, you run an open-source proxy, a sidecar for your SQL Server, inline in the TDS wire protocol. On every batch an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
Before a batch hits the server, hoop.dev guardrails refuse disallowed actions with a native TDS error or hold risky statements for approval. On the way back, hoop.dev data masking rewrites sensitive values in supported result columns in memory, and every decision is logged. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Is sql server error 17148 a database crash?
No, message 17148 has a severity level of 10, which means it is an informational message. It proves that the database engine received a clean stop command from Windows Service Control Manager.
How do I find out who stopped the SQL Server service?
Match the timestamp of message 17148 in your SQL log with the Windows Event Viewer System log. The Windows log records the exact user account or system process that sent the stop request.
Can a SQL query trigger message 17148?
A normal query cannot trigger this specific message because it comes from Service Control Manager. Keep host service permissions separate from database roles so normal users cannot stop the Windows service.
Related guides
In this post