MQTrace() function
The MQTrace() procedure specifies the level of tracing and the location to which the trace file is written.
Syntax
- trace_level
- Required parameter. Integer value specifying the trace level, currently only a value of greater than 50 results in output.
- trace_file
- Required parameter. The full path and name of the file to which trace information is appended. The file must be writable by user informix.
To enable tracing, you must first create a trace
class by inserting a record into the systemtraceclasses system
catalog:
insert into informix.systraceclasses(name) values ('idsmq')
For more details regarding tracing, see the HCL OneDB™ Guide to SQL: Reference.
Example
Enable tracing at a level of 50
with an output file of /tmp/trace.log:
EXECUTE PROCEDURE MQTrace(50, '/tmp/trace.log');
Execute
a request:
begin;
EXECUTE FUNCTION MQSend('IDS');
commit;
Look at the trace output:
14:19:38 Trace ON level : 50
14:19:47 >>ENTER : mqSend<<
14:19:47 status:corrid is null
14:19:47 >>ENTER : MqOpen<<
14:19:47 status:MqOpen @ build_get_mq_cache()
14:19:47 >>ENTER : build_get_mq_cache<<
14:19:47 status:build_get_mq_cache @ mi_get_database_info()
14:19:47 status:build_get_mq_cache @ build_mq_service_cache()
14:19:47 >>ENTER : build_mq_service_cache<<
14:19:47 <<EXIT : build_mq_service_cache>>
14:19:47 status:build_get_mq_cache @ build_mq_policy_cache()
14:19:47 >>ENTER : build_mq_policy_cache<<
14:19:47 <<EXIT : build_mq_policy_cache>>
14:19:47 status:build_get_mq_cache @ build_mq_pubsub_cache()
14:19:47 >>ENTER : build_mq_pubsub_cache<<
14:19:47 <<EXIT : build_mq_pubsub_cache>>
14:19:47 <<EXIT : build_get_mq_cache>>
14:19:47 status:MqOpen @ MqiGetServicePolicy()
14:19:47 >>ENTER : MqiGetServicePolicy<<
14:19:47 <<EXIT : MqiGetServicePolicy>>
14:19:47 MQI:MqOpen @ MQCONNX()
14:19:47 status:MqOpen @ MqXadsRegister()
14:19:47 >>ENTER : MqXadsRegister<<
14:19:47 status:MqXadsRegister @ ax_reg()
14:19:47 <<EXIT : MqXadsRegister>>
14:19:47 status:MqOpen @ MqGetMqiContext()
14:19:47 >>ENTER : MqGetMqiContext<<
14:19:47 MQI:MqGetMqiContext @ MQOPEN()
14:19:47 <<EXIT : MqGetMqiContext>>
14:19:47 <<EXIT : MqOpen>>
14:19:47 >>ENTER : MqTransmit<<
14:19:47 >>ENTER : MqBuildMQPMO<<
14:19:47 <<EXIT : MqBuildMQPMO>>
14:19:47 >>ENTER : MqBuildMQMDSend<<
14:19:47 <<EXIT : MqBuildMQMDSend>>
14:19:47 MQI:MqTransmit @ MQPUT()
14:19:47 <<EXIT : MqTransmit>>
14:19:47 <<EXIT : mqSend>>
14:19:47 >>ENTER : MqEndTran<<
14:19:47 MQI:MqEndTran @ MQCMIT()
14:19:47 status:MqEndTran @ MqShut()
14:19:47 >>ENTER : MqShut<<
14:19:47 status:MqEndTran @ MQDISC
14:19:47 <<EXIT : MqEndTran>>: