For DLM Dashboard to work, you need to run a setup script on servers you want to monitor. It installs several objects:
- a DDL trigger called RG_SQLLighthouse_DDLTrigger
DDL triggers run a stored procedure in response to a specified Data Definition Language (DDL) event. For more information, see Understanding DDL Triggers (MSDN).
- a database called RedGate
- three stored procedures called RG_SQLLighthouse_WriteEvent, RG_SQLLighthouse_ReadEvents, and RG_SQLLighthouse_WriteError
DLM Dashboard detects schema changes with the DDL trigger. Whenever a database’s schema changes, the DDL trigger fires, triggering the stored procedure RG_SQLLighthouse_WriteEvent.
The stored procedure adds details of the changes to the database called RedGate, which DLM Dashboard’s monitoring service polls regularly. If a schema has changed, the monitoring service updates the DLM Dashboard interface, and alerts you.
DLM Dashboard also takes a snapshot of the database schema when a database has changed. It compares these schema snapshots to a snapshot of the previous schema version, and records the differences in the DLM Dashboard’s storage service so you can see the changes in the dashboard.
Running the setup script
To install the objects that DLM Dashboard needs, run this SQL script on each server you want to monitor:
Removing the DLM Dashboard objects from SQL Server
To uninstall the DLM Dashboard objects from your SQL Server, run this uninstall script. The uninstall script does not delete the RedGate database - you'll need to delete it manually.