Skip to content

Releases: dsccommunity/SqlServerDsc

v13.0.0

25 Dec 09:18
601107e
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • Added SqlAgentAlert resource.
    • Opt-in to the common test 'Common Test - Validation Localization'.
    • Opt-in to the common test 'Common Test - Flagged Script Analyzer Rules'
      (issue #1101).
    • Removed the helper function New-TerminatingError, New-WarningMessage
      and New-VerboseMessage in favor of the the new
      localization helper functions.
    • Combine DscResource.LocalizationHelper and DscResource.Common into
      SqlServerDsc.Common (issue #1357).
    • Update Assert-TestEnvironment.ps1 to not error if strict mode is enabled
      and there are no missing dependencies (issue #1368).
  • Changes to SqlServerDsc.Common
    • Added StatementTimeout to function 'Connect-SQL' with default 600 seconds (10mins).
    • Added StatementTimeout to function 'Invoke-Query' with default 600 seconds (10mins)
      (issue #1358).
    • Changes to helper function Connect-SQL
      • The function now make it more clear that when using the parameter
        SetupCredential is impersonates that user, and by default it does
        not impersonates a user but uses the credential that the resource
        is run as (for example the built-in credential parameter
        PsDscRunAsCredential). @kungfu71186
      • Added parameter alias -DatabaseCredential for the parameter
        -SetupCredential. @kungfu71186
  • Changes to SqlAG
    • Added en-US localization.
  • Changes to SqlAGReplica
    • Added en-US localization.
    • Improved verbose message output when creating availability group replica,
      removing a availability group replica, and joining the availability
      group replica to the availability group.
  • Changes to SqlAlwaysOnService
    • Now outputs the correct verbose message when restarting the service.
  • Changes to SqlServerMemory
    • Now outputs the correct verbose messages when calculating the dynamic
      memory, and when limiting maximum memory.
  • Changes to SqlServerRole
    • Now outputs the correct verbose message when the members of a role is
      not in desired state.
  • Changes to SqlAgentOperator
    • Fix minor issue that when unable to connect to an instance. Instead
      of showing a message saying that connect failed another unrelated
      error message could have been shown, because of an error in the code.
    • Fix typo in test it block.
  • Changes to SqlDatabaseRole
  • Changes to SqlSetup
    • Add an Action type of 'Upgrade'. This will ask setup to do a version
      upgrade where possible (issue #1368).
    • Fix an error when testing for DQS installation (issue #1368).
    • Changed the logic of how default value of FailoverClusterGroupName is
      set since that was preventing the resource to be able to be debugged
      (issue #448).
    • Added RSInstallMode parameter (issue #1163).
  • Changes to SqlWindowsFirewall
    • Where a version upgrade has changed paths for a database engine, the
      existing firewall rule for that instance will be updated rather than
      another one created (issue #1368).
      Other firewall rules can be fixed to work in the same way later.
  • Changes to SqlAGDatabase
    • Added new parameter 'ReplaceExisting' with default false.
      This allows forced restores when a database already exists on secondary.
    • Added StatementTimeout to Invoke-Query to fix Issue#1358
    • Fix issue where calling Get would return an error because the database
      name list may have been returned as a string instead of as a string array
      (issue #1368).

v12.5.0

25 Dec 09:17
af2cbb0
Compare
Choose a tag to compare
  • Changes to SqlServerSecureConnection
    • Updated README and added example for SqlServerSecureConnection,
      instructing users to use the 'SYSTEM' service account instead of
      'LocalSystem'.
  • Changes to SqlScript
    • Correctly passes the $VerbosePreference to the helper function
      Invoke-SqlScript so that PRINT statements is outputted correctly
      when verbose output is requested, e.g
      Start-DscConfiguration -Verbose.
    • Added en-US localization (issue #624).
    • Added additional unit tests for code coverage.
  • Changes to SqlScriptQuery
    • Correctly passes the $VerbosePreference to the helper function
      Invoke-SqlScript so that PRINT statements is outputted correctly
      when verbose output is requested, e.g
      Start-DscConfiguration -Verbose.
    • Added en-US localization.
    • Added additional unit tests for code coverage.
  • Changes to SqlSetup
    • Concatenated Robocopy localization strings (issue #694).
    • Made the error message more descriptive when the Set-TargetResource
      function calls the Test-TargetResource function to verify the desired
      state.
  • Changes to SqlWaitForAG
  • Changes to SqlServerPermission
  • Changes to SqlServerMemory
    • Added en-US localization (issue #617).
    • No longer will the resource set the MinMemory value if it was provided
      in a configuration that also set the Ensure parameter to 'Absent'
      (issue #1329).
    • Refactored unit tests to simplify them add add slightly more code
      coverage.
  • Changes to SqlServerMaxDop
  • Changes to SqlRS
    • Reporting Services are restarted after changing settings, unless
      $SuppressRestart parameter is set (issue #1331).
      $SuppressRestart will also prevent Reporting Services restart after initialization.
    • Fixed one of the error handling to use localization, and made the
      error message more descriptive when the Set-TargetResource function
      calls the Test-TargetResource function to verify the desired
      state. This was done prior to adding full en-US localization.
    • Fixed (issue #1258).
      When initializing Reporting Services, there is no need to execute InitializeReportServer
      CIM method, since executing SetDatabaseConnection CIM method initializes
      Reporting Services.
    • issue #864 SqlRs
      can now initialise SSRS 2017 instances
  • Changes to SqlServerLogin
    • Added en-US localization (issue #615).
    • Added unit tests to improved code coverage.
  • Changes to SqlWindowsFirewall
  • Changes to SqlServerEndpoint
  • Changes to SqlServerEndpointPermission
  • Changes to SqlServerEndpointState
  • Changes to SqlDatabaseRole
  • Changes to SqlDatabaseRecoveryModel
  • Changes to SqlDatabasePermission
  • Changes to SqlDatabaseOwner
  • Changes to SqlDatabase
  • Changes to SqlAGListener
  • Changes to SqlAlwaysOnService
  • Changes to SqlAlias
    • Added en-US localization (issue #602).
    • Removed ShouldProcess for the code, since it has no purpose in a DSC
      resource (issue #242).
  • Changes to SqlServerReplication
    • Added en-US localization (issue #620).
    • Refactored Get-TargetResource slightly so it provide better verbose
      messages.

v12.4.0

25 Dec 09:17
13cc150
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • Added new resources.
      • SqlRSSetup
    • Added helper module DscResource.Common from the repository
      DscResource.Template.
      • Moved all helper functions from SqlServerDscHelper.psm1 to DscResource.Common.
      • Renamed Test-SqlDscParameterState to Test-DscParameterState.
      • New-TerminatingError error text for a missing localized message now matches
        the output even if the "missing localized message" localized message is
        also missing.
    • Added helper module DscResource.LocalizationHelper from the repository
      DscResource.Template, this replaces the helper module CommonResourceHelper.psm1.
    • Cleaned up unit tests, mostly around loading cmdlet stubs and loading
      classes stubs, but also some tests that were using some odd variants.
    • Fix all integration tests according to issue PowerShell/DscResource.Template#14.
  • Changes to SqlServerMemory
    • Updated Cim Class to Win32_ComputerSystem (instead of Win32_PhysicalMemory)
      because the correct memory size was not being detected correctly on Azure VMs
      (issue #914).
  • Changes to SqlSetup
    • Split integration tests into two jobs, one for running integration tests
      for SQL Server 2016 and another for running integration test for
      SQL Server 2017 (issue #858).
    • Localized messages for Master Data Services no longer start and end with
      single quote.
    • When installing features a verbose message is written if a feature is found
      to already be installed. It no longer quietly removes the feature from the
      /FEATURES argument.
    • Cleaned up a bit in the tests, removed excessive piping.
    • Fixed minor typo in examples.
    • A new optional parameter FeatureFlag parameter was added to control
      breaking changes. Functionality added under a feature flag can be
      toggled on or off, and could be changed later to be the default.
      This way we can also make more of the new functionalities the default
      in the same breaking change release (issue #1105).
    • Added a new way of detecting if the shared feature CONN (Client Tools
      Connectivity, and SQL Client Connectivity SDK), BC (Client Tools
      Backwards Compatibility), and SDK (Client Tools SDK) is installed or
      not. The new functionality is used when the parameter FeatureFlag
      is set to 'DetectionSharedFeatures' (issue #1105).
    • Added a new helper function Get-InstalledSharedFeatures to move out
      some of the code from the Get-TargetResource to make unit testing
      easier and faster.
    • Changed the logic of 'Build the argument string to be passed to setup' to
      not quote the value if root directory is specified
      (issue #1254).
    • Moved some resource specific helper functions to the new helper module
      DscResource.Common so they can be shared with the new resource SqlRSSetup.
    • Improved verbose messages in Test-TargetResource function to more
      clearly tell if features are already installed or not.
    • Refactored unit tests for the functions Test-TargetResource and
      Set-TargetResource to improve testing speed.
    • Modified the Test-TargetResource and Set-TargetResource to not be
      case-sensitive when comparing feature names. This was handled
      correctly in real-world scenarios, but failed when running the unit
      tests (and testing casing).
  • Changes to SqlAGDatabase
    • Fix MatchDatabaseOwner to check for CONTROL SERVER, IMPERSONATE LOGIN, or
      CONTROL LOGIN permission in addition to IMPERSONATE ANY LOGIN.
    • Update and fix MatchDatabaseOwner help text.
  • Changes to SqlAG
    • Updated documentation on the behaviour of defaults as they only apply when
      creating a group.
  • Changes to SqlAGReplica
    • AvailabilityMode, BackupPriority, and FailoverMode defaults only apply when
      creating a replica not when making changes to an existing replica. Explicit
      parameters will still change existing replicas (issue #1244).
    • ReadOnlyRoutingList now gets updated without throwing an error on the first
      run (issue #518).
    • Test-Resource fixed to report whether ReadOnlyRoutingList desired state
      has been reached correctly (issue #1305).
  • Changes to SqlDatabaseDefaultLocation
    • No longer does the Test-TargetResource fail on the second test run
      when the backup file path was changed, and the path was ending with
      a backslash (issue #1307).

v12.3.0

25 Dec 09:17
c560f54
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • Reverting the change that was made as part of the
      issue #1260
      in the previous release, as it only mitigated the issue, it did not
      solve the issue.
    • Removed the container testing since that broke the integration tests,
      possible due to using excessive amount of memory on the AppVeyor build
      worker. This will make the unit tests to take a bit longer to run
      (issue #1260).
    • The unit tests and the integration tests are now run in two separate
      build workers in AppVeyor. One build worker runs the integration tests,
      while a second build worker runs the unit tests. The build workers runs
      in parallel on paid accounts, but sequentially on free accounts
      (issue #1260).
    • Clean up error handling in some of the integration tests that was
      part of a workaround for a bug in Pester. The bug is resolved, and
      the error handling is not again built into Pester.
    • Speeding up the AppVeyor tests by splitting the common tests in a
      separate build job.
    • Updated the appveyor.yml to have the correct build step, and also
      correct run the build step only in one of the jobs.
    • Update integration tests to use the new integration test template.
    • Added SqlAgentOperator resource.
  • Changes to SqlServiceAccount
    • Fixed Get-ServiceObject when searching for Integration Services service.
      Unlike the rest of SQL Server services, the Integration Services service
      cannot be instanced, however you can have multiple versions installed.
      Get-Service object would return the correct service name that you
      are looking for, but it appends the version number at the end. Added
      parameter VersionNumber so the search would return the correct
      service name.
    • Added code to allow for using Managed Service Accounts.
    • Now the correct service type string value is returned by the function
      Get-TargetResource. Previously one value was passed in as a parameter
      (e.g. DatabaseEngine), but a different string value as returned
      (e.g. SqlServer). Now Get-TargetResource return the same values
      that can be passed as values in the parameter ServiceType
      (issue #981).
  • Changes to SqlServerLogin
    • Fixed issue in Test-TargetResource to valid password on disabled accounts
      (issue #915).
    • Now when adding a login of type SqlLogin, and the SQL Server login mode
      is set to 'Integrated', an error is correctly thrown
      (issue #1179).
  • Changes to SqlSetup
    • Updated the integration test to stop the named instance while installing
      the other instances to mitigate
      issue #1260.
    • Add parameters to configure the Tempdb files during the installation of
      the instance. The new parameters are SqlTempdbFileCount, SqlTempdbFileSize,
      SqlTempdbFileGrowth, SqlTempdbLogFileSize and SqlTempdbLogFileGrowth
      (issue #1167).
  • Changes to SqlServerEndpoint

v12.2.0

25 Dec 09:17
7fa69d2
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • During testing in AppVeyor the Build Worker is restarted in the install
      step to make sure the are no residual changes left from a previous SQL
      Server install on the Build Worker done by the AppVeyor Team
      (issue #1260).
    • Code cleanup: Change parameter names of Connect-SQL to align with resources.
    • Updated README.md in the Examples folder.
      • Added a link to the new xADObjectPermissionEntry examples in
        ActiveDirectory, fixed a broken link and a typo.
        Adam Rush (@adamrushuk)
  • Change to SqlServerLogin so it doesn't check properties for absent logins.

v12.1.0

25 Dec 09:16
5cf11f7
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • Add support for validating the code with the DSC ResourceKit
      Script Analyzer rules, both in Visual Studio Code and directly using
      Invoke-ScriptAnalyzer.
    • Opt-in for common test "Common Tests - Validate Markdown Links".
    • Updated broken links in \README.md and in \Examples\README.md
    • Opt-in for common test 'Common Tests - Relative Path Length'.
    • Updated the Installation section in the README.md.
    • Updated the Contributing section in the README.md after
      Style Guideline and Best Practices guidelines
      has merged into one document.
    • To speed up testing in AppVeyor, unit tests are now run in two containers.
    • Adding the PowerShell script Assert-TestEnvironment.ps1 which
      must be run prior to running any unit tests locally with
      Invoke-Pester.
      Read more in the specific contributing guidelines, under the section
      Unit Tests.
  • Changes to SqlServerDscHelper
    • Fix style guideline lint errors.
    • Changes to Connect-SQL
      • Adding verbose message in Connect-SQL so it
        now shows the username that is connecting.
    • Changes to Import-SQLPS
      • Fixed so that when importing SQLPS it imports
        using the path (and not the .psd1 file).
      • Fixed so that the verbose message correctly
        shows the name, version and path when importing
        the module SQLPS (it did show correctly for the
        SqlServer module).
  • Changes to SqlAg, SqlAGDatabase, and SqlAGReplica examples
    • Included configuration for SqlAlwaysOnService to enable
      HADR on each node to avoid confusion
      (issue #1182).
  • Changes to SqlServerDatabaseMail
    • Minor update to Ensure parameter description in the README.md.
  • Changes to Write-ModuleStubFile.ps1
    • Create aliases for cmdlets in the stubbed module which have aliases
      (issue #1224).
      Dan Reist (@randomnote1)
    • Use a string builder to build the function stubs.
    • Fixed formatting issues for the function to work with modules other
      than SqlServer.
  • New DSC resource SqlServerSecureConnection
    • New resource to configure a SQL Server instance for encrypted SQL
      connections.
  • Changes to SqlAlwaysOnService
    • Updated integration tests to use NetworkingDsc
      (issue #1129).
  • Changes to SqlServiceAccount
    • Fix unit tests that didn't mock some of the calls. It no longer fail
      when a SQL Server installation is not present on the node running the
      unit test (issue #983).

v12.0.0

25 Dec 09:16
cf6383a
Compare
Choose a tag to compare
  • Changes to SqlServerDatabaseMail
    • DisplayName is now properly treated as display name
      for the originating email address (issue #1200).
      Nick Reilingh (@NReilingh)
      • DisplayName property now defaults to email address instead of server name.
      • Minor improvements to documentation.
  • Changes to SqlAGDatabase
  • Changes to SqlDatabaseOwner
    • BREAKING CHANGE: Support multiple instances on the same node.
      The parameter InstanceName is now Key and cannot be omitted
      (issue #1197).
  • Changes to SqlSetup
    • Added new parameters to allow to define the startup types for the Sql Engine
      service, the Agent service, the Analysis service and the Integration Service.
      The new optional parameters are respectively SqlSvcStartupType, AgtSvcStartupType,
      AsSvcStartupType, IsSvcStartupType and RsSvcStartupType (issue #1165.
      Maxime Daniou (@mdaniou)

v11.4.0

25 Dec 09:16
33d2093
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • Updated helper function Restart-SqlService to have to new optional parameters
      SkipClusterCheck and SkipWaitForOnline. This was to support more aspects
      of the resource SqlServerNetwork.
    • Updated helper function Import-SQLPSModule
      • To only import module if the
        module does not exist in the session.
      • To always import the latest version of 'SqlServer' or 'SQLPS' module, if
        more than one version exist on the target node. It will still prefer to
        use 'SqlServer' module.
    • Updated all the examples and integration tests to not use
      PSDscAllowPlainTextPassword, so examples using credentials or
      passwords by default are secure.
  • Changes to SqlAlwaysOnService
    • Integration tests was updated to handle new IPv6 addresses on the AppVeyor
      build worker (issue #1155).
  • Changes to SqlServerNetwork
    • Refactor SqlServerNetwork to not load assembly from GAC (issue #1151).
    • The resource now supports restarting the SQL Server service when both
      enabling and disabling the protocol.
    • Added integration tests for this resource
      (issue #751).
  • Changes to SqlAG
    • Removed excess Import-SQLPSModule call.
  • Changes to SqlSetup
    • Now after a successful install the "SQL PowerShell module" is reevaluated and
      forced to be reimported into the session. This is to support that a never
      version of SQL Server was installed side-by-side so that SQLPS module should
      be used instead.

v11.3.0

25 Dec 09:15
42d4650
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • Moved decoration for integration test to resolve a breaking change in
      DscResource.Tests.
    • Activated the GitHub App Stale on the GitHub repository.
    • Added a CODE_OF_CONDUCT.md with the same content as in the README.md
      issue #939.
    • New resources:
    • Fix for issue #779 Paul Kelly (@prkelly)

v11.2.0

25 Dec 09:15
d804b8c
Compare
Choose a tag to compare
  • Changes to SqlServerDsc
    • Added new test helper functions in the CommonTestHelpers module. These are used
      by the integration tests.
      • New-IntegrationLoopbackAdapter: Installs the PowerShell module
        'LoopbackAdapter' from PowerShell Gallery and creates a new network
        loopback adapter.
      • Remove-IntegrationLoopbackAdapter: Removes a new network loopback adapter.
      • Get-NetIPAddressNetwork: Returns the IP network address from an IPv4 address
        and prefix length.
    • Enabled PSSA rule violations to fail build in the CI environment.
    • Renamed SqlServerDsc.psd1 to be consistent
      (issue #1116).
      Glenn Sarti (@glennsarti)
  • Changes to Unit Tests
  • Changes to SqlAlwaysOnService
    • Updated the integration tests to use a loopback adapter to be less intrusive
      in the build worker environment.
    • Minor code cleanup in integration test, fixed the scope on variable.
  • Changes to SqlSetup
    • Updated the integration tests to stop some services after each integration test.
      This is to save memory on the AppVeyor build worker.
    • Updated the integration tests to use a SQL Server 2016 Service Pack 1.
    • Fixed Script Analyzer rule error.
  • Changes to SqlRS
    • Updated the integration tests to stop the Reporting Services service after
      the integration test. This is to save memory on the AppVeyor build worker.
    • The helper function Restart-ReportingServicesService should no longer timeout
      when restarting the service (issue #1114).
  • Changes to SqlServiceAccount
    • Updated the integration tests to stop some services after each integration test.
      This is to save memory on the AppVeyor build worker.
  • Changes to SqlServerDatabaseMail
    • Fixed Script Analyzer rule error.