Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Monitoring and troubleshooting Microsoft Dynamics CRM

This section describes tools and recommendations for monitoring and troubleshooting Microsoft Dynamics CRM.

In This Section

Tracing overview

In Microsoft Dynamics CRM 2011, you can create trace files that monitor the actions that are performed by the server and client applications. Trace files are helpful when you have to troubleshoot error messages or other issues in Microsoft Dynamics CRM.

There are two methods to enable Microsoft Dynamics CRM Server tracing: deployment-level tracing or server-level tracing. Choosing either method determines the range of server roles monitored, the degree of control and how to enable tracing and the location of the trace files.

Additionally, Microsoft Dynamics CRM Reporting Extensions and Microsoft Dynamics CRM for Outlook can be enabled for tracing.

In This Topic

Microsoft Dynamics CRM deployment-level tracing

Microsoft Dynamics CRM server-level tracing

Enable tracing for Microsoft Dynamics CRM Reporting Extensions for SQL Server Reporting Services

Enable tracing for Microsoft Dynamics CRM for Outlook

Enable tracing for Microsoft Dynamics CRM E-mail Router

Microsoft Dynamics CRM deployment-level tracing

Deployment-level tracing monitors all Microsoft Dynamics CRM server roles and services, regardless of the server roles installed on the local computer. When deployment-level tracing is enabled, all server roles are monitored such as Asynchronous Service, Sandbox Processing Service, Unzip Service, Web application (w3wp), and Deployment Tools (mmc-Tools). Corresponding trace files are created.

Deployment-level tracing is set by using Windows PowerShell commands and is maintained in the MSCRM_CONFIG database. Deployment-level tracing can only be enabled from a computer that has the Microsoft Dynamics CRM Deployment Tools server role.

The trace files are located in a folder on the computer where the Microsoft Dynamics CRM Deployment Tools server role is running. By default, the location is C:\crmdrop\logs.

CautionCaution
Trace files may contain sensitive or personal information. Use discretion when you send trace files to other people, or when you give other people the ability to view the information in a trace file.

When you turn on tracing it can significantly affect performance of the application. We strongly recommend that you only turn on tracing for troubleshooting issues and turn off tracing after the issue is resolved.

ImportantImportant
Before you run Microsoft Dynamics CRM Windows PowerShell commands the Microsoft.Crm.PowerShell snap-in must be registered by running the Add-PSSnapin Microsoft.Crm.PowerShell command.

For more information, see Operating Microsoft Dynamics CRM.

TipTip
To get a list of the registered Windows PowerShell snap-ins run the Get-PsSnapin –registered command.

View the current deployment-wide trace settings

Get-CrmSetting TraceSettings 

Enable deployment-wide tracing

To turn on deployment-wide trace settings that records the maximum amount of information that includes detailed logging with callstack information, run the following commands, in the order provided, from the Windows PowerShell console on the computer where the Deployment Tools server role is running. To enable less detailed logging or change the location of the log files, see Optional parameters.

$Setting = Get-CrmSetting TraceSettings
$Setting.Enabled = $True 
$Setting.CallStack=$True
$Setting.Categories="*:Verbose"
Set-CrmSetting $setting

Optional parameters

  • CallStack. Records callstack information. For detailed troubleshooting, we recommend that you turn this on. By default, this is turned off.

  • Categories. Indicates the level of detail to record.

    • Error. By default, the Catagories value is Error, which is the least detailed and only records errors.

    • Warning. Includes warnings and errors.

    • Info. Includes warnings, errors, and additional information.

    • Verbose. Records the most detailed information.

  • Directory. Specifies the location of the trace log file. By default, the location is c:\crmdrop\logs.

  • FileSize. Specifies the maximum file size of the log file in megabytes before information in the trace file is overwritten.

Disable deployment-level tracing

To disable tracing, run the following commands, in the order provided, from the Windows PowerShell console on the computer where the Deployment Tools server role is running.

$Setting = Get-CrmSetting TraceSettings
$setting.Enabled = $False
Set-CrmSetting $setting

Trace files are not deleted when tracing is disabled. Additionally, services used by Microsoft Dynamics CRM Server lock open the trace files. Therefore, you may have to restart any Microsoft Dynamics CRM services and the World Wide Web Publishing Service if these services are running on the computer where you want to delete the trace files.

Microsoft Dynamics CRM server-level tracing

Server-level tracing only monitors those Microsoft Dynamics CRM server roles that are running on the local computer where server-level tracing is enabled. When server-level tracing is enabled, trace files that are specific to the Microsoft Dynamics CRM server roles or services that are running on the local computer are created. Server-level tracing does not require the Deployment Tools role and can provide a greater degree of control where you can set specific trace values such as what Microsoft Dynamics CRM features to trace or the maximum trace file size.

For more information about setting server-level tracing properties in Microsoft Dynamics CRM 2011, see How to enable tracing in Microsoft Dynamics CRM.

If both deployment-level and server-level tracing are enabled on the same computer, only server-level tracing will be used.

Server-level tracing must be manually set in the Windows registry on the computer where one or more Microsoft Dynamics CRM server roles are running.

The server-level tracing files are located in the Traces folder of the Microsoft Dynamics CRM installation folder. By default, the location is C:\Program Files\Microsoft Dynamics CRM\Trace.

Enable or Disable server-level tracing

CautionCaution
Trace files may contain sensitive or personal information. Use discretion when you send trace files to other people, or when you give other people the ability to view the information that a trace file contains.

When you turn on tracing it can significantly affect performance of the application. We strongly recommend that you only turn on tracing for troubleshooting issues and turn off tracing after the issue is resolved.

CautionCaution
This task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see: How to back up and restore the registry in Windows.

On the Microsoft Dynamics CRM Server that you want to turn on server-level tracing, start RegEdit and locate the following registry location.

HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM

Create the following two required new values.

  1. Value name: TraceEnabled

    • Type: DWORD (32-bit)

    • Value: 0 or 1

      If you use a value of 0, tracing is disabled. If you use a value of 1, tracing is enabled.

  2. Value name: TraceRefresh

    • DWORD (32-bit)

    • Value: A number between zero and 99

      This value must change in order for Microsoft Dynamics CRM to detect a change to any of the other trace values in the Windows registry. For example, if the value is 2, you can set it to 1 so that other trace values changes, such as a change to TraceCategories, will be applied.

Enable tracing for Microsoft Dynamics CRM Reporting Extensions for SQL Server Reporting Services

In Microsoft Dynamics CRM 2011, you can create trace files that monitor the actions that are performed by Microsoft Dynamics CRM Reporting Extensions. Trace files are helpful when you have to troubleshoot error messages or other issues in Microsoft Dynamics CRM Reporting Extensions.

CautionCaution
Trace files may contain sensitive or personal information. Use discretion when you send trace files to other people, or when you give others the ability to view the information that a trace file contains.

When you turn on tracing it can significantly affect performance of the application. We strongly recommend that you only turn on tracing for troubleshooting issues and turn off tracing after the issue is resolved.

You can enable tracing for Microsoft Dynamics CRM Reporting Extensions in two ways:

Using registry values:

CautionCaution
This task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see: How to back up and restore the registry in Windows.

  1. On the computer where you have installed Microsoft Dynamics CRM Reporting Extensions, locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM

  2. Set the following registry values:

    • TraceEnabled = 1

    • TraceDirectory = <directory path where traces will be stored>

    You can also set other row values like TraceCategories, but they already have defaults.

  3. Restart Microsoft SQL Server Reporting Services.

Using deployment properties:

  1. Go to the DeploymentProperties table in the Configuration Database.

  2. Locate the row with the value "TraceEnabled" and set its "BitColumn" column’s value to "True".

    Other row values like TraceCategories, TraceDirectory already have default values, but you can change these values.

    You will start seeing the traces in the directory specified in the TraceDirectory row in the DeploymentProperties table.

  3. Restart Microsoft SQL Server Reporting Services.

Registry settings take precedence over deployment properties. If there are any invalid entries in the registry, for example, and TraceDirectory does not exist, the deployment properties are used.

ImportantImportant
Traces will not be generated if the folder specified in TraceDirectory does not exist.

Enable tracing for Microsoft Dynamics CRM for Outlook

This section applies to Microsoft Dynamics CRM Online and on-premises versions of Microsoft Dynamics CRM 2011. Microsoft Dynamics CRM for Outlook tracing monitors the instance of Microsoft Dynamics CRM for Outlook that is running on the local computer. If an issue is isolated to a particular user running Microsoft Dynamics CRM for Outlook, enabling Microsoft Dynamics CRM for Outlook tracing can help determine the cause.

The Microsoft Dynamics CRM for Outlook tracing files are located in the C:\Users\<username>\AppData\Local\Microsoft\MSCRM\Traces folder.

CautionCaution
Trace files may contain sensitive or personal information. Use discretion when you send trace files to other people, or when you give other people the ability to view the information that a trace file contains.

When you turn on tracing it can significantly affect performance of the application. We strongly recommend that you only turn on tracing for troubleshooting issues and turn off tracing after the issue is resolved.

Enable or disable tracing for Microsoft Dynamics CRM for Outlook

  1. On the computer running Microsoft Dynamics CRM for Outlook, click Start, click All Programs, click Microsoft Dynamics CRM 2011, and then click Diagnostics.

  2. Click the Advanced Troubleshooting tab, and then select Tracing to enable or click to clear Tracing to disable.

  3. Click Save.

The above steps turn on verbose tracing. You can reduce the amount of information during the trace by setting the TraceCategories Windows registry value. For example, you can set the value so that only error messages are recorded. Reducing the amount of logging can be helpful when you troubleshoot specific issues, such as when you receive error messages going offline. To do this, follow these steps.

CautionCaution
This task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: How to back up and restore the registry in Windows.

Notice that tracing must already be enabled for the following steps to work.

  1. On the computer where you have installed Microsoft Dynamics CRM for Outlook start RegEdit and locate and then click the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient.

  2. If the TraceCategories string value does not exist add it. To do this, right-click MSCRMClient, click New, click String Value, type TraceCategories and then press ENTER.

  3. Right-click TraceCategories, click Modify, type Application.Outlook:Error, and then click OK.

For more information about the values available for TraceCategories, see How to enable tracing in Microsoft Dynamics CRM.

Trace files are not deleted when tracing is disabled.

Enable tracing for Microsoft Dynamics CRM E-mail Router

This section applies to Microsoft Dynamics CRM Online and on-premises versions of Microsoft Dynamics CRM 2011. Microsoft Dynamics CRM 2011 E-mail Router tracing monitors the E-mail Router service that is running on the local computer.

Enable or disable tracing for Microsoft Dynamics CRM E-mail Router

  1. On the computer where the Microsoft Dynamics CRM E-mail Router service (Microsoft CRM Email Router) is running, open Microsoft.Crm.Tools.EmailAgent.xml using an XML or text editor. By default, Microsoft.Crm.Tools.EmailAgent.xml is located in the <drive>:\Program Files\Microsoft CRM Email\Service folder.

  2. Add the following entries between the <SystemConfiguration> parent elements:

    <LogLevel>Level</LogLevel>
    Specifies the logging level. Acceptable values for Level are 0, 1, 2, or 3.

    • 0. No logging. By default, logging is set to 0.

    • 1. Error logging only.

    • 2. Detailed information logging at the mailbox level.

    • 3. Very detailed information logging at the message level.

    <LogFile>Path\Logfilename</LogFile>
    Specifies the full path of the location to the log file.

  3. Restart the E-mail Router service.

Sample Microsoft.Crm.Tools.EmailAgent.xml

The following Microsoft.Crm.Tools.EmailAgent.xml file sets the logging at level 1 and places the log file at c:\emailRouterLog.txt.

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <SystemConfiguration>
    <MaxThreads>50</MaxThreads>
    <MaxThreadExecution>600000</MaxThreadExecution>
    <SchedulingPeriod>1000</SchedulingPeriod>
    <ConfigRefreshPeriod>5000</ConfigRefreshPeriod>
    <ConfigUpdatePeriod>3600000</ConfigUpdatePeriod>
    <LogLevel>3</LogLevel>
    <LogFile>c:\emailRouterLog.txt</LogFile>
    <ProviderOverrides>
      <CacheCapacity>1024</CacheCapacity>
      <PendingStatusDelay>300000</PendingStatusDelay>
      <SendingStatusDelay>1800000</SendingStatusDelay>
      <MaximumDeliveryAttempts>10</MaximumDeliveryAttempts>
      <EWSRetrieveMessageCount>10</EWSRetrieveMessageCount>
      <BatchSize>5</BatchSize>
      <RequestBatchSize>5</RequestBatchSize>
    </ProviderOverrides>
  </SystemConfiguration>
</Configuration>

System Center Monitoring Pack for Microsoft Dynamics CRM 2011

The System Center Monitoring Pack for Microsoft Dynamics CRM 2011 enables you to administer the Microsoft Dynamics CRM 2011 application in Microsoft System Center Operations Manager 2007 SP1 and Microsoft System Center Operations Manager 2007 R2.

Download the System Center Monitoring Pack for Microsoft Dynamics CRM 2011 and System Center Monitoring Pack for Microsoft Dynamics CRM 2011 Guide.

Microsoft Dynamics CRM 2011 performance counters

Microsoft Windows includes a tool named Windows Performance Monitor. You can configure Windows Performance Monitor to obtain and display performance data as system components run on a Microsoft Dynamics CRM deployment.

Performance objects provide sets of counters that generate data about how various components perform as they run in your Microsoft Dynamics CRM environment. For example, the Processor object collects metrics that show how one or more microprocessors are performing on a particular server.

Many performance objects are built into the operating system, and more are installed with software applications and services. For example, the performance objects installed with SQL Server and Exchange Server can help you monitor the performance of components that are relevant to your system.

Monitor performance counters for a Microsoft Dynamics CRM 2011 application, such as Microsoft Dynamics CRM for Outlook, Email Router or Microsoft Dynamics CRM Server

  1. On the computer where the Microsoft Dynamics CRM application is installed, click Start, click Run, in the Run dialog box type perfmon into the Open field and then press ENTER.

  2. In the navigation pane of the Reliability and Performance Monitor window, select Performance Monitor.

  3. Click the Add (plus sign) toolbar icon in the right pane to open the Add Counters dialog box.

    Alternatively, you can create a new Data Collector Set to organize the CRM counters that you want to monitor. For more information, see the Performance Monitor Help.

  4. In the list of available performance objects, expand the object class that you want to monitor. Most Microsoft Dynamics CRM performance object classes begin with “CRM.” For example, select CRM Server to see the list of available counters for that object.

  5. Highlight the names of the counters that you want to monitor, click Add, and then click OK. The selected counters are added to the list of active counters in the Reliability and Performance Monitor window, and the data that they generate is shown in the dynamic graph.

For more information about Microsoft Dynamics CRM Server 2011 performance counters, download Microsoft Dynamics CRM Performance Counters.

See Also

Send comments about this article to Microsoft.

© 2013 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.