SqlAlwaysOnServices enables or disables SQL Server Always On HADR (High Availability and Disaster Recovery) services on an instance.
Use this resource when you need to enable Always On as a feature on a SQL Server instance. This is a prerequisite step before creating Availability Groups with SqlAGs. It requires a Windows Failover Cluster (configured via FailoverCluster) and a SQL Server restart.
Source |
|
DSC Resource |
|
Documentation |
-
Target machine must be running Windows Server 2012 or later.
-
Target machine must be running SQL Server Database Engine 2012 or later.
-
Target machine must be a member of a Windows Server Failover Cluster.
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
SqlInstanceName |
String |
The name of the SQL Server instance to be configured. |
||
Ensure |
String |
Determines whether the Always On service should be added ( |
|
|
ServerName |
String |
The host name of the SQL Server to be configured. Default value is the current computer name. |
||
RestartTimeout |
Int |
The length of time, in seconds, to wait for the service to restart. |
Default: |
SqlAlwaysOnServices:
ServerName: SQL1
SqlInstanceName: MSSQLSERVER
RestartTimeout: 120