Skip to content

Latest commit

 

History

History
95 lines (71 loc) · 2.41 KB

File metadata and controls

95 lines (71 loc) · 2.41 KB

DSC Resource 'SqlAlwaysOnServices'

SqlAlwaysOnServices enables or disables SQL Server Always On HADR (High Availability and Disaster Recovery) services on an instance.

When to use 'SqlAlwaysOnServices'

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

Requirements
  • 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.

Table 1. Attributes of category 'SqlAlwaysOnServices'
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 (Present) or removed (Absent).

  • Present (default)

  • Absent

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: 120

Example
SqlAlwaysOnServices:
  ServerName: SQL1
  SqlInstanceName: MSSQLSERVER
  RestartTimeout: 120