Using @@hacmpservername

Use the @@hacmpservername global variable to determine the name of the companion server:

select @@hacmpservername

For example, if you issue this command from primary companion MONEY1 you see output similar to this:

select @@hacmpservername
------------------------------ 
PERSONE1 
(1 row affected)