MSSQL 2016: 发现 SQL Server 2016 数据库安装源(种子)

Microsoft.SQLServer.2016.SeedDiscovery (Discovery)

此发现规则将发现 Microsoft SQL Server 2016 安装的种子。该对象指示特定服务器计算机包含 Microsoft SQL Server 2016 安装。

Knowledge Base article:

摘要

此发现规则将发现 Microsoft SQL Server 2016 安装的种子。该对象指示特定服务器计算机包含 Microsoft SQL Server 2016 安装。

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

频率(秒)

运行工作流的重复间隔时间(秒)。

14400

Element properties:

TargetMicrosoft.Windows.Server.Computer
EnabledTrue
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.FilteredRegistryDiscoveryProvider Default

Source Code:

<Discovery ID="Microsoft.SQLServer.2016.SeedDiscovery" Enabled="true" Target="Windows!Microsoft.Windows.Server.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.SQLServer.2016.Seed"/>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
<ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<AttributeName>AppExists</AttributeName>
<Path>SOFTWARE\Microsoft\Microsoft SQL Server\130\Machines</Path>
<PathType>0</PathType>
<AttributeType>0</AttributeType>
</RegistryAttributeDefinition>
<RegistryAttributeDefinition>
<AttributeName>App32Exists</AttributeName>
<Path>SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\130\Machines</Path>
<PathType>0</PathType>
<AttributeType>0</AttributeType>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<Frequency>14400</Frequency>
<ClassId>$MPElement[Name="Microsoft.SQLServer.2016.Seed"]$</ClassId>
<InstanceSettings>
<Settings>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
<Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
<Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
</Setting>
</Settings>
</InstanceSettings>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Values/AppExists</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Values/App32Exists</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</DataSource>
</Discovery>