Set MQCONNX options to control collection of activity trace information
If the queue manager attribute ACTVCONO is set to ENABLED, we can use the ConnectOpts parameter on the MQCONNX call to enable or disable application activity reports on a per connection basis. These options override the activity trace behavior defined by the queue manager attribute ACTVTRC, and can be overridden by settings in the activity trace configuration file mqat.ini.
Procedure
- Set the queue manager attribute ACTVCONO to ENABLED. Note: If an application attempts to modify the accounting behavior of an application using the ConnectOpts parameter, and the QMGR attribute ACTVCONO is set to DISABLED, then no error is returned to the application, and activity trace collection is defined by the queue manager attributes or the activity trace configuration file mqat.ini.
-
Set the ConnectOpts parameter on the MQCONNX call to
MQCNO_ACTIVITY_TRACE_ENABLED.
The ConnectOpts parameter on the MQCONNX call can have the following values:
- MQCNO_ACTIVITY_TRACE_DISABLED
- Activity trace is disabled for the connection.
- MQCNO_ACTIVITY_TRACE_ENABLED
- Activity trace is enabled for the connection.
Note: If an application selects both MQCNO_ACTIVITY_TRACE_ENABLED and MQCNO_ACTIVITY_TRACE_DISABLED for MQCONNX, the call fails with a reason code of MQRC_OPTIONS_ERROR.
- Check that these activity trace settings are not being overridden by settings in the activity trace configuration file mqat.ini.
What to do next
The simplest way to view the contents of application activity trace messages is to use the amqsact sample program.
Enable application activity trace can affect performance. The overhead can be reduced by tuning the ActivityCount and the ActivityInterval settings. See Tuning the performance impact of application activity trace.
Parent topic: Configure central collection of application activity trace information