MSSQL on Linux: Discover Database Custom User Policy

Microsoft.SQLServer.Linux.Discovery.DatabaseUserPolicy (Discovery)

This rule discovers Custom User Policies for SQL Server Database on Linux. Note: This discovery is disabled by default. Please use overrides to enable it when necessary.

Knowledge Base article:

Summary

This is the main discovery for Custom User Policies for MSSQL Databases on Linux. Note: This discovery is disabled by default. Please use overrides to enable it when necessary.

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

No

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

14400

Synchronization Time

Synchronization Time

 

Timeout (seconds)

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

300

Timeout for database connection (seconds)

The workflow will fail and register an event, if it cannot access the database during the specified period.

15

Element properties:

TargetMicrosoft.SQLServer.Linux.Database
EnabledFalse
Frequency14400
RemotableFalse

Object Discovery Details:

Discovered Classes and their attribuets:

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.Linux.DataSource.DatabaseUserPolicyDiscovery Default

Source Code:

<Discovery ID="Microsoft.SQLServer.Linux.Discovery.DatabaseUserPolicy" Enabled="false" Target="Microsoft.SQLServer.Linux.Database">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.SQLServer.Linux.Policy"/>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.Linux.DataSource.DatabaseUserPolicyDiscovery">
<MachineName>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<InstanceName>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<ConnectionString>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<DatabaseName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.Database"]/DatabaseName$</DatabaseName>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>14400</IntervalSeconds>
<SyncTime/>
</DataSource>
</Discovery>