Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlSetup: Updated documentation for BrowserSvcStartupType #1635

Merged
merged 2 commits into from
Nov 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

- SqlRole
- Major overhaul of resource
- BREAKING CHANGE: Removed decision making from get-TargetResource; this prevented a simple solution for
issue #550. it now just tels if a role exists or not. And what members are in that
role. MembersToInclude and MembersToExclude now always return $null
- Added sanitize function (Get-CorrectedMemberParameters) to make it so for the
sysadmin role SA does not get altered. ([issue #550](https://github.com/dsccommunity/SqlServerDsc/issues/550))
- added lots of tests.
- Major overhaul of resource.
- BREAKING CHANGE: Removed decision making from get-TargetResource; this
prevented a simple solution for issue #550. it now just tels if a role
exists or not. And what members are in that role. MembersToInclude and
MembersToExclude now always return $null.
- Added sanitize function (`Get-CorrectedMemberParameters`) to make it
so for the sysadmin role SA does not get altered ([issue #550](https://github.com/dsccommunity/SqlServerDsc/issues/550)).
- Added lots of tests.
- SqlSetup
- Added a note to the documentation that the parameter `BrowserSvcStartupType`
cannot be used for configurations that utilize the `'InstallFailoverCluster'`
action ([issue #1627](https://github.com/dsccommunity/SqlServerDsc/issues/1627)).
- Minor change to the evaluation of the parameter `BrowserSvcStartupType`,
if it has an assigned a value or not.

### Added

Expand Down
4 changes: 2 additions & 2 deletions source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ function Set-TargetResource

$setupArguments = @{}

if ($PSBoundParameters.ContainsKey('SkipRule') )
if ($PSBoundParameters.ContainsKey('SkipRule'))
{
$setupArguments['SkipRules'] = @($SkipRule)
}
Expand Down Expand Up @@ -1237,7 +1237,7 @@ function Set-TargetResource
)
}

if ($null -ne $BrowserSvcStartupType)
if ($PSBoundParameters.ContainsKey('BrowserSvcStartupType'))
{
$argumentVars += 'BrowserSvcStartupType'
}
Expand Down
39 changes: 21 additions & 18 deletions source/DSCResources/DSC_SqlSetup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,33 @@ The `SqlSetup` DSC resource installs SQL Server on the target node.
## Requirements

- Target machine must be running Windows Server 2012 or later.
- For configurations that utilize the 'InstallFailoverCluster' action, the following
- For configurations that utilize the `'InstallFailoverCluster'` action, the following
parameters are required (beyond those required for the standalone installation).
See the article [Install SQL Server from the Command Prompt](https://msdn.microsoft.com/en-us/library/ms144259.aspx)
under the section [Failover Cluster Parameters](https://msdn.microsoft.com/en-us/library/ms144259.aspx#Anchor_8)
See the article [Install SQL Server from the Command Prompt](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt)
under the section [Failover Cluster Parameters](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#ClusterInstall)
for more information.
- InstanceName (can be MSSQLSERVER if you want to install a default clustered
instance).
- FailoverClusterNetworkName
- FailoverClusterIPAddress
- `InstanceName` (can be `'MSSQLSERVER'` if you want to install a default
clustered instance).
- `FailoverClusterNetworkName`
- `FailoverClusterIPAddress`
- Additional parameters needed when installing Database Engine.
- InstallSQLDataDir
- AgtSvcAccount
- SQLSvcAccount
- SQLSysAdminAccounts
- `InstallSQLDataDir`
- `AgtSvcAccount`
- `SQLSvcAccount`
- `SQLSysAdminAccounts`
- Additional parameters needed when installing Analysis Services.
- ASSysAdminAccounts
- AsSvcAccount
- `ASSysAdminAccounts`
- `AsSvcAccount`
- These parameters cannot be used for configurations that utilize the
`'InstallFailoverCluster'` action:
- `BrowserSvcStartupType`
- The parameters below can only be used when installing SQL Server 2016 or
later:
- SqlTempdbFileCount
- SqlTempdbFileSize
- SqlTempdbFileGrowth
- SqlTempdbLogFileSize
- SqlTempdbLogFileGrowth
- `SqlTempDbFileCount`
- `SqlTempDbFileSize`
- `SqlTempDbFileGrowth`
- `SqlTempDbLogFileSize`
- `SqlTempDbLogFileGrowth`
- When installing _SQL Server Analysis Services_ the account used to start
the service must have the correct permissions in directory tree for the
data folders. If not the service can fail with an access denied error.
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/DSC_SqlSetup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2145,6 +2145,7 @@ try
SqlTempDbFileGrowth = 128
SqlTempDbLogFileSize = 128
SqlTempDbLogFileGrowth = 128
BrowserSvcStartupType = 'Automatic'
}

if ( $mockSqlMajorVersion -in (13,14) )
Expand Down Expand Up @@ -2179,6 +2180,7 @@ try
SqlTempDbFileGrowth = 128
SqlTempDbLogFileSize = 128
SqlTempDbLogFileGrowth = 128
BrowserSvcStartupType = 'Automatic'
}

{ Set-TargetResource @testParameters } | Should -Not -Throw
Expand Down