Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

how to get the name of database which is preferred replica

$
0
0

Hello Experts,

i have to prepare a query in which after the where clause i want to say get me the name of database only if it ispreferred replica.

i see there is a function which gives 1 if the passed database is prefered replica.

but what i want is just oposite of it.

where (SELECT [master].sys.fn_hadr_backup_is_preferred_replica('%') = 1)

So i dont know the name of database but i always want to run my primary query only if it is prefered replica.

is there a way to achieve it?


-KAKA-



Viewing all articles
Browse latest Browse all 4054

Trending Articles



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