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

get the databases that are not part of any availability groups (AlwaysOn)

$
0
0

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 ?

 


Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"


Viewing all articles
Browse latest Browse all 4689

Trending Articles