I am looking for a way to programmatically query which SQL server serves as the main SQL server and which one is the mirror in pair. Does anyone know if this is possible through PowerShell (SQLPS) or CMD (SQLCMD)? If so, how can I request this information?
Thanks in advance!
source
share