Tracing
and logging are useful ways to monitor the system. They can help diagnose both
errors and performance problems.
To set
the tracing options, click the Tools menu,
click Options,
and then click the SQL link.
You can configure the following SQL tracing areas:
·
Multiple SQL statements
·
Long queries
·
Warnings
·
Deadlocks
Microsoft
Dynamics AX tracing tools monitor or diagnose the state of the system.
Tracing
tools are provided for development and testing, and to monitor client/server
traffic in production environments.
To enable
tracing for development:
·
Click Tools > Options,
and then click the SQL tab.
A check box on the top of the tab makes it easy to enable or disable a complete
set of trace settings. After this box is selected, all other options on the
form are made available.
Four
different kinds of traces can be set up: Multiple SQL statements, Long queries, Warnings,
and Deadlocks.
The Long queries trace is not enabled until a positive
value is entered in the Threshold field.
The unit of measure is milliseconds.
Traces
can be directed to four output media:
·
Message window: Used
for quick and instant display. This is typically used for simple tracing during
development.
·
Infolog:
Enables information to be accumulated and provides an interface to the SQL
Diagnostics tools.
·
Table (database): Used
to store large amounts of trace information. If you select this option, trace
data is written to the SysTraceTableSQL table,
and can be viewed in the SQL statement trace log form.
·
Write to file: Used
to store large amounts of trace information.
The tracing system in Microsoft Dynamics
AX is based on the kernel supplying information to application elements, which
in turn handle dispatching and storing the information. Business partners can
extend or change the behavior of the trace-engine. To investigate how to extend
the default trace mechanism, check the method SysTrace on the Application class, which is called
once for each trace event.