Can we monitor Database Replication?

Greetings -

Can we monitor database replication using SQL Sentry, DPA, or something in Solarwinds Orion? 

I did some quick searching and did not come up with anything yet. 

Thanks!

Dave

Parents Reply
  • You can use a SAM SQL monitor to query the SQL instance if there are any AG's that is failing. Use below query:

    select 
    	g.name
    INTO #AGStatus
    from sys.dm_hadr_availability_group_states S
    inner join sys.availability_groups G on s.group_id=G.group_id
    Where synchronization_health<2
    AND s.primary_recovery_health=1
    
    IF (Select COUNT(name) from #AGStatus)>0 
    BEGIN
    		Select 
    		count(*) as "Rowcount", 
    		t.FailingAG 
    		from(
    			Select 
    				substring(
    				(
    					Select ', '+ags.name  AS [text()]
    					From #AGStatus ags
    					For XML PATH ('')
    				)
    				, 2, 1000) [FailingAG]
    	From #AGStatus ags) 
    	as t
    	group by t.FailingAG 
    
    END
    ELSE
    Select 0 AS "RowCount"
    
    Drop table #AGStatus

Children
No Data