Skip to content

Commit eb22a3f

Browse files
committed
Test-SqlDscDatabaseProperty: Validate SQL Server database properties
1 parent e3f5e58 commit eb22a3f

File tree

7 files changed

+2455
-16
lines changed

7 files changed

+2455
-16
lines changed

.vscode/settings.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,23 @@
9191
"SOURCEBRANCHNAME",
9292
"setvariable",
9393
"RAISERROR",
94-
"filegroup"
94+
"filegroup",
95+
"checkdb",
96+
"msdb",
97+
"db_datawriter",
98+
"db_ddladmin",
99+
"db_owner",
100+
"db_accessadmin",
101+
"db_securityadmin",
102+
"db_backupoperator",
103+
"db_denydatareader",
104+
"db_denydatawriter",
105+
"OLTP",
106+
"LCID",
107+
"varchar",
108+
"maxdop",
109+
"hotfixes",
110+
"checkpointing"
95111
],
96112
"cSpell.ignorePaths": [
97113
".git"

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9393
- Added integration tests for `Test-SqlDscIsDatabasePrincipal` command to ensure
9494
it functions correctly in real environments
9595
[issue #2231](https://github.com/dsccommunity/SqlServerDsc/issues/2231).
96+
- Added public command `Test-SqlDscDatabaseProperty` to test database properties
97+
on SQL Server Database Engine instances. This command supports two parameter sets:
98+
`ServerObject` with `DatabaseName`, and `DatabaseObject` (from `Get-SqlDscDatabase`).
99+
It allows users to specify any non-collection properties of the SMO Database object
100+
as dynamic parameters to test, returning `$true` if all tested properties match
101+
their expected values, and `$false` otherwise. This command improves maintainability
102+
of SQL DSC resources and provides granular database configuration testing
103+
[issue #2306](https://github.com/dsccommunity/SqlServerDsc/issues/2306).
96104

97105
### Fixed
98106

0 commit comments

Comments
 (0)