Symptom
After upgrading HANA system to Revision97 and higher on an HA environment, you could see the statistics server was migrated to ESS.However you still saw the statistics server on the secondary system with RED status. Also you could see the setting below in daemon.ini file on the secondary system.
[statisticsserver]
instances = 1
Even through you changed it to 0 it was changed to 1 automatically after restart.
Root cause-
The root cause is that statisticserver node in topology was not removed correctly during ESS migration.
You can see an empty statistics server information in topology.txt file.
Solution
Solution Note : 2207797
Remove the SAP HANA Statitisticsserver service entry from the topology on PRIMARY system.
You can use the following command for each <hostname> which had a statisticserver service before upgrade.
ALTER SYSTEM ALTER CONFIGURATION (‘topology.ini’, ‘system’) UNSET (‘/host/<host name>’, ‘statisticsserver’) WITH RECONFIGURE
Note :2164506 – Registering SAP HANA system replication in the context of the migration to the Embedded Statistics Server could lead to crashes