13.5 Monitoring Database Mirroring

Source: Internet
Author: User

13.5 Monitoring Database Mirroring


13.5.1 Database Mirroring Monitor

Database Mirroring Monitor is a graphical user interface tool that system administrators can use to view and update status and configure warning thresholds for multiple key performance indicators.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6D/B4/wKiom1VpoRGCzbqHAAQA62mV0IQ972.jpg "title=" Start monitor. png "alt=" wkiom1vporgczbqhaaqa62mv0iq972.jpg "/>


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6D/B4/wKiom1VpoP2gsF6jAALATvASgiw798.jpg "style=" float: none; "title=" mirror Monitor. png "alt=" wkiom1vpop2gsf6jaalatvasgiw798.jpg "/>


13.5.2 Database Mirroring Monitoring Job

The database Mirroring monitoring job (Database Mirroring Monitor Job) runs independently of the database Mirroring Monitor. The Database Mirroring Monitor Jobis created automatically only when you start a mirroring session by using SSMS.

If you always start mirroring with the ALTER DATABASE database_name SET PARTNER command, the job exists only if the system administrator runs the sp_dbmmonitoraddmonitoring stored procedure.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6D/B4/wKiom1VporGipFFaAARo4_uLhOQ723.jpg "title=" Monitor job. png "alt=" wkiom1vporgipffaaaro4_ulhoq723.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6D/B4/wKiom1VppJ2AaX3QAASIlQ81qFQ828.jpg "title=" Job history. png "alt=" wkiom1vppj2aax3qaasilq81qfq828.jpg "/>


13.5.3 Using Stored Procedures

  The database mirroring state is stored in an internal, non-logged Database mirroring state table within the msdb database. This state table is automatically created when the mirroring state is first updated on the server instance.

  The status table can be updated automatically through the database Mirroring monitor and the Database Mirroring Monitor job (if it is running).

After you create a Database Mirroring Monitor Job , if SQL Server agent is running, the job is called every minute by default. The job then calls the sp_dbmmonitorupdate system stored procedure to update the status table. System administrators can use the sp_dbmmonitorchangemonitoring system stored procedure to change the duration of the update (specified as a value between 1-120 minutes), or you can use the sp_dbmmonitorchangemonitoring The system stored procedure views the current update duration.

Instead, the database Mirroring Monitor automatically updates the status table every 30 seconds.

  You can retrieve or update the current state by running the sp_dbmmonitorresults system stored procedure.

Use msdb;

GO

Sp_dbmmonitorresults ' SQLDB01 ';

GO


This article from "SQLServer2014 series" blog, declined reprint!

13.5 Monitoring Database Mirroring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.