Technical Tip of the Day– Manipulating Server-Side Traces

We’ve all experienced those generic client-side errors in CRM, which often don’t tell us the specific nature of the problem, e.g. “CRM has experienced an error, please contact your system administrator.”  At times, error logs are available on the client at the time of the exception, or information can be gleaned from client-side traces or the application event log to help troubleshoot the issue.  But when the error is not readily reproducible, and there are no useful clues found on the client, server-side tracing may be the best way to get to the root of the problem. 

The only catch is that turning on server-side tracing with default settings produces verbose trace logs, which can be very costly in terms of server performance and disk space due to very large log files.  By manipulating the trace settings on the server, you can configure the server trace to only catch errors and exceptions, which significantly decreases the performance and disk costs, allowing you to let the trace run for extended periods of time in hopes of capturing information at the time those fleeting client-side errors occur.

 

To manually configure error-only tracing and turn it on, perform these steps on the CRM server:

  1. Open the Registry Editor (regedit.com).
  2. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM.
  3. Add a new String Value here named TraceCategories and assign it the value data *:Error.
  4. To turn the tracing on, you need to make two changes:
    1. Change TraceEnabled to the hexadecimal value data 1.
    2. Increment the TraceRefresh hexadecimal value data by 1.  Simply changing this value tells CRM to immediately start the tracing engine.
  5. By default, the trace logs are written to %ProgramFiles%\Microsoft Dynamics CRM\Trace, but this can be changed by adding or changing the TraceDirectory value to a path of your choice.
  6. To turn tracing off, you need to make two changes:
    1. Change TraceEnabled to the hexadecimal value data 0.
    2. Increment the TraceRefresh hexadecimal value data by 1.

 

For a comprehensive list of tracing parameters and alternate methods of manipulating these registry settings, see Microsoft’s support case 907490.  Additionally, you may find the excellent open-source “CRMDiagTool for CRM 2011” on the CodePlex site useful: http://crmdiagtool2011.codeplex.com.  While it does not provide access to all of the configurable parameters for tracing, it does provide an easy-to-use GUI.

 

By Ledgeview Partners – Wisconsin based Microsoft Dynamics CRM Partner serving the Midwest and Heartland regions

Show Buttons
Hide Buttons