To stop Database Trace in a PowerBuilder application script, you must delete the word trace from the DBMS property. You can do this by:
Editing the value of the DBMS property of the Transaction object
Reading the DBMS value from an external text file
You must reconnect for the change to take effect.