Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.

CREATE VIEW sys.database_mirroring AS
	SELECT d.id AS database_id,
		p.guid AS mirroring_guid,
		p.state AS mirroring_state, p.state_desc AS mirroring_state_desc,
		p.role AS mirroring_role, p.role_desc AS mirroring_role_desc,
		p.role_sequence AS mirroring_role_sequence,
		p.safety_level AS mirroring_safety_level,
		p.safety_level_desc AS mirroring_safety_level_desc,
		p.safety_sequence AS mirroring_safety_sequence,
		p.partner_name AS mirroring_partner_name,
		p.partner_instance AS mirroring_partner_instance,
		p.witness_name AS mirroring_witness_name,
		p.witness_state AS mirroring_witness_state,
		p.witness_state_desc AS mirroring_witness_state_desc,
		p.failover_lsn AS mirroring_failover_lsn,
		p.connection_timeout AS mirroring_connection_timeout,
		p.redo_queue AS mirroring_redo_queue,
		p.redo_queue_type AS mirroring_redo_queue_type,
		p.end_of_log_lsn AS mirroring_end_of_log_lsn,
		p.safe_relication_lsn AS mirroring_replication_lsn
	FROM master.sys.sysdbreg d OUTER APPLY OpenRowset(TABLE DBMIRROR, d.id) p
	WHERE d.id < 0x7fff
		AND has_access('DB', d.id) = 1

Last revision 2008RTM
See also

  database_mirroring_endpoints (View)
database_mirroring_witnesses (View)
sp_dbmmonitoraddmonitoring (Procedure)
sp_dbmmonitorchangemonitoring (Procedure)
sp_dbmmonitordropmonitoring (Procedure)
sp_dbmmonitorhelpmonitoring (Procedure)
sp_dbmmonitorupdate (Procedure)
sp_MSgetreplnick (Procedure)
sp_MSmerge_validate_publication_presence (Procedure)


  Query a named instance
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
Zoekmachine optimalisatie
SQL Servers hidden objects
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
sIFR; de combinatie tussen HTML en Flash