CPU Usage for SQL Instance Datasource

Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.DataSource (DataSourceModuleType)

Datasource for CPU Usage for SQL Instance

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeSystem.PropertyBagData

Member Modules:

ID Module Type TypeId RunAs 
Scheduler DataSource System.Scheduler Default
PS ProbeAction Microsoft.Windows.PowerShellPropertyBagProbe Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Interval SecondsInterval Seconds
TimeoutSecondsint$Config/TimeoutSeconds$Timeout SecondsTimeout Seconds
SyncTimestring$Config/SyncTime$Synchronization TimeSynchronization Time

Source Code:

<DataSourceModuleType ID="Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.DataSource" Accessibility="Public">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SyncTime" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ComputerName" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
<OverrideableParameter ID="SyncTime" Selector="$Config/SyncTime$" ParameterType="string"/>
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource ID="Scheduler" TypeID="System!System.Scheduler">
<Scheduler>
<SimpleReccuringSchedule>
<Interval>$Config/IntervalSeconds$</Interval>
<SyncTime>$Config/SyncTime$</SyncTime>
</SimpleReccuringSchedule>
<ExcludeDates/>
</Scheduler>
</DataSource>
<ProbeAction ID="PS" TypeID="Windows!Microsoft.Windows.PowerShellPropertyBagProbe">
<ScriptName>CPUUsagePercentDataSource.ps1</ScriptName>
<ScriptBody><Script>#CPUUsagePercentDataSource.ps1
param($computerName, $SQL_WMI_NAMESPACE, $serviceName, $sqlInstanceName, $connectionString, $tcpPort, $instanceId)

$SCRIPT_EVENT_ID = 4001

$DEBUG_MODE = 0
$DEBUG_MODULE = "CPUUsagePercentDataSource.ps1"
$DEBUG_MSG = ""
$DEBUG_SA = $null
$DEBUG_PWD = $null

#Event Severity values
$INFORMATION_EVENT_TYPE = 0
$ERROR_EVENT_TYPE = 1

$ManagementGroupID = '$Target/ManagementGroup/Id$'

function BuildConnectionString(
[String] $pHostName,
[String] $pInstanceName,
[String] $databaseName,
[String] $SQL_NAMESPACE,
[String] $connectionString = $null,
[String] $user = $null,
[String] $password = $null)
{
if (($connectionString.Length -ne 0)) {
return $connectionString
} else {
$builder = New-Object System.Data.SqlClient.SqlConnectionStringBuilder
$serverName = ""
$namespace = "root\Microsoft\SqlServer\" + $SQL_NAMESPACE
$class = "ServerNetworkProtocolProperty"
$serverName = $pHostName + "\" + $pInstanceName
$listenAll = Get-WmiObject -Namespace $namespace -Class $class | Where-Object {($_.ProtocolName -eq "Tcp") -and ($_.InstanceName -eq $pInstanceName) -and($_.PropertyName -eq "ListenOnAllIPs")}
if($listenAll.PropertyNumVal -eq 1) {
$tcpipAll = Get-WmiObject -Namespace $namespace -Class $class | Where-Object {
($_.ProtocolName -eq "Tcp") -and ($_.InstanceName -eq $pInstanceName) -and($_.IPAddressName -eq "IPAll")-and($_.PropertyName -eq "TcpPort")}
if($tcpipAll.PropertyStrVal -eq '') {
$tcpipAll = Get-WmiObject -Namespace $namespace -Class $class | Where-Object {
($_.ProtocolName -eq "Tcp") -and ($_.InstanceName -eq $pInstanceName) -and($_.IPAddressName -eq "IPAll")-and($_.PropertyName -eq "TcpDynamicPorts")}
}
if($tcpipAll.PropertyStrVal -ne '') {
$serverName = $serverName + "," + $tcpipAll.PropertyStrVal
}
}
else {
$ipAddressName = (Get-WmiObject -Namespace $namespace -Class $class | Where-Object {
($_.ProtocolName -eq "Tcp") -and ($_.InstanceName -eq $pInstanceName) -and($_.IPAddressName -ne "")-and($_.PropertyName -eq "Enabled") -and ($_.PropertyNumVal -eq 1)}) | select -first 1 | select -ExpandProperty IPAddressName
if($ipAddressName -ne $null) {
$tcp = Get-WmiObject -Namespace $namespace -Class $class | Where-Object {
($_.ProtocolName -eq "Tcp") -and ($_.InstanceName -eq $pInstanceName) -and($_.IPAddressName -eq $ipAddressName)-and( ($_.PropertyName -eq "TcpPort") -or ($_.PropertyName -eq "TcpDynamicPorts")) -and ($_.PropertyStrVal -ne '')} | select -ExpandProperty PropertyStrVal
$ip = Get-WmiObject -Namespace $namespace -Class $class | Where-Object {
($_.ProtocolName -eq "Tcp") -and ($_.InstanceName -eq $pInstanceName) -and($_.IPAddressName -eq $ipAddressName)-and( $_.PropertyName -eq "IpAddress") -and ($_.PropertyStrVal -ne '')} | select -ExpandProperty PropertyStrVal
if($ip -ne $null) {
$serverName = $ip + "," + $tcp
}
else {
$serverName = $serverName + "," + $tcp
}
}
}

$builder["Data Source"] = $serverName
$builder["Initial Catalog"] = $databaseName

if (($user.Length -ne 0) -and ($password.Length -ne 0)) {
$builder["User ID"] = $user
$builder["Password"] = $password
}
else
{
$builder["Integrated Security"] = 'SSPI'
}

return $builder.ConnectionString
}
}

function SqlTestDestination($connection, $serverName, $instanceName) {
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$DataSet = New-Object System.Data.DataSet
$SqlCmd.CommandText = "select SERVERPROPERTY('MachineName') as ServerName, @@servicename as InstanceName"
$SqlCmd.Connection = $SqlConnection
$SqlAdapter.SelectCommand = $SqlCmd
$SqlAdapter.Fill($DataSet)|out-null
$res = $DataSet.Tables | select -first 1
if ($res -ne $null) {
$queryServerName = ($res | Select -ExpandProperty ServerName).ToUpperInvariant()
$queryInstanceName = ($res | Select -ExpandProperty InstanceName).ToUpperInvariant()
$serverNameWithoutDomain = $serverName
$dotPosition = $serverName.IndexOf(".")
if ($dotPosition -gt -1) {
$serverNameWithoutDomain = $serverName.Substring(0, $dotPosition)
}
if (($serverNameWithoutDomain.ToUpperInvariant() -eq $queryServerName) -and ($instanceName.ToUpperInvariant() -eq $queryInstanceName)) {
return;
}
}
throw "Connection target check failed: connected to " + $serverName + "\\" + $instanceName + ", but got " + $queryServerName + "\\" + $queryInstanceName + "."
}

function BuildConnectionStringWithPort(
[String] $connectionString,
[int] $port,
[String] $user = $null,
[String] $password = $null) {
$builder = New-Object System.Data.SqlClient.SqlConnectionStringBuilder
if ($port -eq 0){
$builder["Data Source"] = $connectionString
} else {
$builder["Data Source"] = $connectionString + "," + $port
}
if (($user.Length -ne 0) -and ($password.Length -ne 0)) {
$builder["User ID"] = $user
$builder["Password"] = $password
} else {
$builder["Integrated Security"] = 'SSPI'
}
return $builder.ConnectionString
}

function ValidateConnectionString(
[String] $connectionString,
[int] $port,
[String] $serverName,
[String] $instanceName,
[String] $user = $null,
[String] $password = $null)
{
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
try {
$SqlConnection.ConnectionString = BuildConnectionStringWithPort $connectionString 0 $user $password
$SqlConnection.Open()
SqlTestDestination $SqlConnection $serverName $instanceName
$SqlConnection.Close()
return $SqlConnection.ConnectionString
} catch {
try {
if($SqlConnection.State -ne [System.Data.ConnectionState]::Closed ) {
$SqlConnection.Close()
}
$SqlConnection.ConnectionString = BuildConnectionStringWithPort $connectionString $port $user $password
$SqlConnection.Open()
SqlTestDestination $SqlConnection $serverName $instanceName
$SqlConnection.Close()
return $SqlConnection.ConnectionString
} catch {
if($SqlConnection.State -ne [System.Data.ConnectionState]::Closed ) {
$SqlConnection.Close()
}
}
}
return $null
}

function GetValidatedConnection(
[String] $pHostName,
[String] $pInstanceName,
[String] $databaseName,
[String] $namespace,
[String] $connectionString,
[int] $port,
[String] $user = $null,
[String] $password = $null)
{

$sqlConnectionString = $connectionString
$sqlConnectionString = ValidateConnectionString $sqlConnectionString $port $pHostName $pInstanceName $user $password

$connectionString = BuildConnectionString $pHostName $pInstanceName $databaseName $namespace $sqlConnectionString

$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
try
{
$SqlConnection.ConnectionString = $connectionString
$SqlConnection.Open()
return $SqlConnection
}
catch {
if ($SqlConnection -ne $null)
{
if($SqlConnection.State -ne [System.Data.ConnectionState]::Closed ) {
$SqlConnection.Close()
}
$SqlConnection.Dispose()
}
}
return $null
}

function GetCoresCountThreshold($connection, $coresCount) {

[int]$maxWorkersCount = SqlQueryScalar $connection "SELECT max_workers_count as value FROM sys.dm_os_sys_info"

if ($maxWorkersCount -eq $null -or $maxWorkersCount -eq 0) {

$maxWorkersCount = (256 +($coresCount - 4) * 8)

$os = (Get-WmiObject Win32_OperatingSystem).OSArchitecture
$is64bit = ($os -eq "64-bit")

if ($is64bit) {
$maxWorkersCount *= 2
}
}

return $maxWorkersCount;
}

function GetSQLAllowedCoreCount($connection, $logicalCoresCount) {

[int]$affinity = SqlQueryScalar $connection "SELECT value FROM sys.configurations WHERE NAME = 'AFFINITY MASK'"

$affinityBinStr = [Convert]::ToString($affinity, 2)
$allowedCoreCount = ($affinityBinStr.ToCharArray() | where { $_ -eq '1' }).Length

if ($allowedCoreCount -eq $null -or $allowedCoreCount -eq 0) {
$allowedCoreCount = $logicalCoresCount
}
return $allowedCoreCount
}


function SqlQueryScalar($SqlConnection, $query) {

$res = "";
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$DataSet = New-Object System.Data.DataSet

$SqlCmd.CommandText = $query
$SqlCmd.Connection = $SqlConnection
$SqlAdapter.SelectCommand = $SqlCmd
$SqlAdapter.Fill($DataSet)|out-null

if(($DataSet -eq $null) -or ($DataSet.Tables.Count-eq 0) -or ($DataSet.Tables[0] -eq $null))
{
throw 'Can not query data from {0} database. Please check read permissions for this db.' -f $SqlConnection.Database
}

$res = ($DataSet.Tables[0] | select -First 1).value
return $res
}

#-------------------------------------------------------------------------------
# localized performance counters
#-------------------------------------------------------------------------------

# Needed to replace cmdlet Get-UICulture because it shows incorrect current UI language
# in the case of installing language packs
function Get-UICultureWinApi
{
$code = '[DllImport("Kernel32.dll", CharSet = CharSet.Auto)]public static extern System.UInt16 GetUserDefaultUILanguage();'
$UICultureWinApi = Add-Type -MemberDefinition $code -Name 'UICultureWinApi' -Namespace 'Win32' -PassThru
return $UICultureWinApi::GetUserDefaultUILanguage()
}

# Retrieve the default language identifier of the current user. For most languages,
# you use the primary language identifier only to retrieve the text. In Windows XP and
# Windows Server 2003, you use the complete language identifier to retrieve Chinese
# text. In Windows Vista, you use the complete language identifier to retrieve Portuguese text.
function Get-GetLanguageId([String[]] $osVersion)
{
$LANG_PORTUGUESE = 0x16
$LANG_CHINESE = 0x04

$cul = Get-UICultureWinApi
$lcid = $cul.LCID

$lcidPrimary = $($lcid -band 0xff)

if (
($LANG_PORTUGUESE -eq $lcidPrimary -and $osVersion[0] -gt 5) -or #Windows Vista and later
($LANG_CHINESE -eq $lcidPrimary -and ($osVersion[0] -eq 5 -and $osVersion[1] -ge 1)) #XP and Windows Server 2003
)
{
return $lcid
}

return $lcidPrimary
}

# Build a hash array of offsets into the counter buffer. Use the index
# values from the performance data queries to access the offsets.
function Get-RegLocalizedPerfCounterNames($computerName = $env:COMPUTERNAME)
{
$path = ""
#get OS version
$osvi = Get-WmiObject -class Win32_OperatingSystem -computerName $computerName
if(($osvi -eq $null) -or ($osvi.Version -eq $null)) {
return $null
}
$osVersion = $osvi.Version.split(".")
#get language ID
$language = "{0:X3}" -f $(Get-GetLanguageId($osVersion))
#if OS windows 7, 8, 2008R2 and 2012
if( $osVersion[0] -ge 6 -and $osVersion[1] -ge 1 )
{
$path = "hklm:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\CurrentLanguage"
}
#if OS Windows XP, 2003, Vista, 2008
if( ($osVersion[0] -eq 6 -and $osVersion[1] -eq 0 ) -or ($osVersion[0] -eq 5 -and $osVersion[1] -ge 1 ) )
{
$path = "hklm:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\{0}" -f $language
}
#if no data in regestry when return null
$val = Get-ItemProperty -Path $path -Name "Counter" -ErrorAction SilentlyContinue
if (($val -eq $null) -or ($val.Length -eq 0))
{
return $null
}
#return registry values
$hashArray = @{}
for($i=0; $i -lt $val.Counter.Count; $i=$i+2)
{
[UInt32] $key = [UInt32]$val.Counter[$i]
if ($hashArray.ContainsKey($key) -ne $true)
{
$hashArray.Add($key, $val.Counter[$i+1])
}
}
return $hashArray
}

#Returns the performance object name or counter name corresponding to the specified index.
Function Get-PdhLookupPerfNameByIndex([UInt32] $ID, $computerName = $env:COMPUTERNAME)
{
$code = '[DllImport("pdh.dll", SetLastError=true, CharSet=CharSet.Unicode)] public static extern UInt32 PdhLookupPerfNameByIndex(string szMachineName, uint dwNameIndex, System.Text.StringBuilder szNameBuffer, ref uint pcchNameBufferSize);'

$Buffer = New-Object System.Text.StringBuilder(1024)
[UInt32]$BufferSize = $Buffer.Capacity

$t = Add-Type -MemberDefinition $code -PassThru -Name PerfCounter -Namespace Utility
$rv = $t::PdhLookupPerfNameByIndex($computerName, $id, $Buffer, [Ref]$BufferSize)

if ($rv -eq 0)
{
return $Buffer.ToString().Substring(0, $BufferSize-1)
}
else
{
Throw 'Get-PdhLookupPerfNameByIndex : Unable to retrieve localized name for performance counter ID ({0}) on computer "{1}".' -f $ID, $ComputerName
}
}

function Get-LocalizedPerfCounter($arrayCounters, [String] $format, $paramters)
{
$cul = Get-UICultureWinApi
#English language
if( $($cul.LCID -band 0xff) -ne 0x09)
{
#try to get locolized values
if ( $arrayCounters -ne $null)
{
#from regestry
for($i=0; $i -lt $paramters.Count; $i++)
{
[UInt32] $id = [UInt32]$paramters[$i][0]
if ($arrayCounters.ContainsKey($id) -eq $true)
{
$paramters[$i][1] = $arrayCounters[$id]
}
else
{
Throw 'Get-PerfCounter : Unable to retrieve localized name. (Index : {0} Name : {1})' -f $id,$paramters[$i][1]
}
}
}
else
{
#win32 api
for($i=0; $i -lt $paramters.Count; $i++)
{
[UInt32] $id = [UInt32]$paramters[$i][0]
$paramters[$i][1] = Get-PdhLookupPerfNameByIndex $id
}
}
}
#get counter
$counter = $format -f $paramters[0][1], $paramters[1][1]
return (Get-Counter ($counter))
}
#-------------------------------------------------------------------------------
#The function returns service or "Unknown" state
#Input:
# server - compute name
# service - system service name
# InstanceName - sql server instance name
#Output:
# service state or "Unknown" state
function GetServiceState($server, $service, $InstanceName)
{
try {
if ($service -eq "MSSQL") {
$service = "MSSQL`${0}" -f $InstanceName
}
$namespace = "root/cimv2"
$obje = Get-WmiObject -Namespace $namespace -ComputerName $server -Class "win32_service" -ErrorAction SilentlyContinue | where {$_.name -like $service }
if ($obje -ne $null) {
return $obje.State
}
}
catch {
}
return "Unknown"
}

function Main {
param($computerName, $SQL_WMI_NAMESPACE, $serviceName, $sqlInstanceName, $connectionString, $tcpPort, $instanceId)

#
# Prepare MOM API and property bag object
#
$api = New-Object -comObject "MOM.ScriptAPI"
$msg = [Environment]::NewLine

#Looks strange. I'm afraid to remove it. Need to investigate aftermath
if ($serviceName -eq "MSSQL") {
$serviceName = "MSSQL`${0}" -f $sqlInstanceName
}

$msg += "Computer Name = '$computerName' WMI = '$SQL_WMI_NAMESPACE' Service Name = '$serviceName' SQL Instance Name = '$sqlInstanceName'"
$msg += [Environment]::NewLine

#if service is not in running state when exit without any error
$state = GetServiceState $computerName $serviceName $sqlInstanceName
if(($state -ne "Running") -and ($state -ne "Unknown"))
{
if($DEBUG_MODE -eq 1) {
$api.LogScriptEvent($DEBUG_MODULE, $SCRIPT_EVENT_ID, $INFORMATION_EVENT_TYPE, $msg)
}
return
}

try
{
$perfCounterNames = Get-RegLocalizedPerfCounterNames
$counters = (Get-LocalizedPerfCounter $perfCounterNames $("\{0}(sqlservr*)\{1}") $(@( 230 , "Process" ), @( 784 , "ID Process" ))).CounterSamples

$logicalCoresCount = (Get-WmiObject Win32_ComputerSystem).NumberOfLogicalProcessors
#TODO: Get target process, remove foreach. Get PID by cmdlet or win32_Service
$processID = (get-wmiobject win32_Service | Where { $_.Name -eq $serviceName }) | select -first 1 | select -ExpandProperty ProcessID

$SqlConnection = $null


if ($counters -ne $null) {
$counters | foreach {
try {
if(($_ -ne $null) -and ($_.CookedValue -eq $processID)){

$nmspace = "root\Microsoft\SqlServer\"+$SQL_WMI_NAMESPACE

$counterName = [regex]::match($_.Path,'(?' + [char]60 + '=\().*(?=\))').Groups[0].Value

$cpuUsage = (Get-LocalizedPerfCounter $perfCounterNames $("\{0}($counterName)\{1}") $(@( 230 , "Process" ), @( 6 , "% Processor Time" ))).CounterSamples[0].CookedValue
$threadCount = (Get-LocalizedPerfCounter $perfCounterNames $("\{0}($counterName)\{1}") $(@( 230 , "Process" ), @( 680 , "Thread Count" ))).CounterSamples[0].CookedValue

#check if connection string valid
$SqlConnection = GetValidatedConnection $computerName $sqlInstanceName 'master' $SQL_WMI_NAMESPACE $connectionString $tcpPort $DEBUG_SA $DEBUG_PWD
#if connection is null when exit the script without error
if($SqlConnection -eq $null )
{
$msg = "The server was not found or was not accessible."
if($DEBUG_MODE -eq 1) {
$api.LogScriptEvent($DEBUG_MODULE, $SCRIPT_EVENT_ID, $INFORMATION_EVENT_TYPE, $msg)
}
return
}

$allowedCoreCount = GetSQLAllowedCoreCount $SqlConnection $logicalCoresCount

$cpuUsage /= [int]$allowedCoreCount

$threshold = GetCoresCountThreshold $SqlConnection $logicalCoresCount
$freeThreadCount = $threshold - $threadCount

$bag = $api.CreatePropertyBag()
$bag.AddValue("Name", $serviceName)
$bag.AddValue("CPUUsage", [double]$cpuUsage)
$bag.AddValue("ThreadCount", [UInt32]$threadCount)
$bag.AddValue("ThreadCountThreshold", $threshold)
$bag.AddValue("FreeThreadCount", $freeThreadCount)

$bag

if($DEBUG_MODE -eq 1) {
$msg += "'$connectionString' CPUUsage=$cpuUsage ThreadCount=$threadCount ThreadCountThreshold=$threshold FreeThreadCount=$freeThreadCount"
$msg += [Environment]::NewLine
}
}
}
catch {
if ($SqlConnection -ne $null) {
$SqlConnection.Close()
}
$msg += [Environment]::NewLine
$msg += $_.Exception.Message
$header = "Management Group: $Target/ManagementGroup/Name$. Script: {0} Module: {1}" -f ($MyInvocation.MyCommand).Name.ToString(), $DEBUG_MODULE
$msg += "Error occured during CPU Usage for SQL Instances data source executing.{0}Computer: {1} {0}Reason: {2} {0}Position:{3} {0}Offset:{4}" -f [Environment]::NewLine, $env:COMPUTERNAME, $_.Exception.Message, $_.InvocationInfo.ScriptLineNumber, $_.InvocationInfo.OffsetInLine
$api.LogScriptEvent($header, $SCRIPT_EVENT_ID, $ERROR_EVENT_TYPE, $msg)
# in the case of service was stopped or something wrong another was happend
}
}
}
}
catch
{
$header = "Management Group: $Target/ManagementGroup/Name$. Script: {0} Module: {1}" -f ($MyInvocation.MyCommand).Name.ToString(), $DEBUG_MODULE
$msg += "Error occured during CPU Usage for SQL Instances data source executing.{0}Computer: {1} {0}Reason: {2} {0}Position:{3} {0}Offset:{4}" -f [Environment]::NewLine, $env:COMPUTERNAME, $_.Exception.Message, $_.InvocationInfo.ScriptLineNumber, $_.InvocationInfo.OffsetInLine
$msg += "{0}Detailed error output: {1}" -f [Environment]::NewLine, [String]::Join("{0}--------{0}" -f [Environment]::NewLine, $Error.ToArray())
$api.LogScriptEvent($header, $SCRIPT_EVENT_ID, $ERROR_EVENT_TYPE, $msg)
}

if($DEBUG_MODE -eq 1) {
$api.LogScriptEvent($DEBUG_MODULE, $SCRIPT_EVENT_ID, $INFORMATION_EVENT_TYPE, $msg)
}
}

main $computerName $SQL_WMI_NAMESPACE $serviceName $sqlInstanceName $connectionString $tcpPort $instanceId </Script></ScriptBody>
<SnapIns/>
<Parameters>
<Parameter>
<Name>computerName</Name>
<Value>$Config/ComputerName$</Value>
</Parameter>
<Parameter>
<Name>SQL_WMI_NAMESPACE</Name>
<Value>ComputerManagement11</Value>
</Parameter>
<Parameter>
<Name>serviceName</Name>
<Value>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</Value>
</Parameter>
<Parameter>
<Name>sqlInstanceName</Name>
<Value>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</Value>
</Parameter>
<Parameter>
<Name>connectionString</Name>
<Value>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</Value>
</Parameter>
<Parameter>
<Name>tcpPort</Name>
<Value>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/TcpPort$</Value>
</Parameter>
<Parameter>
<Name>instanceId</Name>
<Value>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/InstanceID$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<StrictErrorHandling>true</StrictErrorHandling>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="PS">
<Node ID="Scheduler"/>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>