Database Mail XPs


Job details

Name: Database Mail XPs
Platform: Sqlserver
Category: Security
Premium package: Security and compliance package
Description: Checks the ability to generate and transmit email messages from SQL Server.
Long description: Checks the ability to generate and transmit email messages from SQL Server.
Version: 1.2
Default schedule: 8 1 1 *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & eng_inst_priv = 0 & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
return status 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when the “Database Mail XPs” parameter is enabled.
disable Database Mail XPs NO If set to “YES“ the alert will disable “Database Mail XPs” (if it is enabled) by running sp_configure stored procedure.
history threshold 365 The maximum number of days to keep statistics for in the historic tables.

Job Summary

SELECT value_in_use FROM sys.configurations WHERE name = 'Database Mail XPs';

Dependencies

Implementation Details

The job includes SQL script implementations for:

Reporting

This job generates several reports for different purposes:

Tables

Column Name Description Data Type
configuration_id ID of the configuration Integer
name Name of the parameter String
value Configured value Integer
minimum Minimum acceptable value Integer
maximum Maximum acceptable value Integer
value_in_use Value currently in use Integer
description Description of the configuration String
is_dynamic Indicates if the setting is dynamic Boolean
is_advanced Indicates if the setting is advanced Boolean

Upgrade Notes

This script is essential for administrators to ensure SQL Server’s capacity to send database mail, which is often used for alerting and notifications, remains compliant with security policies and performance standards.