This object discovery detects any Microsoft SQL Server Parallel Data Warehouse Components.
This object discovery detects all Components of particular Microsoft SQL Server Parallel Data Warehouse.
Target | Microsoft.SQLServerAppliance.PDW.Appliance |
Enabled | True |
Frequency | 14400 |
Remotable | False |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.SQLServerAppliance.PDW.ScriptedDiscoveryProvider | Default |
<Discovery ID="Microsoft.SQLServerAppliance.PDW.ApplianceComponents.Discovery" Enabled="true" Target="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Appliance">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Network.Adapter"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Network.Connectivity"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cluster.Node"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cluster.ResourceGroup"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cluster.Resource"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Software.ApplicationHeartbeat"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Software.NonClusteredService"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageExternal.Storage"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageExternal.FibreChannel"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageInternal.Disk"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageInternal.Volume"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageInternal.Controller"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cooling.Temperature"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cooling.Device"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.PowerSupply.PowerSupply"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.ServerProcessing.Memory"/>
<DiscoveryClass TypeID="PDWLibrary!Microsoft.SQLServerAppliance.PDW.ServerProcessing.Processor"/>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Microsoft.SQLServerAppliance.PDW.ScriptedDiscoveryProvider">
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
<ScriptName>PDWApplianceComponentsDiscovery.vbs</ScriptName>
<Arguments>"$MPElement$" "$Target/Id$" "$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$" "$Target/Property[Type="SSALibrary!Microsoft.SQLServerAppliance.Appliance"]/ApplianceID$" "$Target/Property[Type="PDWLibrary!Microsoft.SQLServerAppliance.PDW.Appliance"]/NetworkAddress$"</Arguments>
<ScriptBody>
' ##### ..\Scripts .\Common.vbs
Option Explicit
SetLocale("en-us")
' ##### ..\Scripts .\EventlogConstants.vbs
' Eventlog EventID for all errors generated by scripts
Const SCRIPT_EVENT_ID = 4310
' This string will be appended to the beginning of first Event description parameter (Params/Param[1])
' Use <RegExExpression /> to narrow alerts to this MP only
Const MANAGEMENT_PACK_ID = "PDW MP"
Dim USE_EVENT_LOG, USE_ERROR_LOG
Const DEBUG_MODE = false
Const DEBUG_SCRIPT_EVENT_ID = 4201
USE_EVENT_LOG = true
USE_ERROR_LOG = false
Const ManagementGroupName = "$Target/ManagementGroup/Name$"
Dim sApplianceID
sApplianceID = ""
Sub LogWarning(ByVal customMessage)
Dim logger
Set logger = new ScriptLogger
logger.LogWarning(customMessage)
End Sub
Sub HandleError(ByVal customMessage)
Dim logger
If Err.number <> 0 Then
Set logger = new ScriptLogger
logger.LogError(customMessage)
If Not USE_ERROR_LOG Then
Wscript.Quit 0
Else
Wscript.Quit 1
End If
End If
End Sub
Sub HandleErrorInMonitoring(ByVal customMessage, ByRef oBag, ByRef oAPI)
Dim logger
If Err.number <> 0 Then
Set logger = new ScriptLogger
logger.LogError(customMessage)
Call oAPI.Return(oBag)
Wscript.Quit 0
End If
End Sub
Sub HandleErrorInDiscovery(ByVal customMessage, ByRef oDiscovery, ByRef oAPI)
Dim logger
If Err.number <> 0 Then
Set logger = new ScriptLogger
logger.LogError(customMessage)
oDiscovery.IsSnapshot = false
HandleDebugMessage("Discovery: IsSnapshot = false")
oAPI.Return(oDiscoveryData)
Wscript.Quit 0
End If
End Sub
Sub HandleNonCriticalErrorInDiscovery(ByVal customMessage, ByRef oDiscovery)
Dim logger
Set logger = new ScriptLogger
logger.LogError(customMessage)
oDiscovery.IsSnapshot = false
HandleDebugMessage("Discovery: IsSnapshot = false")
End Sub
Sub HandleDebugMessage(ByVal debugMessage)
Dim logger
Set logger = new ScriptLogger
logger.LogDebug(debugMessage)
End Sub
Const ERROR_EVENT_TYPE = 1
Const WARNING_EVENT_TYPE = 2
Const INFO_EVENT_TYPE = 4
Class ScriptLogger
Dim sourceLogEvent
Dim oAPI
Private Sub Class_Initialize()
sourceLogEvent = MANAGEMENT_PACK_ID
If (sApplianceID <> "") Then
sourceLogEvent = sourceLogEvent & ". Appliance: " & sApplianceID
End If
sourceLogEvent = sourceLogEvent & ". Script: " & WScript.ScriptName
Set oAPI = CreateObject("MOM.ScriptAPI")
End Sub
Private Function LogEvent(ByVal message, ByVal eventType, ByVal scriptEventID)
On Error Resume Next
Call oAPI.LogScriptEvent(sourceLogEvent, scriptEventID, eventType, message)
End Function
Public Function LogDebug(ByVal message)
if DEBUG_MODE Then
WScript.StdOut.WriteLine message
Call oAPI.LogScriptEvent(sourceLogEvent, DEBUG_SCRIPT_EVENT_ID, INFO_EVENT_TYPE, message)
End If
End Function
Public Function LogWarning(ByVal message)
if DEBUG_MODE Then
WScript.StdOut.WriteLine message
End If
LogEvent message, WARNING_EVENT_TYPE, SCRIPT_EVENT_ID
End Function
Public Function LogError(ByVal customMessage)
Dim message
If Err.number <> 0 Then
message = Replace(" Error Number: #P1# " & VbCrLf & " Description: #P2# ", "#P1#", CStr(Err.number and 65535) )
message = Replace(message, "#P2#", Err.Description )
message = customMessage & VbCrLf & message & VbCrLf
Else
message = customMessage & VbCrLf
End If
If DEBUG_MODE Then
WScript.StdOut.WriteLine message
End If
If USE_EVENT_LOG Then
LogEvent message, ERROR_EVENT_TYPE, SCRIPT_EVENT_ID
End If
If USE_ERROR_LOG Then
WScript.StdErr.WriteLine message
End If
End Function
End Class
Function IsStringEmpty(ByVal sValue)
If sValue = EMPTY Or Trim(sValue) = "" Then
IsStringEmpty = true
Else
IsStringEmpty = false
End If
End Function
' ##### ..\Scripts .\AdoDB.vbs
Const DEFAULT_SCHEMA = "[sys]"
'This class is wrapper for ADODB typical operations (Connect and Run SQL query)
Class SQLQuery
PRIVATE adodbConnection
Private Sub Class_Initialize()
On Error Resume Next
Set adodbConnection = CreateObject("ADODB.Connection")
Call HandleError("Cannot create ADODB.Connection")
End Sub
Private Sub Class_Terminate()
On Error Resume Next
'adodbConnection.State = 0 - Closed
If adodbConnection.State > 0 Then
Call adodbConnection.Close()
End If
Call HandleError("Cannot close ADODB.Connection")
End Sub
'This method create and open connection to the server
'<connectionString> - DSN to be used for connection;
Public Sub Connect(ByVal connectionString, ByVal sUser, ByVal sPass, ByVal nTimeout)
On Error Resume Next
Dim providerString
providerString = "DSN=" & connectionString & ";UID=" & sUser & ";PWD=" & sPass
adodbConnection.ConnectionTimeout = nTimeout
Call adodbConnection.Open(providerString)
End Sub
'This function execute <query> with <parameters> and returns ADODB.RecordSet
'<parameters> must be array, and must be with the same order as sql query <?> paremetrs
Public Function ExecuteQueryToRecordSet(ByVal query, ByVal parameters)
Dim adodbCommand, oResults
Set adodbCommand = CreateObject("ADODB.Command")
adodbCommand.ActiveConnection = adodbConnection
adodbCommand.CommandText = query
Dim i, dataType, dataSize, parameter, length
length = UBound(parameters)
'Put parameters in to ADODB.Command
For i=0 To length
parameter = parameters(i)
dataType = GetDataTypeEnum(parameter)
dataSize = GetDataTypeSize(parameter)
adodbCommand.Parameters.Append(adodbCommand.CreateParameter("p"&i, dataType, 1, dataSize, parameter)) '1 - this is adParamInput in ADODB. see http://www.w3schools.com/ado/met_comm_createparameter.asp#parameterdirenum
Next
Set ExecuteQueryToRecordSet = adodbCommand.Execute()
End Function
'returns size of string or 0 for others types
Private Function GetDataTypeSize(ByVal vValue)
If TypeName(vValue)="String" Then
GetDataTypeSize = Len(vValue)
Else
GetDataTypeSize = 0
End If
End Function
'this function returns int value of some DataTypeEnum
'values of adodb types see on http://www.w3schools.com/ado/met_comm_createparameter.asp#datatypeenum
Private Function GetDataTypeEnum(ByVal vValue)
If TypeName(vValue) = "Byte" Then
GetDataTypeEnum = 2 ' adSmallInt=2
End If
If TypeName(vValue)="Integer" or TypeName(vValue)="Long" Then
GetDataTypeEnum = 3 ' adInteger=3
End If
If TypeName(vValue)="Double" Then
GetDataTypeEnum = 5 ' adDouble=5
End If
If TypeName(vValue)="String" Then
GetDataTypeEnum = 8 ' adBSTR = 8
End If
End Function
End Class
' ##### Scripts\PDWApplianceComponentsDiscovery.vbs
On Error Resume Next
Dim GetComponentsQuery
GetComponentsQuery = Replace("SELECT " & _
" nodes.[pdw_node_id] " & _
" , nodes.[name] " & _
" , groups.[group_id] " & _
" , groups.[group_name] " & _
" , components.[component_id] " & _
" , components.[component_name] " & _
" FROM " & _
" {0}.[dm_pdw_component_health_status] healthStatus " & _
" INNER JOIN {0}.dm_pdw_nodes nodes " & _
" ON healthStatus.pdw_node_id = nodes.pdw_node_id " & _
" INNER JOIN {0}.pdw_health_components components " & _
" ON healthStatus.component_id = components.component_id " & _
" INNER JOIN {0}.pdw_health_component_groups groups " & _
" ON components.group_id = groups.group_id " & _
" INNER JOIN {0}.pdw_health_component_properties properties " & _
" ON healthStatus.property_id = properties.property_id " & _
" AND healthStatus.component_id = properties.component_id " & _
" WHERE " & _
" properties.[property_name] = 'Status' " & _
" GROUP BY " & _
" nodes.[pdw_node_id] " & _
" , nodes.[name] " & _
" , groups.[group_id] " & _
" , groups.[group_name] " & _
" , components.[component_id] " & _
" , components.[component_name] " & _
" OPTION (LABEL = 'SCOM-PDW-MP');", "{0}", DEFAULT_SCHEMA)
Dim oAPI, oDiscoveryData
Dim SourceID, ManagedEntityID, sPrincipalName, sNetworkAddress
Dim sUser, sPass
Dim oSqlQry
Set oAPI = CreateObject("MOM.ScriptAPI")
Call HandleError("Cannot create MOM.ScriptAPI object")
Call Main()
Sub Main()
On Error Resume Next
Dim oSecureInput
oSecureInput = Split(WScript.StdIn.ReadLine(), "@@secureseparator@@")
sUser = oSecureInput(0)
Call HandleError("Cannot read Username from SecureInput")
sPass = oSecureInput(1)
Call HandleError("Cannot read Password from SecureInput")
Dim oParams
Set oParams = WScript.Arguments
SourceID = oParams(0)
Call HandleError("Cannot read Source ID from parameters")
ManagedEntityID = oParams(1)
Call HandleError("Cannot read Managed Entity ID from parameters")
sPrincipalName = oParams(2)
Call HandleError("Cannot read Principal Name from parameters")
sApplianceID = oParams(3)
Call HandleError("Cannot read Appliance ID from parameters")
sNetworkAddress = oParams(4)
Call HandleError("Cannot read Network Address from parameters")
Set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityID)
Call HandleError("Cannot create Discovery Data object")
Set oSqlQry = new SQLQuery
Call oSqlQry.Connect(sApplianceID, sUser, sPass, 60)
Call HandleErrorInDiscovery("Connection failed", oDiscoveryData, oAPI)
Call DiscoverComponents()
Call oAPI.Return(oDiscoveryData)
End Sub
' Adds containment relationship between specified Source and Target objects
Sub AddContainmentRelationship(ByVal sRealtionshipType, ByRef oSource, ByRef oTarget)
Dim oRelationship
Set oRelationship = oDiscoveryData.CreateRelationshipInstance(sRealtionshipType)
oRelationship.Source = oSource
oRelationship.Target = oTarget
Call oDiscoveryData.AddInstance(oRelationship)
End Sub
Sub DiscoverComponents()
On Error Resume Next
Dim oRecordSet
Set oRecordSet = oSqlQry.ExecuteQueryToRecordSet(GetComponentsQuery, Array())
Call HandleErrorInDiscovery("Cannot run query", oDiscoveryData, oAPI)
Dim oComponentGroup, oComponent, hComponentGroups, sGroupKey
Dim nNodeID, sNodeName, nGroupID, sGroupName, nFullComponentID, nComponentID, sComponentName
Set hComponentGroups = CreateObject("Scripting.Dictionary")
Call HandleError("Cannot create Scripting.Dictionary object")
Do While Not oRecordSet.EOF
nNodeID = oRecordSet(0)
sNodeName = ExtractDisplayName(oRecordSet(1))
nGroupID = RemoveVendorID(oRecordSet(2))
sGroupName = oRecordSet(3)
nFullComponentID = oRecordSet(4)
nComponentID = RemoveVendorID(nFullComponentID)
If nComponentID = 70100 Then
nGroupID = 60000
ElseIf nComponentID = 70300 Then
nGroupID = 10000
End If
sComponentName = oRecordSet(5)
' Create Component Group
sGroupKey = CStr(nNodeID) & "-" & CStr(nGroupID)
If Not hComponentGroups.Exists(sGroupKey) Then
Call CreateComponentGroup(nGroupID, oComponentGroup)
If Not IsEmpty(oComponentGroup) Then
Call hComponentGroups.Add(sGroupKey, oComponentGroup)
Call FillComponentGroupProperties(oComponentGroup, nNodeID, nGroupID, sGroupName)
Call oDiscoveryData.AddInstance(oComponentGroup)
End If
End If
' Create Component
Call CreateComponent(nComponentID, oComponent)
If Not IsEmpty(oComponent) Then
Call FillComponentProperties(oComponent, nNodeID, sNodeName, sGroupName, nFullComponentID, sComponentName)
Call oDiscoveryData.AddInstance(oComponent)
Call AddContainmentRelationship("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.ComponentGroupContainsComponent']$", hComponentGroups.Item(sGroupKey), oComponent)
End If
Call oRecordSet.MoveNext()
Loop
Call oRecordSet.Close()
End Sub
Function RemoveVendorID(ByVal nID)
Dim sID
sID = CStr(nID)
RemoveVendorID = CLng(Right(sID, Len(sID) -3))
End Function
' Extracts display name from Node or Cluster name
Function ExtractDisplayName(ByVal sFullName)
ExtractDisplayName = Mid(sFullName, InStr(sFullName, "-") + 1)
End Function
' Creates new Component Group
Sub CreateComponentGroup(ByVal nComponentGroupID, ByRef oComponentGroup)
If nComponentGroupID = 80000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cluster']$")
ElseIf nComponentGroupID = 60000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Network']$")
ElseIf nComponentGroupID = 20000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageExternal']$")
ElseIf nComponentGroupID = 10000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageInternal']$")
ElseIf nComponentGroupID = 100000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Software']$")
ElseIf nComponentGroupID = 50000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cooling']$")
ElseIf nComponentGroupID = 40000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.PowerSupply']$")
ElseIf nComponentGroupID = 30000 Then
Set oComponentGroup = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.ServerProcessing']$")
Else
oComponentGroup = Empty
End If
End Sub
' Populates ComponentGroup's properties
Sub FillComponentGroupProperties(ByRef oComponentGroup, ByVal nNodeID, ByVal nGroupID, ByVal sGroupName)
Call oComponentGroup.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", sPrincipalName)
Call oComponentGroup.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.ComponentGroup']/ApplianceID$", sApplianceID)
Call oComponentGroup.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.ComponentGroup']/NodeID$", nNodeID)
Call oComponentGroup.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.ComponentGroup']/ID$", nGroupID)
End Sub
' Creates new Component
Sub CreateComponent(ByVal nComponentID, ByRef oComponent)
If nComponentID = 80100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cluster.Node']$")
ElseIf nComponentID = 80200 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cluster.ResourceGroup']$")
ElseIf nComponentID = 80300 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cluster.Resource']$")
ElseIf nComponentID = 60300 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Network.Adapter']$")
ElseIf nComponentID = 60400 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Network.Connectivity']$")
ElseIf nComponentID = 20100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageExternal.Storage']$")
ElseIf nComponentID = 20600 Or nComponentID = 70100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageExternal.FibreChannel']$")
ElseIf nComponentID = 10100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageInternal.Disk']$")
ElseIf nComponentID = 10200 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageInternal.Controller']$")
ElseIf nComponentID = 10300 Or nComponentID = 70300 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.StorageInternal.Volume']$")
ElseIf nComponentID = 100100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Software.NonClusteredService']$")
ElseIf nComponentID = 100200 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Software.ApplicationHeartbeat']$")
ElseIf nComponentID = 50100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cooling.Temperature']$")
ElseIf nComponentID = 50200 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Cooling.Device']$")
ElseIf nComponentID = 40100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.PowerSupply.PowerSupply']$")
ElseIf nComponentID = 30100 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.ServerProcessing.Memory']$")
ElseIf nComponentID = 30200 Then
Set oComponent = oDiscoveryData.CreateClassInstance("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.ServerProcessing.Processor']$")
Else
oComponent = Empty
End If
End Sub
' Populates Component's properties
Sub FillComponentProperties(ByRef oComponent, ByVal nNodeID, ByVal sNodeName, ByVal sGroupName, ByVal nComponentID, ByVal sComponentName)
Call oComponent.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", sComponentName)
Call oComponent.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", sPrincipalName)
Call oComponent.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Component']/ApplianceID$", sApplianceID)
Call oComponent.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Component']/NodeID$", nNodeID)
Call oComponent.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Component']/NodeName$", sNodeName)
Call oComponent.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Component']/GroupName$", sGroupName)
Call oComponent.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Component']/ID$", nComponentID)
Call oComponent.AddProperty("$MPElement[Name='PDWLibrary!Microsoft.SQLServerAppliance.PDW.Component']/ApplianceNetworkAddress$", sNetworkAddress)
End Sub
</ScriptBody>
<SecureInput>$RunAs[Name="PDWLibrary!Microsoft.SQLServerAppliance.PDW.ActionProfile"]/UserName$@@secureseparator@@$RunAs[Name="PDWLibrary!Microsoft.SQLServerAppliance.PDW.ActionProfile"]/Password$</SecureInput>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</Discovery>