Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4532

How to get Fail over report?

$
0
0

Is there any way I can find the number of times the fail over occurred? I wanted to know in last month how many fail over happened. In LOG there is large set of data and difficult to parse. Do we have any powershell/SQL Script?

I thought we can set up a monitoring script using the method
select * from sys.dm_hadr_availability_replica_states

The particular columns of interest related to failover events are:

  • last_connect_error_number
  • last_connect_error_description
  • last_connect_error_timestamp

We need to create a Job which runs every X minutes (Example: 15 minutes) and filters the above columns to find the fail overs. But this gives only future fail overs.


Many Thanks Deepak



Viewing all articles
Browse latest Browse all 4532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>