Database Drift – Monitoring Unauthorized Object Changes

Install metric...

Metrics install automatically if you have Redgate Monitor installed.

If you are using Redgate’s SQL Server monitoring tool, Redgate Monitor, you can instantly install and run this metric on your servers.

This metric identifies when an object has been changed by other than the authorized login. It relies on an Extended Events session to capture the metrics and filters for a specific login. This is a tweak to this custom metric.

Here is the necessary Extended Events Session (substitute the appropriate login for the ‘LoginName’ string. Then start the session in order to use it with the custom metric.):

Metric definition

Name

Unauthorized Object Changes

Description

This metric identifies when an object has been changed by other than the authorized login.

The T-SQL query that will collect data

Instances to collect from

Select all

Databases to collect from

Select all

Collection frequency

1 min

Use collected or calculated values

Leave the Use a calculated rate of change between collections check box unchecked

Metric collection

Enabled

Alert definition

Alert name

Unauthorized Object Changes

Description

Raise an alert when the metric value goes

Above the defined threshholds

Default threshold values

High:0
Medium:
Low:

Raise an alert when the threshold is passed for

collections

Alert is