File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -630,8 +630,7 @@ class SqlDatabase : SqlResourceBase
630630 $LegacyCardinalityEstimationForSecondary
631631
632632 [DscProperty ()]
633- [ValidateSet (' Off' , ' Full' , ' Unknown' )]
634- [System.String ]
633+ [MirroringSafetyLevel ]
635634 $MirroringSafetyLevel
636635
637636 [DscProperty ()]
@@ -856,14 +855,16 @@ class SqlDatabase : SqlResourceBase
856855 # RetentionPeriodUnits enum (convert SMO enum to module enum)
857856 $currentState.ChangeTrackingRetentionPeriodUnits = [RetentionPeriodUnits ] $databaseObject.ChangeTrackingRetentionPeriodUnits.ToString ()
858857
858+ # MirroringSafetyLevel enum (convert SMO enum to module enum)
859+ $currentState.MirroringSafetyLevel = [MirroringSafetyLevel ] $databaseObject.MirroringSafetyLevel.ToString ()
860+
859861 # Enum properties (convert to string with null check)
860862 $enumProperties = @ (
861863 ' ContainmentType'
862864 ' DelayedDurability'
863865 ' FilestreamNonTransactedAccess'
864866 ' LegacyCardinalityEstimation'
865867 ' LegacyCardinalityEstimationForSecondary'
866- ' MirroringSafetyLevel'
867868 ' PageVerify'
868869 ' ParameterSniffing'
869870 ' ParameterSniffingForSecondary'
Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Enum for database mirroring safety level.
4+
5+ . DESCRIPTION
6+ This enum represents the mirroring safety level for a database.
7+ The value None (0) indicates that mirroring is not configured for the
8+ database.
9+ #>
10+ enum MirroringSafetyLevel
11+ {
12+ None = 0
13+ Unknown = 1
14+ Off = 2
15+ Full = 3
16+ }
You can’t perform that action at this time.
0 commit comments