Database mirroring failover

  • Hi Expertz,

    Can anyone please give me a query to find when was the last database mirroring failover recorded.

    Tanx 😀

  • Eswin (1/30/2012)


    Hi Expertz,

    Can anyone please give me a query to find when was the last database mirroring failover recorded.

    Check this

    http://www.mssqltips.com/sqlservertip/1564/database-mirroring-automating-failover-for-multiple-sql-server-databases/

  • This was not helpful. Is there some query that doesn't require to create any trigger,sp etc.

    Tanx 😀

  • See if sp_readerrorlog 0,1,'mirror', 'failover' (or some variation thereof) works for you.

    For more in depth monitoring of mirroring events you may need to look into capturing WMI events via SQL Agent alerts.

    Cheers

  • If you don't limit yourself to a defined query, you can try examining either the SQL Server logs or the System Application logs. Generally you will receive the same event messages in both logs; depending on activity and filtering options, you can usually land on the messages in question pretty quickly.

    How frequently will you need to answer this question? If it is not a frequent question, you will probably want to browse the logs to identify the context of other/related events surrounding the fail over, such as lost communications without triggering a fail over.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply