Skip to content

Latest commit

 

History

History
140 lines (109 loc) · 3.58 KB

File metadata and controls

140 lines (109 loc) · 3.58 KB

DSC Resource 'SqlConfigurations'

SqlConfigurations manages SQL Server instance configuration options (sp_configure settings).

When to use 'SqlConfigurations'

Use this resource when you need to configure SQL Server instance-level settings such as max memory, cost threshold for parallelism, max degree of parallelism, or any other sp_configure option. These settings affect the overall behavior and performance of the SQL Server instance.

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.

Table 1. Attributes of category 'SqlConfigurations'
Parameter Attribute DataType Description Allowed Values

DefaultInstanceName

String

Default SQL InstanceName
If the InstanceName of an option is not explicitly set, the DefaultInstanceName will be used.

Default: MSSQLSERVER

Options

Mandatory

Hashtable[]

List of SQL Server Configuration Options on a SQL Server instance.

Table 2. Attributes of category 'SqlConfigurations/Options'
Parameter Attribute DataType Description Allowed Values

InstanceName

Key

String

Name of the SQL Server instance to be configured.

If not specified the value of DefaultInstanceName is used as default.

OptionName

Key

String

The name of the SQL Server Database Engine instance configuration option.

For all possible values reference the article Server Configuration Options (SQL Server) or run sp_configure.

OptionValue

Mandatory

SInt32

The desired value of the configuration option.

ServerName

String

The hostname of the SQL Server to be configured.

Default: current computer name.

RestartService

Boolean

Determines whether the instance should be restarted after updating the configuration option.

  • True

  • False (default)

RestartTimeout

UInt32

The length of time, in seconds, to wait for the service to restart.

Default: 120

Example
SqlConfiguration:
  DefaultInstanceName: MSSQLSERVER
  Options:
  - InstanceName:   SecondInstance
    OptionName:     max degree of parallelism
    OptionValue:    1
    RestartService: true
  - OptionName:     max degree of parallelism
    OptionValue:    2
  - OptionName:     backup compression default
    OptionValue:    1