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/availability-groups/windows/enable-and-disable-always-on-availability-groups-sql-server.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Enable and Disable Always On Availability Groups (SQL Server) | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "05/17/2016"
4
+
ms.date: "08/30/2017"
5
5
ms.prod: "sql-server-2016"
6
6
ms.reviewer: ""
7
7
ms.suite: ""
@@ -146,22 +146,22 @@ manager: "jhubbard"
146
146
147
147
1. Change directory (**cd**) to a server instance that you want to enable for Always On Availability Groups.
148
148
149
-
2. Use the **Enable-SqlAlways On** cmdlet to enable Always On Availability Groups.
149
+
2. Use the **Enable-SqlAlwaysOn** cmdlet to enable Always On Availability Groups.
150
150
151
151
To view the syntax of a cmdlet, use the **Get-Help** cmdlet in the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] PowerShell environment. For more information, see [Get Help SQL Server PowerShell](../../../relational-databases/scripting/get-help-sql-server-powershell.md).
152
152
153
153
> [!NOTE]
154
-
> For information about how to control whether the **Enable-SqlAlways On** cmdlet restarts the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] service, see [When Does a Cmdlet Restart the SQL Server Service?](#WhenCmdletRestartsSQL), later in this topic.
154
+
> For information about how to control whether the **Enable-SqlAlwaysOn** cmdlet restarts the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] service, see [When Does a Cmdlet Restart the SQL Server Service?](#WhenCmdletRestartsSQL), later in this topic.
155
155
156
156
**To set up and use the SQL Server PowerShell provider**
157
157
158
158
- [SQL Server PowerShell Provider](../../../relational-databases/scripting/sql-server-powershell-provider.md)
159
159
160
-
#### <a name="ExmplEnable-SqlHadrServic"></a> Example: Enable-SqlAlways On
## <a name="DisableAOAG"></a> Disable Always On Availability Groups
@@ -208,16 +208,16 @@ Enable-SqlAlways On -Path SQLSERVER:\SQL\Computer\Instance
208
208
209
209
1. Change directory (**cd**) to a currently-enabled server instance that that you want to disenable for Always On Availability Groups.
210
210
211
-
2. Use the **Disable-SqlAlways On** cmdlet to enable Always On Availability Groups.
211
+
2. Use the **Disable-SqlAlwaysOn** cmdlet to enable Always On Availability Groups.
212
212
213
213
For example, the following command disables Always On Availability Groups on an instance of SQL Server (*Computer*\\*Instance*). This command requires restarting the instance, and you will be prompted to confirm this restart.
214
214
215
215
```
216
-
Disable-SqlAlways On -Path SQLSERVER:\SQL\Computer\Instance
> For information about how to control whether the **Disable-SqlAlways On** cmdlet restarts the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] service, see [When Does a Cmdlet Restart the SQL Server Service?](#WhenCmdletRestartsSQL), later in this topic.
220
+
> For information about how to control whether the **Disable-SqlAlwaysOn** cmdlet restarts the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] service, see [When Does a Cmdlet Restart the SQL Server Service?](#WhenCmdletRestartsSQL), later in this topic.
221
221
222
222
To view the syntax of a cmdlet, use the **Get-Help** cmdlet in the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] PowerShell environment. For more information, see [Get Help SQL Server PowerShell](../../../relational-databases/scripting/get-help-sql-server-powershell.md).
223
223
@@ -226,7 +226,7 @@ Enable-SqlAlways On -Path SQLSERVER:\SQL\Computer\Instance
226
226
- [SQL Server PowerShell Provider](../../../relational-databases/scripting/sql-server-powershell-provider.md)
227
227
228
228
### <a name="FollowUp"></a> Follow Up: After Disabling Always On
229
-
After you disable Always On Availability Groups, the instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] must be restarted. SQL Configuration Manager restarts the server instance automatically. However, if you used the **Disable-SqlAlways On** cmdlet, you will need to restart the server instance manually. For more information, see [sqlservr Application](../../../tools/sqlservr-application.md).
229
+
After you disable Always On Availability Groups, the instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] must be restarted. SQL Configuration Manager restarts the server instance automatically. However, if you used the **Disable-SqlAlwaysOn** cmdlet, you will need to restart the server instance manually. For more information, see [sqlservr Application](../../../tools/sqlservr-application.md).
230
230
231
231
On the restarted server instance:
232
232
@@ -247,7 +247,7 @@ Enable-SqlAlways On -Path SQLSERVER:\SQL\Computer\Instance
247
247
4. The secondary databases enter the RESTORING state. You can delete them, or you can restore them by using RESTORE WITH RECOVERY. However, restored databases are no longer participating in availability-group data synchronization.
248
248
249
249
## <a name="WhenCmdletRestartsSQL"></a> When Does a Cmdlet Restart the SQL Server Service?
250
-
On a server instance that is currently running, using **Enable-SqlAlways On** or **Disable-SqlAlways On** to change the current Always On setting could cause the SQL Server service to restart. The restart behavior on depends on the following conditions:
250
+
On a server instance that is currently running, using **Enable-SqlAlwaysOn** or **Disable-SqlAlwaysOn** to change the current Always On setting could cause the SQL Server service to restart. The restart behavior on depends on the following conditions:
251
251
252
252
|-NoServiceRestart parameter specified|-Force parameter specified|Is the [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] service restarted?|
Copy file name to clipboardExpand all lines: docs/database-engine/availability-groups/windows/overview-of-powershell-cmdlets-for-always-on-availability-groups-sql-server.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Overview of PowerShell Cmdlets for Always On Availability Groups (SQL Server) | Microsoft Docs"
|**Disable-SqlAlways On**|Disables the [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] feature on a server instance.|The server instance that is specified by the **Path**, **InputObject**, or **Name** parameter. (Must be an edition of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] that supports [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)].)|
54
-
|**Enable-SqlAlways On**|Enables [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] on an instance of [!INCLUDE[ssCurrent](../../../includes/sscurrent-md.md)] that supports the [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] feature. For information about support for [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)], see [Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/prereqs-restrictions-recommendations-always-on-availability.md).|Any edition of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] that supports [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)].|
53
+
|**Disable-SqlAlwaysOn**|Disables the [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] feature on a server instance.|The server instance that is specified by the **Path**, **InputObject**, or **Name** parameter. (Must be an edition of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] that supports [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)].)|
54
+
|**Enable-SqlAlwaysOn**|Enables [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] on an instance of [!INCLUDE[ssCurrent](../../../includes/sscurrent-md.md)] that supports the [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] feature. For information about support for [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)], see [Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/prereqs-restrictions-recommendations-always-on-availability.md).|Any edition of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] that supports [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)].|
55
55
|**New-SqlHadrEndPoint**|Creates a new database mirroring endpoint on a server instance. This endpoint is required for data movement between primary and secondary databases.|Any instance of [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]|
56
56
|**Set-SqlHadrEndpoint**|Changes the properties of an existing database mirroring endpoint, such as the name, state, or authentication properties.|A server instance that supports [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] and lacks a database mirroring endpoint|
0 commit comments