Home » SQL Server » SQL Server Database Mirroring Monitoring

SQL Server Database Mirroring Monitoring

SQL Server Database Mirroring keeps running all time to sync data between Principle & Mirror database. We need regular monitoring of Database Mirroring to ensure that everything is working fine.

We are monitor Database Mirroring by 2 ways :-

1) SSMS : Connect to Principle Server > Select Database > Right Click , Go to Task & Select Launch Database Mirroring Monitor

2) T-SQL Script : You can use sp_dbmmonitorresults system store procedure for the same. We care create customized scripts using this system store procedure for more detail output & email alerts.

database_name : Specifies the database for which to return mirroring status.


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


0 = Does not update the status for the database.

1 = Updates the status for the database by calling sp_dbmmonitorupdate before computing the results.

Exec sp_dbmmonitorresults ‘<DB Name>’

Reference : Rohit Garg (http://mssqlfun.com/)

You can find and follow MSSQLFUN :-




Other Linked Profiles :-







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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: