Trustworthy


Job details

Name: Trustworthy
Platform: Sqlserver
Category: Security
Premium package: Security and compliance package
Description: Check if the TRUSTWORTHY database option allows database objects to access objects in other databases.
Long description: Check if the TRUSTWORTHY database option allows database objects to access objects in other databases.
Version: 1.2
Default schedule: 31 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 “Trustworthy” for a database is enabled.
disable Trustworthy NO If set to “YES“ the alert will disable “Trustworthy” (if it is enabled) by running ALTER DATABASE [<database_name>] SET TRUSTWORTHY OFF.
history threshold 365 The maximum number of days to keep statistics for in the historic tables.
ignore databases msdb The list of databases to be ignored (separated by comma).
ignore READ ONLY databases YES Ignores READ ONLY databases. Databases where DATABASEPROPERTYEX Updateability is set to READ_ONLY.

Job Summary

SELECT name, is_trustworthy_on FROM sys.databases WHERE is_trustworthy_on = 1;

Implementation Details

The job implements a series of SQL operations encapsulated within stored procedures to assess the TRUSTWORTHY status, log history, and possibly disable the setting:

Configuration and Dependencies

The job involves the use of several dependencies crucial for its execution:

Tables and Reports

Job Maintenance and Upgrading

In conclusion, this dbWatch Control Center job is integral for organizations aiming to uphold strong database security practices by monitoring and managing the TRUSTWORTHY setting in SQL Server environments.