Using of the functions below one can find the current/active machine in SQLServer cluster.

Select ServerProperty(‘ComputerNamePhysicalNetBIOS’)
NODE2

— fn_virtualservernodes() returns all the nodes in cluster, the first record returned is the active
select top 1 * from fn_virtualservernodes()
NODE2

select * from fn_virtualservernodes()
NODE2
NODE1

2 responses to “How to find the current/active machine in SQLServer cluster?”

  1. Hari Avatar
    Hari

    Can any tell me ,How to find the patch error

    Like

    1. Amin Jaffer Avatar
      Amin Jaffer

      What do you mean patch error, if an error is encountered when installing a patch?

      Like

Leave a reply to Amin Jaffer Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.