Closed Kreby closed 1 year ago
Good suggestion. Sounds like a good idea with such assert being added.
I think we should add a command Assert-Feature
that can evaluate if a feature is available in a parent feature (like evaluate if a feature or parent feature is available in a certain SQL Server major version.SQLEngine
is part of parent feature SQL
), and also
List of available features and what is available in each version: https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-ver16#Feature
evaluate if a feature is available in a parent feature (like
SQLEngine
is part of parent featureSQL
)
On second though, that sound more like a Test-Feature
command. 🤔 That can be a separate issue.
Problem description
I've recently upgraded my SqlServerDSc module to 16.1.0 while adding in support for Sql Server 2022 and had issues getting a successful installation. Upon further investigation I found the issue is related to BC and CONN feature support. Those features have been deprecated in Sql Server 2022 but are allowed in the SqlSetup resource to support previous editions. The bug comes in because the following
I've fixed this by having different feature install list for 2022 and previous versions. Though the resource probably should just prevent you from supplying those features if the version is 2022 to prevent this behavior.
Verbose logs
DSC configuration
Suggested solution
I think the easiest thing would be to just add a check similar to the SSMS check but for any of the Tools features, BC, CONN, SDK that are no longer supported in 2022.
SQL Server edition and version
SQL Server PowerShell modules
Operating system
PowerShell version
SqlServerDsc version