703
Chapter 27: Database Mirroring
27
partner_sync_state_desc
FROM sys.database_mirroring_witnesses;
TABLE 27-3 Querying the sys.database_mirroring_witnesses
Catalog View
Column Name Witness Server Results
database_name AdventureWorks
principal_server_name TCP://sql2008ni1.hol169.local:5022
mirror_server_name TCP://sql2008ni2.hol169.local:5022
saftey_level_desc FULL
partner_sync_state_desc IN_SYNC
■ (^) Query the sys.database_mirroring_endpoints catalog view to review data-
base mirroring endpoints information. For example, to check that the endpoints are
started (STATE=STARTED), execute the following code on each server participating
in the database mirroring session
SELECT state_desc FROM sys.database_mirroring_endpoints;
Monitoring Database Mirroring
You can monitor database mirroring in many ways. The simplest way to monitor database
mirroring is to launch the Database Mirroring Monitor. To monitor database mirroring perfor-
mance, you can use System Monitor performance counters on the mirroring partners. You can
also use the SQL Server Profi ler tool to capture the time taken for database mirroring failover.
Monitoring Using Database Mirroring Monitor
Microsoft provides a useful tool called Database Mirroring Monitor to monitor database mir-
roring. You can launch the Database Mirroring Monitor tool from SQL Server Management
Studio as follows:
- Open Management Studio, and connect to the principal or mirror server.
- Expand Databases, and right-click the principal database.
- Select Tasks, and then click Launch Database Mirroring Monitor.
- Click Action menu, and select Register Mirrored Database.
- On the Register Mirrored Database dialog box, click the Connect button to display
the Connect to Server dialog box. Type the connection properties of the principal or
c27.indd 703c27.indd 703 7/31/2012 9:50:28 AM7/31/2012 9:50:28 AM
http://www.it-ebooks.info