The Shutdown command only stops the TREX processes once current transactions have been completed. Do not use the Stop command because this terminates the TREX processes abruptly and there is a risk of data loss.
Using stopsap.exe to Stop TREX
stopsap.exe name=<SAPSID> nr=TRX<instance_number> SAPDIAHOST =<host>
In the SAPDIAHOST parameter, you specify the host name on which the TREX instance should be stopped.
stopsap.exe name=ABC nr=TRX77 SAPDIAHOST =p123456
Do not use the Task Manager to stop the SAP service or the individual TREX servers. Otherwise, data can be lost. Affected indexes can be irreparably damaged.
Certain processing steps, for example, writing an index, cannot be interrupted. Such steps are completed before TREX is stopped. This process can take a while to complete. With large indexes, it can take up to a few hours to stop the TREX servers if lots of documents are currently being indexed.