Database Administrators
Q&A for database professionals who wish to improve their database skills
Latest Questions
1
votes
1
answers
42
views
Azure SQL failover Group testing
If I set up a failover Group for an Azure SQL Database (not a Managed Instance or SQL Server on VM), is it possible to do a test failover, so there is a copy of the Azure SQL Database available for testing, whilst a copy of the production SQL instance is maintained? Cheers Alex
If I set up a failover Group for an Azure SQL Database (not a Managed Instance or SQL Server on VM), is it possible to do a test failover, so there is a copy of the Azure SQL Database available for testing, whilst a copy of the production SQL instance is maintained?
Cheers
Alex
AlexP012
(53 rep)
Mar 11, 2025, 08:57 AM
• Last activity: Mar 12, 2025, 02:50 PM
1
votes
1
answers
77
views
execute job only on primary replica ( R/W) of Azure SQL MI failover groups
I am trying to setup SQL agent job that will only execute if it is primary replica of Azure SQL MI of failover groups. I am trying to get primary replica using `sys.dm_hadr_database_replica_states` where `is_primary_replica =1` but when I run it on SQL MI in different region , it also returns value...
I am trying to setup SQL agent job that will only execute if it is primary replica of Azure SQL MI of failover groups.
I am trying to get primary replica using
sys.dm_hadr_database_replica_states
where is_primary_replica =1
but when I run it on SQL MI in different region , it also returns value 1.
I am using dbo.fn_hadr_group_is_primary(@AGName)=1
function for on-prem so looking for something similar for Azure SQL MI.
SqlDBA
(171 rep)
Feb 19, 2025, 02:12 PM
• Last activity: Feb 24, 2025, 03:48 PM
Showing page 1 of 2 total questions