Hello,
I am trying to all databases that are not part of any availability groups (AlwaysOn) using T-SQL.
i tried but i found only 1 way to do it
first is to get all databases on the server
Select name from sys.databases
then get all databases that are part of the availability groups
Select * from sys.availability_databases_cluster
then get the differences manually
is there is any statement that can get the databases that are not part of any availability groups (AlwaysOn) directly ?