You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Start, stop, pause, resume, and restart SQL Server services
3
3
description: Find out how to start, stop, pause, resume, or restart various SQL Server services. See how to use Transact-SQL, PowerShell, and other tools for these actions.
4
4
author: rwestMSFT
5
5
ms.author: randolphwest
6
-
ms.date: 12/16/2022
6
+
ms.date: 02/21/2023
7
7
ms.service: sql
8
8
ms.subservice: configuration
9
9
ms.topic: conceptual
@@ -96,7 +96,7 @@ The SQL Server Configuration Manager is a snap-in for the Microsoft Management C
96
96
97
97
### <aid="configmande"></a> Start, stop, pause, resume, or restart an instance of the SQL Server Database Engine
98
98
99
-
1. Start SQL Server Configuration Manager, using the instructions above.
99
+
1. Start SQL Server Configuration Manager, using the instructions in the previous section.
100
100
101
101
1. If the **User Account Control** dialog box appears, select **Yes**.
102
102
@@ -114,7 +114,7 @@ The SQL Server Configuration Manager is a snap-in for the Microsoft Management C
114
114
115
115
### Start, stop, pause, resume, or restart the SQL Server Browser or an instance of the SQL Server Agent
116
116
117
-
1. Start SQL Server Configuration Manager, using the instructions above.
117
+
1. Start SQL Server Configuration Manager, using the instructions in the previous section.
118
118
119
119
1. If the **User Account Control** dialog box appears, select **Yes**.
120
120
@@ -125,7 +125,7 @@ The SQL Server Configuration Manager is a snap-in for the Microsoft Management C
125
125
1. Select **OK** to close the SQL Server Configuration Manager.
126
126
127
127
> [!NOTE]
128
-
> SQL Server Agent cannot be paused.
128
+
> SQL Server Agent can't be paused.
129
129
130
130
## SQL Server Management Studio
131
131
@@ -242,11 +242,11 @@ The [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] services can be st
242
242
243
243
### <aid="pauseStop"></a> Pause or stop services from the command prompt window
244
244
245
-
-To pause or stop services, modify the commands in the following ways.
245
+
To pause or stop services, modify the commands in the following ways.
246
246
247
247
- To pause a service, replace **net start** with **net pause**.
248
248
249
-
- To stop a service, replace **net start** with use **net stop**.
249
+
- To stop a service, replace **net start** with **net stop**.
250
250
251
251
## <aid="TsqlProcedure"></a> Transact-SQL
252
252
@@ -339,6 +339,20 @@ For more information about the **SHUTDOWN** statement, see [SHUTDOWN (Transact-S
339
339
$DfltInstance
340
340
```
341
341
342
+
## Check and enable disabled instances
343
+
344
+
To determine whether a SQL Server service instance is disabled, follow these steps:
345
+
346
+
1. Identify the service that you're trying to check by using the information in the [Identify the Service](start-stop-pause-resume-restart-sql-server-services.md) section.
347
+
1. In [SQL Server Configuration Manager](../../relational-databases/sql-server-configuration-manager.md), select **SQL Server Services** and then locate the service you're interested in.
348
+
1. If the value of the **Start Mode** column is set to **Other (Boot, System, Disabled or Unknown)**, it typically means the corresponding service is disabled. To enable the service, follow these steps:
349
+
350
+
a. In the Name column, right-click on the corresponding service and then switch to **Service** tab in the ***\<Service name\>* Properties** window.
351
+
352
+
b. Review the value in the **Start Mode** column and verify that it's set to **Disabled**.
353
+
354
+
c. Change the value to either **Manual** or **Automatic** per your requirements. For more information, see [Configure Server Startup Options (SQL Server Configuration Manager)](scm-services-configure-server-startup-options.md).
355
+
342
356
## <a id="ServiceController"></a> Use the ServiceController class
343
357
344
358
You can use the `ServiceController` class to programmatically control the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] service, or any other Windows service. For an example using C#, see [ServiceController Class](/dotnet/api/system.serviceprocess.servicecontroller).
0 commit comments