Article ID: 930048 - Last Review: November 20, 2007 - Revision: 1.3

A query notification dependency between an application and a SQL Server 2005 database does not detect the changes in the database after a database mirroring failover

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

SYMPTOMS

You use the SqlDependency class to create a query notification dependency between an application and a database in an instance of Microsoft SQL Server 2005. After a database mirroring failover, the dependency does not detect the changes in the database.

Note This issue occurs when you configure the SQL Server 2005 database to use database mirroring.

CAUSE

This issue occurs because the existing dependencies are invalidated when the database mirroring failover occurs.

RESOLUTION

To resolve this issue, add code to monitor database mirroring failovers. Then, re-execute the relevant commands that are used together with the dependencies.

STATUS

This behavior is by design.

MORE INFORMATION

For more information about how to monitor the database mirroring failover, download the SQL Server 2005 Samples and Sample Databases (December 2006). Then, reference the Mirroring Failover sample project. To do this, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?FamilyID=e719ecf7-9f46-4312-af89-6ad8702e4e6e&DisplayLang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=e719ecf7-9f46-4312-af89-6ad8702e4e6e&DisplayLang=en)

APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
Keywords: 
kbtshoot kbexpertiseadvanced kbsql2005engine kbprb KB930048