Relative Content

Tag Archive for sql-serverfailoveralteravailability

ALTER AVAILABILITY GROUP in T-SQL not working

I am trying to set up a maintenance job in my SQL Server 2016 database that runs a check to see if one of my secondary nodes is the primary, if it is, I want it to failover to the actual server that is set up to be the primary. I have the check working, but when I try to run the statement

ALTER AVAILABILITY GROUP TSQL not working

I am trying to set up a maintenance job in my SQL Server 2016 database that runs a check to see if one of my secondary nodes is the primary, if it is, I want it to failover to the actual server that is set up to be the primary. I have the check working, but when I try to run the statement ALTER AVAILABILITY GROUP agname FAILOVER, nothing happens. The statement doesn’t fail, but it also doesn’t start the failover process. What am I doing wrong?