Skip to content

Replication Monitor Database

The complete DDL for a ReplicationMonitor database that records replication throughput and errors over time.

Published Jun 11, 2008

The home base for the replication monitoring suite. This is the full script of the ReplicationMonitor database: the database options, two custom roles (db_schemareader and db_executor), and all of the stored procedures it contains - including SendErrorAlerts and the command-recording procedures that feed the hourly throughput tables. Run it once on the distributor to create everything, then wire up the companion maintenance jobs to keep it populated.

USE [master]
GO
/****** Object:  Database [ReplicationMonitor]    Script Date: 4/24/2015 2:00:15 PM ******/
CREATE DATABASE [ReplicationMonitor]
GO

GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [ReplicationMonitor].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [ReplicationMonitor] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET ARITHABORT OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [ReplicationMonitor] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [ReplicationMonitor] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [ReplicationMonitor] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET  DISABLE_BROKER 
GO
ALTER DATABASE [ReplicationMonitor] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [ReplicationMonitor] SET READ_COMMITTED_SNAPSHOT OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET HONOR_BROKER_PRIORITY OFF 
GO
ALTER DATABASE [ReplicationMonitor] SET RECOVERY SIMPLE 
GO
ALTER DATABASE [ReplicationMonitor] SET  MULTI_USER 
GO
ALTER DATABASE [ReplicationMonitor] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [ReplicationMonitor] SET DB_CHAINING OFF 
GO
EXEC sys.sp_db_vardecimal_storage_format N'ReplicationMonitor', N'ON'
GO
USE [ReplicationMonitor]
GO
/****** Object:  DatabaseRole [db_schemareader]    Script Date: 4/24/2015 2:00:16 PM ******/
CREATE ROLE [db_schemareader]
GO
/****** Object:  DatabaseRole [db_executor]    Script Date: 4/24/2015 2:00:16 PM ******/
CREATE ROLE [db_executor]
GO
An unhandled error has occurred. Reload 🗙