sqlserverdsc
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
- Puppet >= 6.0.0 < 7.0.0
Start using this module
Add this module to your Puppetfile:
mod 'dsc-sqlserverdsc', '14.2.1-0-0'
Learn more about managing modules with a PuppetfileDocumentation
sqlserverdsc
Table of Contents
Description
This is an auto-generated module, using the Puppet DSC Builder to vendor and expose the SqlServerDsc PowerShell module's DSC resources as Puppet resources. The functionality of this module comes entirely from the vendored PowerShell resources, which are pinned at v14.2.1. The PowerShell module describes itself like this:
Module with DSC resources for deployment and configuration of Microsoft SQL Server.
For information on troubleshooting to determine whether any encountered problems are with the Puppet wrapper or the DSC resource, see the troubleshooting section below.
Requirements
This module, like all auto-generated Puppetized DSC modules, relies on two important technologies in the Puppet stack: the Puppet Resource API and the puppetlabs/pwshlib Puppet module.
The Resource API provides a simplified option for writing types and providers and is responsible for how this module is structured. The Resource API ships inside of Puppet starting with version 6. While it is technically possible to add the Resource API functionality to Puppet 5.5.x, the DSC functionality has not been tested in this setup. For more information on the Resource API, review the documentation.
The module also depends on the pwshlib module. This Puppet module includes two important things: the ruby-pwsh library for running PowerShell code from ruby and the base provider for DSC resources, which this module leverages.
All of the actual work being done to call the DSC resources vendored with this module is in this file from the pwshlib module. This is important for troubleshooting and bug reporting, but doesn't impact your use of the module except that the end result will be that nothing works, as the dependency is not installed alongside this module!
Usage
You can specify any of the DSC resources from this module like a normal Puppet resource in your manifests. The examples below use DSC resources from from the PowerShellGet repository, regardless of what module you're looking at here; the syntax, not the specifics, is what's important.
For reference documentation about the DSC resources exposed in this module, see the Reference file.
# Include a meaningful title for your resource declaration
dsc_psrepository { 'Add team module repo':
dsc_name => 'foo',
# Note that we specify dsc_ensure; do NOT specify the Puppet
# ensure property, it exists only for the underlying system.
# You will always use dsc_ensure.
dsc_ensure => present,
# This location is nonsense, can be any valid folder on your
# machine or in a share, any location the SourceLocation param
# for the DSC resource will accept.
dsc_sourcelocation => 'C:\Program Files',
# You must always pass an enum fully lower-cased;
# Puppet is case sensitive even when PowerShell isn't
dsc_installationpolicy => untrusted,
}
dsc_psrepository { 'Trust public gallery':
dsc_name => 'PSGallery',
dsc_ensure => present,
dsc_installationpolicy => trusted,
}
dsc_psmodule { 'Make Ruby manageable via uru':
dsc_name => 'RubyInstaller',
dsc_ensure => present,
}
For more information about using a built module, check out our narrative documentation.
Troubleshooting
In general, there are three broad categories of problems:
- Problems with the way the underlying DSC resource works.
- Problems with the type definition, where you can't specify a valid set of properties for the DSC resource
- Problems with calling the underlying DSC resource - the parameters aren't being passed correctly or the resource can't be found
Unfortunately, problems with the way the underlying DSC resource works are something we can't help directly with. You'll need to file an issue with the upstream maintainers for the PowerShell module.
Problems with the type definition are when a value that should be valid according to the DSC resource's documentation and code is not accepted by the Puppet wrapper. If and when you run across one of these, please file an issue with the Puppet DSC Builder; this is where the conversion happens and once we know of a problem we can fix it and regenerate the Puppet modules. To help us identify the issue, please specify the DSC module, version, resource, property and values that are giving you issues. Once a fix is available we will regenerate and release updated versions of this Puppet wrapper.
Problems with calling the underlying DSC resource become apparent by comparing with . In this case, please file an issue with the puppetlabs/pwshlib module, which is where the DSC base provider actually lives. We'll investigate and prioritize a fix and update the puppetlabs/pwshlib module. Updating to the pwshlib version with the fix will immediately take advantage of the improved functionality without waiting for this module to be reconverted and published.
For specific information on troubleshooting a generated module, check the troubleshooting guide for the puppet.dsc module.
Reference
Table of Contents
Resource types
dsc_sqlag
: The DSC SqlAG resource type. Automatically generated from version 14.2.1dsc_sqlagdatabase
: The DSC SqlAGDatabase resource type. Automatically generated from version 14.2.1dsc_sqlagentalert
: The DSC SqlAgentAlert resource type. Automatically generated from version 14.2.1dsc_sqlagentfailsafe
: The DSC SqlAgentFailsafe resource type. Automatically generated from version 14.2.1dsc_sqlagentoperator
: The DSC SqlAgentOperator resource type. Automatically generated from version 14.2.1dsc_sqlaglistener
: The DSC SqlAGListener resource type. Automatically generated from version 14.2.1dsc_sqlagreplica
: The DSC SqlAGReplica resource type. Automatically generated from version 14.2.1dsc_sqlalias
: The DSC SqlAlias resource type. Automatically generated from version 14.2.1dsc_sqlalwaysonservice
: The DSC SqlAlwaysOnService resource type. Automatically generated from version 14.2.1dsc_sqlconfiguration
: The DSC SqlConfiguration resource type. Automatically generated from version 14.2.1dsc_sqldatabase
: The DSC SqlDatabase resource type. Automatically generated from version 14.2.1dsc_sqldatabasedefaultlocation
: The DSC SqlDatabaseDefaultLocation resource type. Automatically generated from version 14.2.1dsc_sqldatabasemail
: The DSC SqlDatabaseMail resource type. Automatically generated from version 14.2.1dsc_sqldatabaseobjectpermission
: The DSC SqlDatabaseObjectPermission resource type. Automatically generated from version 14.2.1dsc_sqldatabaseowner
: The DSC SqlDatabaseOwner resource type. Automatically generated from version 14.2.1dsc_sqldatabasepermission
: The DSC SqlDatabasePermission resource type. Automatically generated from version 14.2.1dsc_sqldatabaserecoverymodel
: The DSC SqlDatabaseRecoveryModel resource type. Automatically generated from version 14.2.1dsc_sqldatabaserole
: The DSC SqlDatabaseRole resource type. Automatically generated from version 14.2.1dsc_sqldatabaseuser
: The DSC SqlDatabaseUser resource type. Automatically generated from version 14.2.1dsc_sqlendpoint
: The DSC SqlEndpoint resource type. Automatically generated from version 14.2.1dsc_sqlendpointpermission
: The DSC SqlEndpointPermission resource type. Automatically generated from version 14.2.1dsc_sqllogin
: The DSC SqlLogin resource type. Automatically generated from version 14.2.1dsc_sqlmaxdop
: The DSC SqlMaxDop resource type. Automatically generated from version 14.2.1dsc_sqlmemory
: The DSC SqlMemory resource type. Automatically generated from version 14.2.1dsc_sqlpermission
: The DSC SqlPermission resource type. Automatically generated from version 14.2.1dsc_sqlprotocol
: The DSC SqlProtocol resource type. Automatically generated from version 14.2.1dsc_sqlprotocoltcpip
: The DSC SqlProtocolTcpIp resource type. Automatically generated from version 14.2.1dsc_sqlreplication
: The DSC SqlReplication resource type. Automatically generated from version 14.2.1dsc_sqlrole
: The DSC SqlRole resource type. Automatically generated from version 14.2.1dsc_sqlrs
: The DSC SqlRS resource type. Automatically generated from version 14.2.1dsc_sqlrssetup
: The DSC SqlRSSetup resource type. Automatically generated from version 14.2.1dsc_sqlscript
: The DSC SqlScript resource type. Automatically generated from version 14.2.1dsc_sqlscriptquery
: The DSC SqlScriptQuery resource type. Automatically generated from version 14.2.1dsc_sqlsecureconnection
: The DSC SqlSecureConnection resource type. Automatically generated from version 14.2.1dsc_sqlserverendpointstate
: The DSC SqlServerEndpointState resource type. Automatically generated from version 14.2.1dsc_sqlservernetwork
: The DSC SqlServerNetwork resource type. Automatically generated from version 14.2.1dsc_sqlserviceaccount
: The DSC SqlServiceAccount resource type. Automatically generated from version 14.2.1dsc_sqlsetup
: The DSC SqlSetup resource type. Automatically generated from version 14.2.1dsc_sqlwaitforag
: The DSC SqlWaitForAG resource type. Automatically generated from version 14.2.1dsc_sqlwindowsfirewall
: The DSC SqlWindowsFirewall resource type. Automatically generated from version 14.2.1
Resource types
dsc_sqlag
The DSC SqlAG resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlag
type.
dsc_automatedbackuppreference
Data type: Optional[Enum['Primary', 'SecondaryOnly', 'Secondary', 'None']]
%q{
Specifies the automated backup preference for the availability group. When creating a group the default is 'None'
.
}
dsc_availabilitymode
Data type: Optional[Enum['AsynchronousCommit', 'SynchronousCommit']]
%q{
Specifies the replica availability mode. When creating a group the default is 'AsynchronousCommit'
.
}
dsc_backuppriority
Data type: Optional[Integer[0, 4294967295]]
%q{
Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are: integers from 0
through 100
. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. When creating a group the default is 50
.
}
dsc_basicavailabilitygroup
Data type: Optional[Boolean]
%q{ Specifies the type of availability group is Basic. This is only available is SQL Server 2016 and later and is ignored when applied to previous versions. }
dsc_connectionmodeinprimaryrole
Data type: Optional[Enum['AllowAllConnections', 'AllowReadWriteConnections']]
%q{ Specifies how the availability replica handles connections when in the primary role. }
dsc_connectionmodeinsecondaryrole
Data type: Optional[Enum['AllowNoConnections', 'AllowReadIntentConnectionsOnly', 'AllowAllConnections']]
%q{ Specifies how the availability replica handles connections when in the secondary role. }
dsc_databasehealthtrigger
Data type: Optional[Boolean]
%q{ Specifies if the option Database Level Health Detection is enabled. This is only available is SQL Server 2016 and later and is ignored when applied to previous versions. }
dsc_dtcsupportenabled
Data type: Optional[Boolean]
%q{ Specifies if the option Database DTC Support is enabled. This is only available is SQL Server 2016 and later and is ignored when applied to previous versions. This can not be altered once the availability group is created and is ignored if it is the case. }
dsc_endpointhostname
Data type: Optional[String]
%q{ Specifies the hostname or IP address of the availability group replica endpoint. When creating a group the default is the instance network name. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies if the availability group should be present or absent. Default value is 'Present'
.
}
dsc_failovermode
Data type: Optional[Enum['Automatic', 'Manual']]
%q{
Specifies the failover mode. When creating a group the default is 'Manual'
.
}
dsc_failureconditionlevel
Data type: Optional[Enum['OnServerDown', 'OnServerUnresponsive', 'OnCriticalServerErrors', 'OnModerateServerErrors', 'OnAnyQualifiedFailureCondition']]
%q{ Specifies the automatic failover behavior of the availability group. }
dsc_healthchecktimeout
Data type: Optional[Integer[0, 4294967295]]
%q{
Specifies the length of time, in milliseconds, after which AlwaysOn Availability Groups declare an unresponsive server to be unhealthy. When creating a group the default is 30000
.
}
dsc_processonlyonactivenode
Data type: Optional[Boolean]
%q{ Specifies that the resource will only determine if a change is needed if the target node is the active host of the SQL Server instance. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: String
%q{ Hostname of the SQL Server to be configured. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlag
type.
dsc_instancename
namevar
Data type: String
%q{ Name of the SQL instance to be configured. }
dsc_name
namevar
Data type: String
%q{ Specifies the name of the availability group. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlagdatabase
The DSC SqlAGDatabase resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlagdatabase
type.
dsc_backuppath
Data type: String
%q{ The path used to seed the availability group replicas. This should be a path that is accessible by all of the replicas. }
dsc_databasename
Data type: Array[String]
%q{ The name of the database(s) to add to the availability group. This accepts wildcards. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies the membership of the database(s) in the availability group. The option 'Present'
means that the defined database(s) are added to the availability group. All other databases that may be a member of the availability group are ignored. The option 'Absent'
means that the defined database(s) are removed from the availability group. All other databases that may be a member of the availability group are ignored. The default is 'Present'
.
}
dsc_force
Data type: Optional[Boolean]
%q{
When parameter Ensure is set to 'Present'
it ensures the specified database(s) are the only databases that are a member of the specified Availability Group. This parameter is ignored when parameter Ensure is set to 'Absent'
.
}
dsc_matchdatabaseowner
Data type: Optional[Boolean]
%q{
If set to $true
, this ensures the database owner of the database on the primary replica is the owner of the database on all secondary replicas. This requires the database owner is available as a login on all replicas and that the PsDscRunAsCredential has impersonate any login, control server, impersonate login, or control login permissions. If set to $false
, the owner of the database will be the username specified in PsDscRunAsCredential. The default is $false
.
}
dsc_processonlyonactivenode
Data type: Optional[Boolean]
%q{ Specifies that the resource will only determine if a change is needed if the target node is the active host of the SQL Server instance. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_replaceexisting
Data type: Optional[Boolean]
%q{
If set to $true
, this adds the restore option WITH REPLACE
. If set to $false
, existing databases and files will block the restore and throw error. The default is $false
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlagdatabase
type.
dsc_availabilitygroupname
namevar
Data type: String
%q{ The name of the availability group in which to manage the database membership(s). }
dsc_instancename
namevar
Data type: String
%q{ Name of the SQL Server instance where the primary replica of the availability group lives. If the availability group is not currently on this instance, the resource will attempt to connect to the instance where the primary replica lives. }
dsc_servername
namevar
Data type: String
%q{ Hostname of the SQL Server where the primary replica of the availability group lives. If the availability group is not currently on this server, the resource will attempt to connect to the server where the primary replica lives. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlagentalert
The DSC SqlAgentAlert resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlagentalert
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies if the SQL Server Agent alert should be present or absent. Default value is 'Present'
.
}
dsc_messageid
Data type: Optional[String]
%q{ The message id of the SQL Server Agent alert. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
dsc_severity
Data type: Optional[String]
%q{ The severity of the SQL Server Agent alert. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlagentalert
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_name
namevar
Data type: String
%q{ The name of the SQL Server Agent alert. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlagentfailsafe
The DSC SqlAgentFailsafe resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlagentfailsafe
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies if the SQL Server Agent failsafe operator should be present or absent. Default value is 'Present'
.
}
dsc_name
Data type: String
%q{ The name of the SQL Server Agent failsafe operator. }
dsc_notificationmethod
Data type: Optional[Enum['None', 'NotifyEmail', 'Pager', 'NetSend', 'NotifyAll']]
%q{
The method of notification for the failsafe operator. The default value is 'None'
.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlagentfailsafe
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlagentoperator
The DSC SqlAgentOperator resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlagentoperator
type.
dsc_emailaddress
Data type: Optional[String]
%q{ The email address to be used for the SQL Server Agent operator. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies if the SQL Server Agent operator should be present or absent. Default value is 'Present'
.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlagentoperator
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_name
namevar
Data type: String
%q{ The name of the SQL Server Agent operator. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlaglistener
The DSC SqlAGListener resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlaglistener
type.
dsc_dhcp
Data type: Optional[Boolean]
%q{ If DHCP should be used for the availability group listener instead of static IP address. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
If the availability group listener should be present or absent. Default value is 'Present'
.
}
dsc_ipaddress
Data type: Optional[Array[String]]
%q{
The IP address used for the availability group listener, in the format '192.168.10.45/255.255.252.0'
. If using DHCP, set to the first IP-address of the DHCP subnet, in the format '192.168.8.1/255.255.252.0'
. Must be valid in the cluster-allowed IP range.
}
dsc_name
Data type: String
%q{ The name of the availability group listener, max 15 characters. This name will be used as the Virtual Computer Object (VCO). }
dsc_port
Data type: Optional[Integer[0, 65535]]
%q{ The port used for the availability group listener. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: String
%q{ The host name or fully qualified domain name (FQDN) of the primary replica. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlaglistener
type.
dsc_availabilitygroup
namevar
Data type: String
%q{ The name of the availability group to which the availability group listener is or will be connected. }
dsc_instancename
namevar
Data type: String
%q{ The SQL Server instance name of the primary replica. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlagreplica
The DSC SqlAGReplica resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlagreplica
type.
dsc_availabilitymode
Data type: Optional[Enum['AsynchronousCommit', 'SynchronousCommit']]
%q{
Specifies the replica availability mode. When creating a replica the default is 'AsynchronousCommit'
.
}
dsc_backuppriority
Data type: Optional[Integer[0, 4294967295]]
%q{
Specifies the desired priority of the replicas in performing backups. The acceptable values for this parameter are: integers from 0
through 100
. Of the set of replicas which are online and available, the replica that has the highest priority performs the backup. When creating a replica the default is 50
.
}
dsc_connectionmodeinprimaryrole
Data type: Optional[Enum['AllowAllConnections', 'AllowReadWriteConnections']]
%q{ Specifies how the availability replica handles connections when in the primary role. }
dsc_connectionmodeinsecondaryrole
Data type: Optional[Enum['AllowNoConnections', 'AllowReadIntentConnectionsOnly', 'AllowAllConnections']]
%q{ Specifies how the availability replica handles connections when in the secondary role. }
dsc_endpointhostname
Data type: Optional[String]
%q{ Specifies the hostname or IP address of the availability group replica endpoint. When creating a group the default is the instance network name which is set in the code because the value can only be determined when connected to the SQL Server instance. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies if the availability group replica should be present or absent. Default value is 'Present'
.
}
dsc_failovermode
Data type: Optional[Enum['Automatic', 'Manual']]
%q{
Specifies the failover mode. When creating a replica the default value is 'Manual'
.
}
dsc_primaryreplicainstancename
Data type: Optional[String]
%q{ Name of the SQL Server Database Engine instance where the primary replica lives. }
dsc_primaryreplicaservername
Data type: Optional[String]
%q{ Hostname of the SQL Server where the primary replica is expected to be active. If the primary replica is not found here, the resource will attempt to find the host that holds the primary replica and connect to it. }
dsc_processonlyonactivenode
Data type: Optional[Boolean]
%q{ Specifies that the resource will only determine if a change is needed if the target node is the active host of the SQL Server instance. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_readonlyroutingconnectionurl
Data type: Optional[String]
%q{ Specifies the fully qualified domain name (FQDN) and port to use when routing to the replica for read only connections. }
dsc_readonlyroutinglist
Data type: Optional[Array[String]]
%q{ Specifies an ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This parameter applies if the availability replica is the current primary replica of the availability group. }
dsc_servername
Data type: String
%q{ Hostname of the SQL Server to be configured. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlagreplica
type.
dsc_availabilitygroupname
namevar
Data type: String
%q{ The name of the availability group. }
dsc_instancename
namevar
Data type: String
%q{ Name of the SQL Server instance to be configured. }
dsc_name
namevar
Data type: String
%q{
The name of the availability group replica. For named instances this must be in the following format
'ServerName\InstanceName'
.
}
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlalias
The DSC SqlAlias resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlalias
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Determines whether the alias should be added ('Present'
) or removed ('Absent'
). Default value is 'Present'
.
}
dsc_protocol
Data type: Optional[Enum['TCP', 'NP']]
%q{
Protocol to use when connecting. Valid values are 'TCP'
(TCP/IP) or 'NP'
(Named Pipes). Default value is 'TCP'
.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{ The SQL Server you are aliasing. This should be set to the NetBIOS name or fully qualified domain name (FQDN). }
dsc_tcpport
Data type: Optional[Integer[0, 65535]]
%q{
The TCP port the SQL Server instance is listening on. Only used when Protocol is set to 'TCP'
. Default value is port 1433
.
}
dsc_usedynamictcpport
Data type: Optional[Boolean]
%q{
Specifies that the Net-Library will determine the port dynamically. The port number specified in Port will be ignored. Default value is $false
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlalias
type.
dsc_name
namevar
Data type: String
%q{
The name of Alias (e.g. 'svr01\inst01'
).
}
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlalwaysonservice
The DSC SqlAlwaysOnService resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlalwaysonservice
type.
dsc_ensure
Data type: Enum['Present', 'Absent']
%q{
An enumerated value that describes if the SQL Server should have Always On High Availability and Disaster Recovery (HADR) property enabled ('Present'
) or disabled ('Absent'
).
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_restarttimeout
Data type: Optional[Integer[0, 4294967295]]
%q{
The length of time, in seconds, to wait for the service to restart. Default value is 120
seconds.
}
dsc_servername
Data type: Optional[String]
%q{
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlalwaysonservice
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlconfiguration
The DSC SqlConfiguration resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlconfiguration
type.
dsc_optionvalue
Data type: Integer[-2147483648, 2147483647]
%q{ The desired value of the configuration option. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_restartservice
Data type: Optional[Boolean]
%q{ Determines whether the instance should be restarted after updating the configuration option. }
dsc_restarttimeout
Data type: Optional[Integer[0, 4294967295]]
%q{
The length of time, in seconds, to wait for the service to restart. Default is 120
seconds.
}
dsc_servername
Data type: Optional[String]
%q{
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlconfiguration
type.
dsc_instancename
namevar
Data type: String
%q{ Name of the SQL Server instance to be configured. }
dsc_optionname
namevar
Data type: String
%q{
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
.
}
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabase
The DSC SqlDatabase resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabase
type.
dsc_collation
Data type: Optional[String]
%q{ The name of the collation to use for the new database. Default value is the collation used by the server. }
dsc_compatibilitylevel
Data type: Optional[Enum['Version80', 'Version90', 'Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150']]
%q{ Specifies the version of the SQL Database Compatibility Level to use for the specified database. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
When set to 'Present'
, the database will be created. When set to 'Absent'
, the database will be dropped. Default value is 'Present'
.
}
dsc_ownername
Data type: Optional[String]
%q{ Specifies the name of the login that should be the owner of the database. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_recoverymodel
Data type: Optional[Enum['Simple', 'Full', 'BulkLogged']]
%q{ The recovery model for the specified database. }
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabase
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_name
namevar
Data type: String
%q{ The name of the SQL Server database. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabasedefaultlocation
The DSC SqlDatabaseDefaultLocation resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabasedefaultlocation
type.
dsc_path
Data type: String
%q{ The path to the default directory to be set for the type specified in the parameter Type. }
dsc_processonlyonactivenode
Data type: Optional[Boolean]
%q{ Specifies that the resource will only determine if a change is needed if the target node is the active host of the SQL Server instance. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_restartservice
Data type: Optional[Boolean]
%q{
If set to $true
then SQL Server and dependent services will be restarted if a change to the configuration is made. The default value is $false
.
}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabasedefaultlocation
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_type
namevar
Data type: Enum['Data', 'Log', 'Backup']
%q{ The type of database default location to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabasemail
The DSC SqlDatabaseMail resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabasemail
type.
dsc_description
Data type: Optional[String]
%q{ The description for the Database Mail profile and account. }
dsc_displayname
Data type: Optional[String]
%q{ The display name of the originating email address. Default value is the same value assigned to the parameter EmailAddress. }
dsc_emailaddress
Data type: String
%q{ The e-mail address from which mail will originate. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies the desired state of the Database Mail account. When set to 'Present'
the Database Mail account will be created. When set to 'Absent'
the Database Mail account will be removed. Default value is 'Present'
.
}
dsc_logginglevel
Data type: Optional[Enum['Normal', 'Extended', 'Verbose']]
%q{
The logging level that the Database Mail will use. If not specified the default logging level is 'Extended'
.
}
dsc_mailservername
Data type: String
%q{ The fully qualified domain name (FQDN) of the mail server name to which e-mail are sent. }
dsc_profilename
Data type: String
%q{ The name of the Database Mail profile. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_replytoaddress
Data type: Optional[String]
%q{ The e-mail address to which the receiver of e-mails will reply to. Default value is the same e-mail address assigned to parameter EmailAddress. }
dsc_servername
Data type: Optional[String]
%q{
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
dsc_tcpport
Data type: Optional[Integer[0, 65535]]
%q{
The TCP port used for communication. Default value is port 25
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabasemail
type.
dsc_accountname
namevar
Data type: String
%q{ The name of the Database Mail account. }
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabaseobjectpermission
The DSC SqlDatabaseObjectPermission resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabaseobjectpermission
type.
dsc_force
Data type: Optional[Boolean]
%q{
Specifies that permissions that has parameter Ensure set to 'Present'
(the default value for permissions) should always be enforced even if that encompasses cascading revocations. An example if the desired state is 'Grant'
but the current state is 'GrantWithGrant'
. If parameter Force is set to $true
the With Grant permission is revoked, if set to $false
an exception is thrown since the desired state could not be set. Default is to throw an exception.
}
dsc_permission
Data type: Array[Struct[{ Permission => Array[String], Ensure => Optional[Enum['Present', 'Absent']], State => Optional[Enum['Grant', 'Deny', 'GrantWithGrant']] }]]
%q{
Specifies the permissions for the database object and the principal. The permissions is an array of embedded instances of the DSC_DatabaseObjectPermission
CIM class.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
Specifies the host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabaseobjectpermission
type.
dsc_databasename
namevar
Data type: String
%q{ Specifies the name of the database where the object resides. }
dsc_instancename
namevar
Data type: String
%q{ Specifies the name of the SQL Server instance to be configured. }
dsc_name
namevar
Data type: String
%q{ Specifies the name of the database user, user-defined database role, or database application role that will have the permission. }
dsc_objectname
namevar
Data type: String
%q{ Specifies the name of the database object to set permission for. Can be an empty value when setting permission for a schema. }
dsc_objecttype
namevar
Data type: Enum['Schema', 'Table', 'View', 'StoredProcedure']
%q{ Specifies the type of the database object specified in parameter ObjectName. }
dsc_schemaname
namevar
Data type: String
%q{ Specifies the name of the schema for the database object. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabaseowner
The DSC SqlDatabaseOwner resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabaseowner
type.
dsc_name
Data type: String
%q{ The name of the login that will become a owner of the desired sql database. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{ The host name of the SQL Server to be configured. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabaseowner
type.
dsc_databasename
namevar
Data type: String
%q{ The name of database to be configured. }
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabasepermission
The DSC SqlDatabasePermission resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabasepermission
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
If the permission should be granted ('Present'
) or revoked ('Absent'
).
}
dsc_permissions
Data type: Array[String]
%q{ The permissions to be granted or denied for the user in the database. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabasepermission
type.
dsc_databasename
namevar
Data type: String
%q{ The name of the database. }
dsc_instancename
namevar
Data type: String
%q{
The name of the SQL Server instance to be configured. Default value is 'MSSQLSERVER'
.
}
dsc_name
namevar
Data type: String
%q{ The name of the user that should be granted or denied the permission. }
dsc_permissionstate
namevar
Data type: Enum['Grant', 'Deny', 'GrantWithGrant']
%q{ The state of the permission. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabaserecoverymodel
The DSC SqlDatabaseRecoveryModel resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabaserecoverymodel
type.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_recoverymodel
Data type: Enum['Full', 'Simple', 'BulkLogged']
%q{ The recovery model to use for the database. }
dsc_servername
Data type: Optional[String]
%q{ The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabaserecoverymodel
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL instance to be configured. }
dsc_name
namevar
Data type: String
%q{ The SQL database name }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabaserole
The DSC SqlDatabaseRole resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabaserole
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
If 'Present'
then the role will be added to the database and the role membership will be set. If 'Absent'
then the role will be removed from the database. Default value is 'Present'
.
}
dsc_members
Data type: Optional[Array[String]]
%q{
The members the database role should have. This parameter will replace all the current database role members with the specified members. Will only be used when parameter Ensure is set to 'Present'
.
}
dsc_memberstoexclude
Data type: Optional[Array[String]]
%q{
The members the database role should exclude. This parameter will only remove members from a database role. Will only be used when parameter Ensure is set to 'Present'
. Can not be used at the same time as parameter Members.
}
dsc_memberstoinclude
Data type: Optional[Array[String]]
%q{
The members the database role should include. This parameter will only add members to a database role. Will only be used when parameter Ensure is set to 'Present'
. Can not be used at the same time as parameter Members.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabaserole
type.
dsc_databasename
namevar
Data type: String
%q{ The name of the database in which the role should be configured. }
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_name
namevar
Data type: String
%q{ The name of the database role to be added or removed. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqldatabaseuser
The DSC SqlDatabaseUser resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqldatabaseuser
type.
dsc_asymmetrickeyname
Data type: Optional[String]
%q{
Specifies the name of the asymmetric key to associate with the database user. This must be specified if parameter UserType is set to 'AsymmetricKey'
.
}
dsc_certificatename
Data type: Optional[String]
%q{
Specifies the name of the certificate to associate with the database user. This must be specified if parameter UserType is set to 'Certificate'
.
}
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
Specifies if the database user should be present or absent. If 'Present'
then the database user will be added to the database and, if needed, the login mapping will be updated. If 'Absent'
then the database user will be removed from the database. Default value is 'Present'
.
}
dsc_force
Data type: Optional[Boolean]
%q{
Specifies if it is allowed to re-create the database user if either the user type, the asymmetric key, or the certificate changes. Default value is $false
not allowing database users to be re-created.
}
dsc_loginname
Data type: Optional[String]
%q{
Specifies the name of the login to associate with the database user. This must be specified if parameter UserType is set to 'Login'
.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
Specifies the host name of the SQL Server on which the instance exist. Default value is $env:COMPUTERNAME
.
}
dsc_usertype
Data type: Optional[Enum['Login', 'NoLogin', 'Certificate', 'AsymmetricKey']]
%q{
Specifies the type of the database user. Default value is 'NoLogin'
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqldatabaseuser
type.
dsc_databasename
namevar
Data type: String
%q{ Specifies the name of the database in which to configure the database user. }
dsc_instancename
namevar
Data type: String
%q{ Specifies the SQL Server instance in which the database exist. }
dsc_name
namevar
Data type: String
%q{ Specifies the name of the database user to be added or removed. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlendpoint
The DSC SqlEndpoint resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlendpoint
type.
dsc_endpointtype
Data type: Enum['DatabaseMirroring']
%q{ Specifies the type of endpoint. Currently the only type that is supported is the Database Mirroring type. }
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
If the endpoint should be present or absent. Default values is 'Present'
.
}
dsc_ipaddress
Data type: Optional[String]
%q{
The network IP address the endpoint is listening on. Default value is '0.0.0.0'
which means listen on any valid IP address. The default value is only used during endpoint creation, it is not enforce.
}
dsc_owner
Data type: Optional[String]
%q{ The owner of the endpoint. Default is the login used for the creation. }
dsc_port
Data type: Optional[Integer[0, 65535]]
%q{
The network port the endpoint is listening on. Default value is 5022
, but default value is only used during endpoint creation, it is not enforce.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
dsc_state
Data type: Optional[Enum['Started', 'Stopped', 'Disabled']]
%q{ Specifies the state of the endpoint. When an endpoint is created and the state is not specified then the endpoint will be started after it is created. The state will not be enforced unless the parameter is specified. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlendpoint
type.
dsc_endpointname
namevar
Data type: String
%q{ The name of the endpoint. }
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlendpointpermission
The DSC SqlEndpointPermission resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlendpointpermission
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
If the permission should be present or absent. Default value is 'Present'
.
}
dsc_name
Data type: String
%q{ The name of the endpoint. }
dsc_permission
Data type: Optional[Enum['CONNECT']]
%q{
The permission to set for the login. Valid value for permission is only 'CONNECT'
.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlendpointpermission
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_principal
namevar
Data type: String
%q{ The login to which permission will be set. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqllogin
The DSC SqlLogin resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqllogin
type.
dsc_defaultdatabase
Data type: Optional[String]
%q{ Specifies the default database name. }
dsc_disabled
Data type: Optional[Boolean]
%q{
Specifies if the login is disabled. Default value is $false
.
}
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
The specified login should be 'Present'
or 'Absent'
. Default is 'Present'
.
}
dsc_logincredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{
Specifies the password as a [PSCredential]
object. Only applies to SQL Logins.
}
dsc_loginmustchangepassword
Data type: Optional[Boolean]
%q{
Specifies if the login is required to have its password change on the next login. Only applies to SQL Logins. Default value is $true
.
}
dsc_loginpasswordexpirationenabled
Data type: Optional[Boolean]
%q{
Specifies if the login password is required to expire in accordance to the operating system security policy. Only applies to SQL Logins. Default value is $true
.
}
dsc_loginpasswordpolicyenforced
Data type: Optional[Boolean]
%q{
Specifies if the login password is required to conform to the password policy specified in the system security policy. Only applies to SQL Logins. Default value is $true
.
}
dsc_logintype
Data type: Optional[Enum['WindowsUser', 'WindowsGroup', 'SqlLogin', 'Certificate', 'AsymmetricKey', 'ExternalUser', 'ExternalGroup']]
%q{
The type of login to be created. If LoginType is 'WindowsUser'
or 'WindowsGroup'
then provide the name in the format DOMAIN\name
. Default is 'WindowsUser'
. The login types 'Certificate'
, 'AsymmetricKey'
, 'ExternalUser'
, and 'ExternalGroup'
are not yet implemented and will currently throw an exception if used.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The hostname of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqllogin
type.
dsc_instancename
namevar
Data type: String
%q{ Name of the SQL Server instance to be configured. }
dsc_name
namevar
Data type: String
%q{ The name of the login. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlmaxdop
The DSC SqlMaxDop resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlmaxdop
type.
dsc_dynamicalloc
Data type: Optional[Boolean]
%q{
If set to $true
then max degree of parallelism will be dynamically configured. When this is set parameter is set to $true
, the parameter MaxDop must be set to $null
or not be configured.
}
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
When set to 'Present'
then max degree of parallelism will be set to either the value in parameter MaxDop or dynamically configured when parameter DynamicAlloc is set to $true
. When set to 'Absent'
max degree of parallelism will be set to 0
which means no limit in number of processors used in parallel plan execution.
}
dsc_maxdop
Data type: Optional[Integer[-2147483648, 2147483647]]
%q{ A numeric value to limit the number of processors used in parallel plan execution. }
dsc_processonlyonactivenode
Data type: Optional[Boolean]
%q{ Specifies that the resource will only determine if a change is needed if the target node is the active host of the SQL Server instance. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlmaxdop
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlmemory
The DSC SqlMemory resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlmemory
type.
dsc_dynamicalloc
Data type: Optional[Boolean]
%q{
If set to $true
then max memory will be dynamically configured. When this parameter is set to $true
, the parameter MaxMemory must be set to $null
or not be configured. Default value is $false
.
}
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
When set to 'Present'
then min and max memory will be set to either the value in parameter MinMemory and MaxMemory, or dynamically configured when parameter DynamicAlloc is set to $true
. When set to 'Absent'
min and max memory will be set to its default values. Default value is 'Present'
.
}
dsc_maxmemory
Data type: Optional[Integer[-2147483648, 2147483647]]
%q{ Maximum amount of memory, in MB, in the buffer pool used by the instance of SQL Server. }
dsc_minmemory
Data type: Optional[Integer[-2147483648, 2147483647]]
%q{ Minimum amount of memory, in MB, in the buffer pool used by the instance of SQL Server. }
dsc_processonlyonactivenode
Data type: Optional[Boolean]
%q{ Specifies that the resource will only determine if a change is needed if the target node is the active host of the SQL Server instance. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlmemory
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlpermission
The DSC SqlPermission resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlpermission
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
If the permission should be present or absent. Default value is 'Present'
.
}
dsc_permission
Data type: Optional[Array[Enum['ConnectSql', 'AlterAnyAvailabilityGroup', 'ViewServerState', 'AlterAnyEndPoint']]]
%q{ The permission to set for the login. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlpermission
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_principal
namevar
Data type: String
%q{ The login to which permission will be set. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlprotocol
The DSC SqlProtocol resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlprotocol
type.
dsc_enabled
Data type: Optional[Boolean]
%q{ Specifies if the protocol should be enabled or disabled. }
dsc_keepalive
Data type: Optional[Integer[0, 65535]]
%q{ Specifies the keep alive duration in milliseconds. Only used for the TCP/IP protocol, ignored for all other protocols. }
dsc_listenonallipaddresses
Data type: Optional[Boolean]
%q{ Specifies to listen on all IP addresses. Only used for the TCP/IP protocol, ignored for all other protocols. }
dsc_pipename
Data type: Optional[String]
%q{ Specifies the name of the named pipe. Only used for the Named Pipes protocol, ignored for all other protocols. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_restarttimeout
Data type: Optional[Integer[0, 65535]]
%q{
Timeout value for restarting the SQL Server services. The default value is 120
seconds.
}
dsc_servername
Data type: Optional[String]
%q{ Specifies the host name of the SQL Server to be configured. If the SQL Server belongs to a cluster or availability group specify the host name for the listener or cluster group. Default value is $env:COMPUTERNAME. }
dsc_suppressrestart
Data type: Optional[Boolean]
%q{
If set to $true
then the any attempt by the resource to restart the service is suppressed. The default value is $false
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlprotocol
type.
dsc_instancename
namevar
Data type: String
%q{ Specifies the name of the SQL Server instance to enable the protocol for. }
dsc_protocolname
namevar
Data type: Enum['SharedMemory', 'NamedPipes', 'TcpIp']
%q{ Specifies the name of network protocol to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlprotocoltcpip
The DSC SqlProtocolTcpIp resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlprotocoltcpip
type.
dsc_enabled
Data type: Optional[Boolean]
%q{
Specified if the IP address group should be enabled or disabled. Only used if the parameter IpAddressGroup is not set to 'IPAll'
. If not specified, the existing value will not be changed.
}
dsc_ipaddress
Data type: Optional[String]
%q{
Specifies the IP address for the IP address group. Only used if the parameter IpAddressGroup is not set to 'IPAll'
. If not specified, the existing value will not be changed.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_restarttimeout
Data type: Optional[Integer[0, 65535]]
%q{
Timeout value for restarting the SQL Server services. The default value is 120
seconds.
}
dsc_servername
Data type: Optional[String]
%q{
Specifies the host name of the SQL Server to be configured. If the SQL Server belongs to a cluster or availability group specify the host name for the listener or cluster group. Default value is $env:COMPUTERNAME
.
}
dsc_suppressrestart
Data type: Optional[Boolean]
%q{
If set to $true
then the any attempt by the resource to restart the service is suppressed. The default value is $false
.
}
dsc_tcpport
Data type: Optional[String]
%q{
Specifies the TCP port(s) that SQL Server instance should be listening on. If the IP address should listen on more than one port, list all ports as a string value with the port numbers separated with a comma, e.g. '1433,1500,1501'
. This parameter is limited to 2047 characters. If not specified, the existing value will not be changed. This parameter is not allowed to be used at the same time as the parameter UseTcpDynamicPort.
}
dsc_usetcpdynamicport
Data type: Optional[Boolean]
%q{ Specifies whether the SQL Server instance should use a dynamic port. If not specified, the existing value will not be changed. This parameter is not allowed to be used at the same time as the parameter TcpPort. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlprotocoltcpip
type.
dsc_instancename
namevar
Data type: String
%q{ Specifies the name of the SQL Server instance to manage the IP address group for. }
dsc_ipaddressgroup
namevar
Data type: String
%q{
Specifies the name of the IP address group in the TCP/IP protocol, e.g. 'IP1'
, 'IP2'
etc., or 'IPAll'
.
}
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlreplication
The DSC SqlReplication resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlreplication
type.
dsc_adminlinkcredentials
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{ AdminLink password to be used when setting up publisher distributor relationship. }
dsc_distributiondbname
Data type: Optional[String]
%q{
Distribution database name. If the parameter DistributionMode is set to 'Local'
this will be created, if 'Remote'
needs to match distribution database on remote distributor. Default value is 'distributor'
.
}
dsc_distributormode
Data type: Enum['Local', 'Remote']
%q{
'Local'
- Instance will be configured as it's own distributor. 'Remote'
- Instance will be configure with remote distributor (remote distributor needs to be already configured for distribution).
}
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
'Present'
will configure replication, 'Absent'
will disable (remove) replication. Default value is 'Present'
.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_remotedistributor
Data type: Optional[String]
%q{
Specifies the SQL Server network name that will be used as distributor for local instance. Required if parameter DistributionMode is set to 'Remote'
.
}
dsc_uninstallwithforce
Data type: Optional[Boolean]
%q{ Force flag for uninstall procedure. Default values is `$true´. }
dsc_usetrustedconnection
Data type: Optional[Boolean]
%q{
Publisher security mode. Default value is $true
.
}
dsc_workingdirectory
Data type: String
%q{ Publisher working directory. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlreplication
type.
dsc_instancename
namevar
Data type: String
%q{ Specifies the SQL Server instance name where replication distribution will be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlrole
The DSC SqlRole resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlrole
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
An enumerated value that describes if the server role is added ('Present'
) or dropped ('Absent'
). Default value is 'Present'
.
}
dsc_members
Data type: Optional[Array[String]]
%q{ The members the server role should have. This parameter will replace all the current server role members with the specified members. }
dsc_memberstoexclude
Data type: Optional[Array[String]]
%q{
The members the server role should exclude. This parameter will only remove members from a server role. Can only be used when parameter Ensure is set to 'Present'
. Can not be used at the same time as parameter Members.
}
dsc_memberstoinclude
Data type: Optional[Array[String]]
%q{ The members the server role should include. This parameter will only add members to a server role. Can not be used at the same time as parameter Members. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlrole
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_serverrolename
namevar
Data type: String
%q{ The name of of SQL Server Database Engine role to add or remove. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlrs
The DSC SqlRS resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlrs
type.
dsc_databaseinstancename
Data type: String
%q{ Name of the SQL Server instance to host the Reporting Services database. }
dsc_databaseservername
Data type: String
%q{ Name of the SQL Server to host the Reporting Services database. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_reportserverreservedurl
Data type: Optional[Array[String]]
%q{
Report Server URL reservations. Optional. If not specified, 'http://+:80'
URL reservation will be used.
}
dsc_reportservervirtualdirectory
Data type: Optional[String]
%q{ Report Server Web Service virtual directory. Optional. }
dsc_reportsreservedurl
Data type: Optional[Array[String]]
%q{
Report Manager or Report Web App URL reservations. Optional. If not specified, 'http://+:80'
URL reservation will be used.
}
dsc_reportsvirtualdirectory
Data type: Optional[String]
%q{ Report Manager or Report Web App virtual directory name. Optional. }
dsc_suppressrestart
Data type: Optional[Boolean]
%q{
Reporting Services need to be restarted after initialization or settings change. If this parameter is set to $true
, Reporting Services will not be restarted, even after initialization.
}
dsc_usessl
Data type: Optional[Boolean]
%q{ If connections to the Reporting Services must use SSL. If this parameter is not assigned a value, the default is that Reporting Services does not use SSL. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlrs
type.
dsc_instancename
namevar
Data type: String
%q{ Name of the SQL Server Reporting Services instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlrssetup
The DSC SqlRSSetup resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlrssetup
type.
dsc_action
Data type: Optional[Enum['Install', 'Uninstall']]
%q{
The action to be performed. Default value is 'Install'
which performs either install or upgrade.
}
dsc_edition
Data type: Optional[Enum['Development', 'Evaluation', 'ExpressAdvanced']]
%q{ Sets the custom free edition. This parameter is mutually exclusive with the parameter ProductKey. }
dsc_editionupgrade
Data type: Optional[Boolean]
%q{ Upgrades the edition of the installed product. Requires that either the ProductKey or the Edition parameter is also assigned. By default no edition upgrade is performed. }
dsc_forcerestart
Data type: Optional[Boolean]
%q{
Forces a restart after installation is finished. If set to $true
then it will override the parameter SuppressRestart.
}
dsc_iacceptlicenseterms
Data type: Enum['Yes']
%q{
Accept licens terms. This must be set to 'Yes'
.
}
dsc_installfolder
Data type: Optional[String]
%q{
Sets the install folder, e.g. C:\Program Files\SSRS
. Default value is C:\Program Files\Microsoft SQL Server Reporting Services
.
}
dsc_logpath
Data type: Optional[String]
%q{
Specifies the setup log file location, e.g. log.txt
. By default log files are created under %TEMP%
.
}
dsc_productkey
Data type: Optional[String]
%q{
Sets the custom license key, e.g. '12345-12345-12345-12345-12345'
. This parameter is mutually exclusive with the parameter Edition.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_setupprocesstimeout
Data type: Optional[Integer[0, 4294967295]]
%q{
The timeout, in seconds, to wait for the setup process to finish. Default value is 7200
seconds (2 hours). If the setup process does not finish before this time an error will be thrown.
}
dsc_sourcecredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{ Credentials used to access the path set in the parameter SourcePath. }
dsc_sourcepath
Data type: String
%q{ The path to the installation media file to be used for installation, e.g an UNC path to a shared resource. Environment variables can be used in the path. }
dsc_suppressrestart
Data type: Optional[Boolean]
%q{ Suppresses any attempts to restart. }
dsc_versionupgrade
Data type: Optional[Boolean]
%q{
Upgrades installed product version if the major product version of the source executable is higher than the currently installed major version. Requires that either the ProductKey or the Edition parameter is also assigned. Default is $false
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlrssetup
type.
dsc_instancename
namevar
Data type: Enum['SSRS']
%q{
Name of the Microsoft SQL Server Reporting Service instance to installed. This can only be set to 'SSRS'
.
}
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlscript
The DSC SqlScript resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlscript
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{ The credentials to authenticate with, using SQL Server Authentication. To authenticate using Windows Authentication assign the credentials to the built-in parameter PsDscRunAsCredential. If neither of the parameters Credential or PsDscRunAsCredential are assigned, then the SYSTEM account will be used to authenticate using Windows Authentication. }
dsc_disablevariables
Data type: Optional[Boolean]
%q{
Specifies, as a boolean, whether or not PowerShell will ignore Invoke-Sqlcmd
scripting variables that share a format such as $(variable_name)
. For more information how to use this, please go to the help documentation for Invoke-Sqlcmd.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_querytimeout
Data type: Optional[Integer[0, 4294967295]]
%q{
Specifies, as an integer, the number of seconds after which the T-SQL script execution will time out. In some SQL Server versions there is a bug in Invoke-Sqlcmd
where the normal default value 0
(no timeout) is not respected and the default value is incorrectly set to 30 seconds.
}
dsc_servername
Data type: Optional[String]
%q{
Specifies the host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
dsc_variable
Data type: Optional[Array[String]]
%q{ Specifies, as a string array, a scripting variable for use in the T-SQL script, and sets a value for the variable. Use a Windows PowerShell array to specify multiple variables and their values. For more information how to use this, please go to the help documentation for Invoke-Sqlcmd. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlscript
type.
dsc_getfilepath
namevar
Data type: String
%q{
Path to the T-SQL file that will perform Get action. Any values returned by the T-SQL queries will also be
returned when calling Get (for example by using the cmdlet Get-DscConfiguration
) through the 'GetResult'
property.
}
dsc_instancename
namevar
Data type: String
%q{
Specifies the name of the SQL Server Database Engine instance. For the default instance specify the value
'MSSQLSERVER'
.
}
dsc_setfilepath
namevar
Data type: String
%q{ Path to the T-SQL file that will perform Set action. }
dsc_testfilepath
namevar
Data type: String
%q{
Path to the T-SQL file that will perform Test action. Any script that does not throw an error or returns
NULL
is evaluated to $true
. The cmdlet Invoke-Sqlcmd
treats T-SQL PRINT
statements as verbose text, and will not
cause the test to return $false
.
}
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlscriptquery
The DSC SqlScriptQuery resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlscriptquery
type.
dsc_credential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{ The credentials to authenticate with, using SQL Server Authentication. To authenticate using Windows Authentication, assign the credentials to the built-in parameter PsDscRunAsCredential. If neither of the parameters Credential and PsDscRunAsCredential are assigned then the SYSTEM account will be used to authenticate using Windows Authentication. }
dsc_disablevariables
Data type: Optional[Boolean]
%q{
Specifies, as a boolean, whether or not PowerShell will ignore Invoke-SqlCmd
scripting variables that share a format such as $(variable_name)
. For more information how to use this, please go to the help documentation for Invoke-Sqlcmd.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_querytimeout
Data type: Optional[Integer[0, 4294967295]]
%q{
Specifies, as an integer, the number of seconds after which the T-SQL script execution will time out. In some SQL Server versions there is a bug in Invoke-Sqlcmd
where the normal default value 0
(no timeout) is not respected and the default value is incorrectly set to 30 seconds.
}
dsc_servername
Data type: Optional[String]
%q{
Specifies the host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
dsc_variable
Data type: Optional[Array[String]]
%q{ Specifies, as a string array, a scripting variable for use in the sql script, and sets a value for the variable. Use a Windows PowerShell array to specify multiple variables and their values. For more information how to use this, please go to the help documentation for Invoke-Sqlcmd. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlscriptquery
type.
dsc_getquery
namevar
Data type: String
%q{
Full T-SQL query that will perform Get action. Any values returned by the T-SQL queries will also be returned
when calling Get (for example by using the cmdlet Get-DscConfiguration
) through the 'GetResult'
property.
}
dsc_instancename
namevar
Data type: String
%q{
Specifies the name of the SQL Server Database Engine instance. For the default instance specify the value
'MSSQLSERVER'
.
}
dsc_setquery
namevar
Data type: String
%q{ Full T-SQL query that will perform Set action. }
dsc_testquery
namevar
Data type: String
%q{
Full T-SQL query that will perform Test action. Any script that does not throw an error or returns NULL
is
evaluated to $true
. The cmdlet Invoke-Sqlcmd
treats T-SQL PRINT
statements as verbose text, and will not cause the
test to return $false
.
}
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlsecureconnection
The DSC SqlSecureConnection resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlsecureconnection
type.
dsc_ensure
Data type: Optional[Enum['Present', 'Absent']]
%q{
If encryption should be enabled ('Present'
) or disabled ('Absent'
).
}
dsc_forceencryption
Data type: Optional[Boolean]
%q{
If all connections to the SQL Server instance should be encrypted. If this parameter is not assigned a value, the default value is $true
meaning that all connections must be encrypted.
}
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_serviceaccount
Data type: String
%q{
Name of the account running the SQL Server Windows service. If this parameter is set to 'LocalSystem'
then a connection error is displayed, instead use the value 'SYSTEM'
.
}
dsc_suppressrestart
Data type: Optional[Boolean]
%q{
If set to $true
then the required restart will be suppressed. You will need to restart the service before changes will take effect. The default value is $false
.
}
dsc_thumbprint
Data type: String
%q{
Thumbprint of the certificate being used for encryption. If parameter Ensure is set to 'Absent'
then the parameter Certificate can be set to an empty string.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlsecureconnection
type.
dsc_instancename
namevar
Data type: String
%q{ Name of the SQL Server instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlserverendpointstate
The DSC SqlServerEndpointState resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlserverendpointstate
type.
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_servername
Data type: Optional[String]
%q{ The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME. }
dsc_state
Data type: Optional[Enum['Started', 'Stopped', 'Disabled']]
%q{ The state of the endpoint. Valid states are Started, Stopped or Disabled. Default value is 'Started'. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlserverendpointstate
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL instance to be configured. }
dsc_name
namevar
Data type: String
%q{ The name of the endpoint. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlservernetwork
The DSC SqlServerNetwork resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlservernetwork
type.
dsc_isenabled
Data type: Optional[Boolean]
%q{ Enables or disables the network protocol. }
dsc_protocolname
Data type: Enum['Tcp']
%q{ The name of network protocol to be configured. Only tcp is currently supported. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_restartservice
Data type: Optional[Boolean]
%q{ If set to $true then SQL Server and dependent services will be restarted if a change to the configuration is made. The default value is $false. }
dsc_restarttimeout
Data type: Optional[Integer[0, 65535]]
%q{ Timeout value for restarting the SQL Server services. The default value is 120 seconds. }
dsc_servername
Data type: Optional[String]
%q{ The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME. }
dsc_tcpdynamicport
Data type: Optional[Boolean]
%q{ Specifies whether the SQL Server instance should use a dynamic port. Value cannot be set to 'True' if TcpPort is set to a non-empty string. }
dsc_tcpport
Data type: Optional[String]
%q{ The TCP port(s) that SQL Server should be listening on. If the IP address should listen on more than one port, list all ports separated with a comma ('1433,1500,1501'). To use this parameter set TcpDynamicPorts to 'False'. }
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlservernetwork
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL instance to be configured. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlserviceaccount
The DSC SqlServiceAccount resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlserviceaccount
type.
dsc_force
Data type: Optional[Boolean]
%q{ Forces the service account to be updated. Useful for password changes. This will cause Set to be run on each consecutive run. }
dsc_psdscrunascredential
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{}
dsc_restartservice
Data type: Optional[Boolean]
%q{ Determines whether the service is automatically restarted when a change to the configuration was needed. }
dsc_servername
Data type: Optional[String]
%q{
The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME
.
}
dsc_serviceaccount
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{ The service account that should be used when running the Windows service. }
dsc_versionnumber
Data type: Optional[String]
%q{
The version number for the service type to be managed for the instance that is specified in parameter InstanceName. Mandatory when parameter ServiceType is set to 'IntegrationServices'
.
}
ensure
Data type: Enum[present, absent]
Whether this resource should be present or absent on the target system.
Default value: present
Parameters
The following parameters are available in the dsc_sqlserviceaccount
type.
dsc_instancename
namevar
Data type: String
%q{ The name of the SQL Server instance to be configured. }
dsc_servicetype
namevar
Data type: Enum['DatabaseEngine', 'SQLServerAgent', 'Search', 'IntegrationServices', 'AnalysisServices', 'ReportingServices', 'SQLServerBrowser', 'NotificationServices']
%q{ The service type to be managed for the instance that is specified in parameter InstanceName. }
name
namevar
Data type: String
Description of the purpose for this resource declaration.
dsc_sqlsetup
The DSC SqlSetup resource type. Automatically generated from version 14.2.1
Properties
The following properties are available in the dsc_sqlsetup
type.
dsc_action
Data type: Optional[Enum['Install', 'Upgrade', 'InstallFailoverCluster', 'AddNode', 'PrepareFailoverCluster', 'CompleteFailoverCluster']]
%q{
The action to be performed. Default value is 'Install'
. NOTE: AddNode is not currently functional.
}
dsc_agtsvcaccount
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{ Service account for the SQL Agent's Windows service. }
dsc_agtsvcstartuptype
Data type: Optional[Enum['Automatic', 'Disabled', 'Manual']]
%q{ Specifies the startup mode for the SQL Server Agent's Windows service. }
dsc_asbackupdir
Data type: Optional[String]
%q{ Path for Analysis Services's backup files. }
dsc_ascollation
Data type: Optional[String]
%q{ Collation for the SQL Server Analysis Services. }
dsc_asconfigdir
Data type: Optional[String]
%q{ Path for Analysis Services's config files. }
dsc_asdatadir
Data type: Optional[String]
%q{ Path for Analysis Services's data files. }
dsc_aslogdir
Data type: Optional[String]
%q{ Path for Analysis Services's log files. }
dsc_asservermode
Data type: Optional[Enum['MULTIDIMENSIONAL', 'TABULAR', 'POWERPIVOT']]
%q{
The server mode for SQL Server Analysis Services instance. The default is to install in Multidimensional mode. Valid values in a cluster scenario are 'MULTIDIMENSIONAL'
or 'TABULAR'
. Parameter ASServerMode is case-sensitive. All values must be expressed in upper case.
}
dsc_assvcaccount
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
%q{ Service account for Analysis Services's Windows service. }
dsc_assvcstartuptype
Data type: Optional[Enum['Automatic', 'Disabled', 'Manual']]
%q{ Specifies the startup mode for the SQL Server Analysis Services's Windows service. }
dsc_assysadminaccounts
Data type: Optional[Array[String]]
%q{ Array of accounts to be made Analysis Services admins. }
dsc_astempdir
Data type: Optional[String]
%q{ Path for Analysis Services's temp files. }
dsc_browsersvcstartuptype
Data type: Optional[Enum['Automatic', 'Disabled', 'Manual']]
%q{ Specifies the startup mode for SQL Server Browser's Windows service. }
dsc_errorreporting
Data type: Optional[String]
%q{ Enable error reporting. }
dsc_failoverclustergroupname
Data type: Optional[String]
%q{
The name of the resource group to create for the clustered SQL Server instance. Default is 'SQL Server (InstanceName)'
.
}
dsc_failoverclusteripaddress
Data type: Optional[Array[String]]
%q{
Specifies an array of IP addresses to be assigned to the clustered SQL Server instance. IP addresses must be in dotted-decimal notation, for example '10.0.0.100'
. If no IP address is specified, uses 'DEFAULT'
for this setup parameter.
}
dsc_failoverclusternetworkname
Data type: Optional[String]
%q{ Host name to be assigned to the clustered SQL Server instance. }
dsc_featureflag
Data type: Optional[Array[String]]
%q{ Feature flags are used to toggle DSC resource functionality on or off. See the DSC resource documentation for what additional functionality exist through a feature flag. }
dsc_features
Data type: Optional[String]
%q{ SQL Server features to be installed. }
dsc_forcereboot
Data type: Optional[Boolean]
%q{ Forces reboot. }
dsc_ftsvcaccount
Data type: Optional[Struct[{ user => String[1], password => Sensitive[String[1]] }]]
[14.2.1] - 2020-08-14
Changed
- SqlServerDsc
- Document changes in the file
build.yml
. - The regular expression for
major-version-bump-message
in the fileGitVersion.yml
was changed to only raise major version when the commit message contain the phrasebreaking change
, or when it contain the wordbreaking
ormajor
.
- Document changes in the file
- SqlSetup
- Duplicate function Get-SqlMajorVersion was removed and instead the
helper function
Get-FilePathMajorVersion
from the helper module SqlServerDsc.Common is used (issue #1178).
- Duplicate function Get-SqlMajorVersion was removed and instead the
helper function
- SqlWindowsFirewall
- Duplicate function Get-SqlMajorVersion was removed and instead the
helper function
Get-FilePathMajorVersion
from the helper module SqlServerDsc.Common is used (issue #1178).
- Duplicate function Get-SqlMajorVersion was removed and instead the
helper function
- SqlServerDsc.Common
- Function
Get-FilePathMajorVersion
was added. The functionGet-SqlMajorVersion
from the resources SqlSetup and SqlWindowsFirewall was moved and renamed without any functional changes (issue #1178).
- Function
Fixed
- SqlServerDsc
- Removed helper functions that was moved to the module DscResource.Common. DSC resources using those functions are using them from the module DscResource.Common.
- SqlDatabaseObjectPermission
- Fixed method invocation failed because of missing
Where()
method (issue #1600).- New integration tests to verify scenarios when passing a single permission.
- To enforce a scenario where a permission must be changed from
'GrantWithGrant'
to'Grant'
a new parameter Force was added (issue #1602). The parameter Force is used to enforce the desired state in those scenarios where revocations must be performed to enforce the desired state, even if that encompasses cascading revocations. If parameter Force is not set to$true
an exception is thrown in those scenarios where a revocation must be performed to enforce the desired state.- New integration tests to verify scenarios when current state for a
permission is
'GrantWithGrant'
but desired state should be'Grant'
.
- New integration tests to verify scenarios when current state for a
permission is
- Fixed method invocation failed because of missing
- SqlSetup
- The example
4-InstallNamedInstanceInFailoverClusterFirstNode.ps1
was updated to no longer reference the issue #405 and issue #444 in the comment-based help. The issues was fixed a while back and SqlSetup now supports the built-in parameterPsDscRunAsCredential
(issue #975).
- The example
Dependencies
- puppetlabs/pwshlib (>= 0.5.0 < 2.0.0)