Home > Database Mirroring > Monitoring Database Mirroring

Monitoring Database Mirroring

Couple of days back I was working for a client on creating a database mirroring monitor report to show how log has been sent to DR in last couple of hour. How much log is left to be sent based on the send rate and long will it.

Stored Procedure sp_dbmmonitorresults in msdb database gives all this detail for Principal database

sp_dbmmonitorresults database_name , rows_to_return , update_status


Exec msdb..sp_dbmmonitorresults ‘SGPData’,1,0


database_name :  Database Name

Specifies the quantity of rows returned:
0 = Last row
1 = Rows last two hours
2 = Rows last four hours
3 = Rows last eight hours
4 = Rows last day
5 = Rows last two days
6 = Last 100 rows
7 = Last 500 rows
8 = Last 1,000 rows
9 = Last 1,000,000 rows



Specifies that before returning results the procedure:

0 = Does not update the status for the database. The results are computed using just the last two rows, the age of which depends on when the status table was refreshed.

1 = Updates the status for the database by calling sp_dbmmonitorupdate before computing the results. However, if the status table has been updated within the previous 15 seconds, or the user is not a member of the sysadmin fixed server role, sp_dbmmonitorresults runs without updating the status.




Categories: Database Mirroring
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: