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

Unable to identify Global primary or Forwarder by code (AlwaysOn - SQL Server 2017)

$
0
0
In a DAG topology there is a need to identify the Global primary and the forwarder replica by database. 
The existing function - sys.fn_hadr_is_primary_replica returns 1 in both cases and if for example we have a job that need to write then it can be done only on Global primary (Forwarder is read only). 
We need a simple way to identify these role without a very complex query.

I Think that it will be important to have a column in related DMV/system views to identify them both in order to avoid exceptions.

Viewing all articles
Browse latest Browse all 4532

Trending Articles



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