Resource Type: dsc_sqlscriptquery
- Defined in:
- lib/puppet/type/dsc_sqlscriptquery.rb
Overview
The DSC SqlScriptQuery resource type. Automatically generated from version 16.6.0
Properties
-
dsc_disablevariables
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](docs.microsoft.com/en-us/powershell/module/sqlserver/Invoke-SqlCmd).
-
dsc_encrypt
Specifies how encryption should be enforced when using command ‘Invoke-SqlCmd`. When not specified, the default value is `Mandatory`.
-
dsc_getresult
Returns the result from the T-SQL script provided in the parameter GetQuery when Get was called.
-
dsc_querytimeout
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
Specifies the host name of the _SQL Server_ to be configured. Default value is the current computer name.
-
dsc_variable
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](docs.microsoft.com/en-us/powershell/module/sqlserver/Invoke-SqlCmd).
Parameters
-
dsc_credential
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_getquery (namevar)
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)
Specifies the name of the _SQL Server Database Engine_ instance. For the default instance specify the value ‘’MSSQLSERVER’‘.
-
dsc_psdscrunascredential
-
dsc_setquery (namevar)
Full T-SQL query that will perform Set action.
-
dsc_testquery (namevar)
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`.
-
dsc_timeout
The maximum time in seconds to wait for the DSC resource to complete.
-
name (namevar)
Description of the purpose for this resource declaration.
-
validation_mode
(defaults to: property)
Whether to check if the resource is in the desired state by property (default) or using Invoke-DscResource in Test mode (resource).