Is there a way using TSQL, CMD Script or VB Script to tell:
1) if SQL Server is clustered on the server, and
2) if it is the active node or not?
Thanks.
Both of these can be found using
SELECT * FROM fn_virtualservernodes()
If there are no results, it's not clustered.
来源:https://stackoverflow.com/questions/19347370/tsql-how-to-tell-if-sql-is-clustered