Use the @@hacmpservername global variable to determine the name of the companion server. The syntax is:
select @@hacmpservername
For example, if you issue this command from primary companion MONEY1 you receive output similar to this:
select @@hacmpservername ------------------------------ PERSONE1 (1 row affected)