To have history records from all XCOM servers, do we have to install a database in each server?
No, you just need to install one database for the history records. All servers can then record the history records to that database. The servers will need a ODBC in order to connect to the database and record the records.
This pertains to those versions of CA XCOM that can write its history records to a database such as MySQL or IBM's DB2.