Releases: dsccommunity/SqlServerDsc
Releases · dsccommunity/SqlServerDsc
v13.0.0
- 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
andNew-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
- The function now make it more clear that when using the parameter
- 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.
- Now outputs the correct verbose messages when calculating the dynamic
- Changes to SqlServerRole
- Now outputs the correct verbose message when the members of a role is
not in desired state.
- Now outputs the correct verbose message when the members of a role is
- 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.
- Fix minor issue that when unable to connect to an instance. Instead
- Changes to SqlDatabaseRole
- BREAKING CHANGE: Refactored to enable creation/deletion of the database role
itself as well as management of the role members. Note that the resource no
longer adds database users. (issue #845,
issue #847,
issue #1252,
issue #1339).
Paul Shamus @pshamus
- BREAKING CHANGE: Refactored to enable creation/deletion of the database role
- 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).
- Add an Action type of 'Upgrade'. This will ask setup to do a version
- 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.
- Where a version upgrade has changed paths for a database engine, the
- 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).
- Added new parameter 'ReplaceExisting' with default false.
v12.5.0
- Changes to SqlServerSecureConnection
- Updated README and added example for SqlServerSecureConnection,
instructing users to use the 'SYSTEM' service account instead of
'LocalSystem'.
- Updated README and added example for SqlServerSecureConnection,
- Changes to SqlScript
- Correctly passes the
$VerbosePreference
to the helper function
Invoke-SqlScript
so thatPRINT
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.
- Correctly passes the
- Changes to SqlScriptQuery
- Correctly passes the
$VerbosePreference
to the helper function
Invoke-SqlScript
so thatPRINT
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.
- Correctly passes the
- 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
- Added en-US localization (issue #625).
- Changes to SqlServerPermission
- Added en-US localization (issue #619).
- 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 theEnsure
parameter to 'Absent'
(issue #1329). - Refactored unit tests to simplify them add add slightly more code
coverage.
- Changes to SqlServerMaxDop
- Added en-US localization (issue #616).
- 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 executeInitializeReportServer
CIM method, since executingSetDatabaseConnection
CIM method initializes
Reporting Services. - issue #864 SqlRs
can now initialise SSRS 2017 instances
- Reporting Services are restarted after changing settings, unless
- Changes to SqlServerLogin
- Added en-US localization (issue #615).
- Added unit tests to improved code coverage.
- Changes to SqlWindowsFirewall
- Added en-US localization (issue #614).
- Changes to SqlServerEndpoint
- Added en-US localization (issue #611).
- Changes to SqlServerEndpointPermission
- Added en-US localization (issue #612).
- Changes to SqlServerEndpointState
- Added en-US localization (issue #613).
- Changes to SqlDatabaseRole
- Added en-US localization (issue #610).
- Changes to SqlDatabaseRecoveryModel
- Added en-US localization (issue #609).
- Changes to SqlDatabasePermission
- Added en-US localization (issue #608).
- Changes to SqlDatabaseOwner
- Added en-US localization (issue #607).
- Changes to SqlDatabase
- Added en-US localization (issue #606).
- Changes to SqlAGListener
- Added en-US localization (issue #604).
- Changes to SqlAlwaysOnService
- Added en-US localization (issue #603).
- 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
- 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.
- Added new resources.
- 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).
- Updated Cim Class to Win32_ComputerSystem (instead of Win32_PhysicalMemory)
- 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 parameterFeatureFlag
is set to'DetectionSharedFeatures'
(issue #1105). - Added a new helper function
Get-InstalledSharedFeatures
to move out
some of the code from theGet-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).
- Split integration tests into two jobs, one for running integration tests
- 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.
- Fix MatchDatabaseOwner to check for CONTROL SERVER, IMPERSONATE LOGIN, or
- Changes to SqlAG
- Updated documentation on the behaviour of defaults as they only apply when
creating a group.
- Updated documentation on the behaviour of defaults as they only apply when
- 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).
- AvailabilityMode, BackupPriority, and FailoverMode defaults only apply when
- 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).
- No longer does the Test-TargetResource fail on the second test run
v12.3.0
- 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.
- Reverting the change that was made as part of the
- 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
). NowGet-TargetResource
return the same values
that can be passed as values in the parameterServiceType
(issue #981).
- Fixed Get-ServiceObject when searching for Integration Services service.
- 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).
- Fixed issue in Test-TargetResource to valid password on disabled accounts
- 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).
- Updated the integration test to stop the named instance while installing
- Changes to SqlServerEndpoint
- Add the optional parameter Owner. The default owner remains the login used
for the creation of the endpoint
(issue #1251).
Maxime Daniou (@mdaniou) - Add integration tests
(issue #744).
Maxime Daniou (@mdaniou)
- Add the optional parameter Owner. The default owner remains the login used
v12.2.0
- 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)
- Added a link to the new xADObjectPermissionEntry examples in
- During testing in AppVeyor the Build Worker is restarted in the install
- Change to SqlServerLogin so it doesn't check properties for absent logins.
- Fix for (issue #1096)
v12.1.0
- 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.
- Add support for validating the code with the DSC ResourceKit
- 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.
- Adding verbose message in Connect-SQL so it
- 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).
- Fixed so that when importing SQLPS it imports
- Changes to SqlAg, SqlAGDatabase, and SqlAGReplica examples
- Included configuration for SqlAlwaysOnService to enable
HADR on each node to avoid confusion
(issue #1182).
- Included configuration for SqlAlwaysOnService to enable
- 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.
- Create aliases for cmdlets in the stubbed module which have aliases
- New DSC resource SqlServerSecureConnection
- New resource to configure a SQL Server instance for encrypted SQL
connections.
- New resource to configure a SQL Server instance for encrypted SQL
- Changes to SqlAlwaysOnService
- Updated integration tests to use NetworkingDsc
(issue #1129).
- Updated integration tests to use NetworkingDsc
- 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).
- Fix unit tests that didn't mock some of the calls. It no longer fail
v12.0.0
- 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.
- DisplayName is now properly treated as display name
- Changes to SqlAGDatabase
- Corrected reference to "PsDscRunAsAccount" in documentation
(issue #1199).
Nick Reilingh (@NReilingh)
- Corrected reference to "PsDscRunAsAccount" in documentation
- Changes to SqlDatabaseOwner
- BREAKING CHANGE: Support multiple instances on the same node.
The parameter InstanceName is now Key and cannot be omitted
(issue #1197).
- BREAKING CHANGE: Support multiple instances on the same node.
- 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)
- Added new parameters to allow to define the startup types for the Sql Engine
v11.4.0
- Changes to SqlServerDsc
- Updated helper function Restart-SqlService to have to new optional parameters
SkipClusterCheck
andSkipWaitForOnline
. 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.
- To only import module if the
- Updated all the examples and integration tests to not use
PSDscAllowPlainTextPassword
, so examples using credentials or
passwords by default are secure.
- Updated helper function Restart-SqlService to have to new optional parameters
- Changes to SqlAlwaysOnService
- Integration tests was updated to handle new IPv6 addresses on the AppVeyor
build worker (issue #1155).
- Integration tests was updated to handle new IPv6 addresses on the AppVeyor
- 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.
- Removed excess
- 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.
- Now after a successful install the "SQL PowerShell module" is reevaluated and
v11.3.0
- 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:
- Added SqlScriptQueryResource. Chase Wilson (@chasewilson)
- Fix for issue #779 Paul Kelly (@prkelly)
- Moved decoration for integration test to resolve a breaking change in
v11.2.0
- 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.
- New-IntegrationLoopbackAdapter: Installs the PowerShell module
- Enabled PSSA rule violations to fail build in the CI environment.
- Renamed SqlServerDsc.psd1 to be consistent
(issue #1116).
Glenn Sarti (@glennsarti)
- Added new test helper functions in the CommonTestHelpers module. These are used
- Changes to Unit Tests
- Updated
the following resources unit test template to version 1.2.1- SqlWaitForAG (issue #1088).
Michael Fyffe (@TraGicCode)
- SqlWaitForAG (issue #1088).
- Updated
- 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.
- Updated the integration tests to use a loopback adapter to be less intrusive
- 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.
- Updated the integration tests to stop some services after each integration test.
- 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).
- Updated the integration tests to stop the Reporting Services service after
- 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.
- Updated the integration tests to stop some services after each integration test.
- Changes to SqlServerDatabaseMail
- Fixed Script Analyzer rule error.