Resource Type: dsc_sqlscript

Defined in:
lib/puppet/type/dsc_sqlscript.rb
Providers:
powershell

Overview

The DSC SqlScript resource type. Automatically generated from ‘SqlServerDsc/DSCResources/MSFT_SqlScript/MSFT_SqlScript.schema.mof’

To learn more about PowerShell Desired State Configuration, please visit technet.microsoft.com/en-us/library/dn249912.aspx.

For more information about built-in DSC Resources, please visit technet.microsoft.com/en-us/library/dn249921.aspx.

For more information about xDsc Resources, please visit github.com/PowerShell/DscResources.

Properties

  • ensure

    The basic property that the resource should be in.

    Supported values:
    • exists?
    • present

Parameters

  • dsc_credential

    Credential - The credentials to authenticate with, using SQL Authentication. To authenticate using Windows Authentication, assign the credentials to the built-in parameter ‘PsDscRunAsCredential’. If both parameters ‘Credential’ and ‘PsDscRunAsCredential’ are not assigned, then SYSTEM account will be used to authenticate using Windows Authentication.

  • dsc_getfilepath

    GetFilePath - Path to the T-SQL file that will perform Get action. Any values returned by the T-SQL queries will also be returned by the cmdlet Get-DscConfiguration through the ‘GetResult’ property.

  • dsc_getresult

    GetResult - Contains the values returned from the T-SQL script provided in the parameter ‘GetFilePath’ when cmdlet Get-DscConfiguration is run.

  • dsc_psdscrunascredential

    PsDscRunAsCredential

  • dsc_querytimeout

    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_serverinstance

    ServerInstance - The name of an instance of the Database Engine. For a default instance, only specify the computer name. For a named instance, use the format ComputerName\InstanceName

  • dsc_setfilepath

    SetFilePath - Path to the T-SQL file that will perform Set action.

  • dsc_testfilepath

    TestFilePath - 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.

  • dsc_variable

    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](technet.microsoft.com/en-us/library/mt683370.aspx)

  • name (namevar)
  • provider

    The specific backend to use for this ‘dsc_sqlscript` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.