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-