I would like to provide you further information about two task lists SAP_ESH_ADJUST_AFTER_COPY and SAP_ESH_ADJUST_AFTER_CLIENT_COPY (this is a copy of the first named with adapted parameters).
They cannot be used with TREX destination. The adjustment of ESH data is only possible when SAP HANA is used. It is not possible to adjust the TREX indexes on TREX. This is the reason for the message “Connection “:RFC:TREX_RFC” to database is unknown”. The task list checks the connection to SAP HANA. The other task lists can run with TREX and SAP HANA.
There is a corrective note 2362038 – Task list SAP_ESH_ADJUST_AFTER_COPY: Search object connectors are older than this adjustment feature.
ESH Product Support