From 5035d2d6a002d1d3b3618c7f0f2409bd23cf962b Mon Sep 17 00:00:00 2001 From: Fiander <51764122+Fiander@users.noreply.github.com> Date: Sat, 12 Dec 2020 09:02:27 +0100 Subject: [PATCH] SqlProtocol: Changes datatype for schema property KeepAlive (#1646) - SqlProtocol - Changed KeepAlive Type from UInt16 to Int32 to reflect te actual WMI.ManagementObject (issue #1645). --- CHANGELOG.md | 3 +++ source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 | 6 +++--- .../DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.schema.mof | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe820d58e..813bdf634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SqlMaxDop - Fixes ([issue #396](https://github.com/dsccommunity/SqlServerDsc/issues/396)). Added three return values in Get-Target resource. +- SqlProtocol + - Changed KeepAlive Type from UInt16 to Int32 to reflect te actual WMI.ManagementObject + Fixes #1645 ([issue #1645](https://github.com/dsccommunity/SqlServerDsc/issues/1645)). ## [15.0.0] - 2020-12-06 diff --git a/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 b/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 index 330ea7723..1e5ac317c 100644 --- a/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 +++ b/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.psm1 @@ -208,7 +208,7 @@ function Set-TargetResource $ListenOnAllIpAddresses, [Parameter()] - [System.UInt16] + [System.Int32] $KeepAlive, [Parameter()] @@ -429,7 +429,7 @@ function Test-TargetResource $ListenOnAllIpAddresses, [Parameter()] - [System.UInt16] + [System.Int32] $KeepAlive, [Parameter()] @@ -541,7 +541,7 @@ function Compare-TargetResourceState $ListenOnAllIpAddresses, [Parameter()] - [System.UInt16] + [System.Int32] $KeepAlive, [Parameter()] diff --git a/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.schema.mof b/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.schema.mof index bd2f24ea3..12befc99b 100644 --- a/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.schema.mof +++ b/source/DSCResources/DSC_SqlProtocol/DSC_SqlProtocol.schema.mof @@ -6,7 +6,7 @@ class DSC_SqlProtocol : OMI_BaseResource [Write, Description("Specifies the host name of the _SQL Server_ to be configured. If the SQL Server belongs to a cluster or availability group specify the host name for the listener or cluster group. Default value is $env:COMPUTERNAME.")] String ServerName; [Write, Description("Specifies if the protocol should be enabled or disabled.")] Boolean Enabled; [Write, Description("Specifies to listen on all IP addresses. Only used for the _TCP/IP_ protocol, ignored for all other protocols.")] Boolean ListenOnAllIpAddresses; - [Write, Description("Specifies the keep alive duration in milliseconds. Only used for the _TCP/IP_ protocol, ignored for all other protocols.")] UInt16 KeepAlive; + [Write, Description("Specifies the keep alive duration in milliseconds. Only used for the _TCP/IP_ protocol, ignored for all other protocols.")] SInt32 KeepAlive; [Write, Description("Specifies the name of the named pipe. Only used for the _Named Pipes_ protocol, ignored for all other protocols.")] String PipeName; [Write, Description("If set to `$true` then the any attempt by the resource to restart the service is suppressed. The default value is `$false`.")] Boolean SuppressRestart; [Write, Description("Timeout value for restarting the _SQL Server_ services. The default value is `120` seconds.")] UInt16 RestartTimeout;