Enable global SQL tracing for a session
You can enable global SQL tracing for the current session by running the SQL administration API task() or admin() function.
You must be connected to the sysadmin database as user informix or another authorized user.
By default, global SQL tracing is not enabled. You can set the SQLTRACE configuration parameter to permanently enable global tracing.
To enable global user SQL history tracing for the current database server session, run the SQL administration API task() or admin() function with the set sql tracing on argument.
Example
EXECUTE FUNCTION task("set sql tracing on", 1000, 1,"low","global");
If a new user logs on to the system after your statement runs, you can enable tracing for the new user. See Enable SQL tracing.
For more information about the task() and admin() functions, see the IBM® Informix® Guide to SQL: Syntax.