Discover Databases for a Database Engine

Microsoft.SQLServer.2012.DatabaseDiscoveryRule (Discovery)

This object discovery discovers all databases running for a given instance of SQL Server 2012 DB Engine. By default, all databases are discovered and monitored. You can override the discovery to exclude one or more databases from being discovered using the Exclude List. This list takes a comma-separated list of database names or * wildcard to exclude all databases.

Knowledge Base article:

Summary

This object discovery discovers all databases running for a given instance of SQL Server 2012 DB Engine. By default, all databases are discovered and monitored. You can override the discovery to exclude one or more databases from being discovered using the Exclude List. This list takes a comma-separated list of database names or * wildcard to exclude all databases.

Configuration

Exclude List: A comma-separated list of database names that should be excluded from discovery. You can use the wildcard * to exclude all databases.

Overridable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

Yes

Exclude List

A comma-separated list of database names that should be excluded from discovery. You can use the wildcard * to exclude all databases.

 

Interval (seconds)

The polling interval in seconds that discovery will run on.

14400

Synchronization Time

The synchronization time specified by using a 24-hour format. May be omitted.

 

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

300

Element properties:

TargetMicrosoft.SQLServer.2012.DBEngine
EnabledTrue
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:
  • Microsoft.SQLServer.2012.Database
    • DatabaseName
    • RecoveryModel
    • DatabaseAutogrow
    • DatabaseSize
    • DatabaseSizeNumeric
    • LogAutogrow
    • Updateability
    • UserAccess
    • Collation
    • LogSize
    • LogSizeNumeric
    • Owner

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2012.DBDiscovery Default

Source Code:

<Discovery ID="Microsoft.SQLServer.2012.DatabaseDiscoveryRule" Enabled="true" Target="Microsoft.SQLServer.2012.DBEngine">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.SQLServer.2012.Database">
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="DatabaseName"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="RecoveryModel"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="DatabaseAutogrow"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="DatabaseSize"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="DatabaseSizeNumeric"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="LogAutogrow"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="Updateability"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="UserAccess"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="Collation"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="LogSize"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="LogSizeNumeric"/>
<Property TypeID="SQL!Microsoft.SQLServer.Database" PropertyID="Owner"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2012.DBDiscovery">
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
<ComputerID>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerID>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<SQLConnectionString>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</SQLConnectionString>
<SQLInstanceName>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</SQLInstanceName>
<ExcludeList/>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</Discovery>