Dynamics AX in the Field

Microsoft Dynamics AX from the Premier Field Engineering team at Microsoft.

Dynamics AX Tracing (Part 1)

Dynamics AX Tracing (Part 1)

Rate This
  • Comments 15

Dynamics AX has a tracing feature that allows you to generate ETW traces of the client and server activity on your system. The information collected in these traces includes a call tree, SQL statements, and durations for all of the different code that executes. This kind of trace data can be extremely useful when troubleshooting performance issues, but there are a few things you need to know in order to be successful in capturing useful trace data and analyzing it. This is the beginning of a series of posts that cover tracing topics. In this post I'll talk about some of the prerequisite settings necessary to implement on your system. In future posts I'll discuss topics such as tracing best practices, troubleshooting trace collection issues, installing and troubleshooting the Trace Parser tool, and trace analysis basics. There's also a video you might want to check out that goes well with the content below.

Video: How to collect a trace within Dynamics AX

http://blogs.msdn.com/b/axinthefield/archive/2011/04/14/video-blog-how-to-collect-a-trace-within-dynamics-ax.aspx

Now to the details...

Generally when I'm tracing something in AX, I try to localize all of my activity on a single isolated AOS. To isolate my activity I prevent other users from connecting to the AOS instance and I run the client directly from the AOS server. I've found that this is the most convenient and reliable way to setup tracing.  The prerequisite settings for a successful trace are covered below.

Tracing Prerequisites for the AOS Instance

From the Dynamics AX Server Configuration Utility > Tracing tab, set the following options:

  • Mark the "RPC round trips to server" checkbox
  • Mark the "X++ method calls" checkbox
  • Mark the "Function calls" checkbox
  • Set the "Number of nested calls" to 99
  • Mark the "SQL statements" checkbox
  • Mark the "Bind variables" checkbox
  • Mark the "Row fetch summary (count and time)" checkbox
  • Mark the "Allow client tracing on Application Object Server instance" checkbox

 

You'll also need to verify that the following AOS registry settings exist and have the recommended values. If something doesn't exist, you will have to create it.

AOS Server Registry Path:

HKLM\SYSTEM\CurrentControlSet\Services\Dynamics Server\5.0\01\<configname>

 Recommended Values:

Name

Type

Data

tracebuffersize

REG_SZ (String Value)

1024 if server has 2GB RAM or more. 512 if server has less than 2GB RAM.

tracemaxbuffers

REG_SZ (String Value)

60

tracemaxfilesize

REG_SZ (String Value)

Between 1024 (1GB) and 10240 (10GB) depending on space available.

traceminbuffers

REG_SZ (String Value)

60

 

 Tracing Prerequisites for the AX Client

From the Dynamics AX Configuration Utility > Tracing tab, set the following options:

  • Mark the "RPC round trips to server" checkbox
  • Mark the "X++ method calls" checkbox
  • Mark the "Function calls" checkbox
  • Set the "Number of nested calls" to 99
  • Mark the "SQL statements" checkbox
  • Mark the "Bind variables" checkbox
  • Mark the "Row fetch summary (count and time)" checkbox

 

 

You'll also need to verify that the following AX client registry settings exist and have the recommended values. If something doesn't exist, you will have to create it.

AX Client Registry Path:

HKCU\Software\Microsoft\Dynamics\5.0\Configuration\<configname>

 Recommended Values:

Name

Type

Data

tracebuffersize

REG_SZ (String Value)

1024 if server has 2GB RAM or more. 512 if server has less than 2GB RAM.

tracemaxbuffers

REG_SZ (String Value)

60

tracemaxfilesize

REG_SZ (String Value)

Between 1024 (1GB) and 10240 (10GB) depending on space available.

traceminbuffers

REG_SZ (String Value)

60

 

 Security Considerations for Tracing:

  • The account running the AOS instance must belong to the 'Performance Log Users' local group or the Administrators local group on the AOS if it is running on Windows Server 2003 or Windows Server 2008. The WMI event tracing subsystem requires that tracing be started only from a user belonging to one of these groups.
  • The client trace is initiated by the currently logged on user, so verify that user has access to the log path defined in the client configuration utility.
  • The server trace is initiated by the account running the AOS instance, so verify that user has access to the log path defined in the server configuration utility.  

 

Part 2 of this series can be found here

 

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • In part 1 of the series I discussed the basic prerequisites for capturing an AX trace. In part 2 , I

  • Superb post Tom Stumpf, i was looking for this from very long...

  • Buenos días,

    Los dos problemas más frecuentes que nos reportan con Trace Parser son

  • Buenos días,

    Los dos problemas más frecuentes que nos reportan con Trace Parser son

  • Buenos días,

    Los dos problemas más frecuentes que nos reportan con Trace Parser son

  • Buenos días,

    Los dos problemas más frecuentes que nos reportan con Trace Parser son

  • Great

    How do I change the filesize in an AX 2012 environment - I can't see any registry paths that matches.

  • @Erik: How are you collecting a trace in AX2012? If you are using the client cockpit, then it is specified there. If you are using perfmon, then it is one of the options by right clicking on the name of the data collector set.

Page 1 of 1 (15 items)