Creates a database mirroring monitor job that periodically updates the mirroring status for every mirrored database on the server instance.
sp_dbmmonitoraddmonitoring [ update_period ]
Specifies the interval between updates in minutes. This value can be from 1 to 120 minutes. The default is 1 minute.
This procedure requires that SQL Server Agent is allowed to run on the server instance, and for the database mirroring monitor job to run, Agent must be running.
If database mirroring is started from SQL Server Management Studio, the sp_dbmmonitoraddmonitoring procedure is run automatically. If you start mirroring up manually using ALTER DATABASE statements, to monitor mirrored database on the server instance, you must run sp_dbmmonitoraddmonitoring manually.
Requires membership in the sysadmin fixed server role.
The following example starts monitoring with an update period of
EXEC sp_dbmmonitoraddmonitoring 3;
Monitoring Database Mirroring (SQL Server)