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.

rows_to_return

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

update_status

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 :-

http://www.facebook.com/mssqlfun

http://mssqlfun.com/feed

https://twitter.com/Rgarg86

Other Linked Profiles :-

http://www.sqlservercentral.com/blogs/mssqlfun/

http://social.msdn.microsoft.com/Profile/rohitgarg

http://www.toadworld.com/members/rohit-garg/blogs/default.aspx

http://beyondrelational.com/members/RohitGarg/default.aspx


2 Comments

Leave a Reply

Join us on Facebook

microsoftcommunitycontributor
%d bloggers like this: