Troubleshoot and analyse CRM 2011 using Log Parser

Sometimes you have issues that you want to troubleshoot and other times you may choose to investigate/analyse/review your CRM 2011 environment.  Often performing health checks is necessary and I suggest necessary if you haven’t already thought of this. One of the tools I promote for searching and crunching logs is Log Parser. This awesome tool is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory®. If that doesn’t sound awesome enough for you how about if you could write a sql type query against the server’s Application Event Log to find where lock is found in the message attribute like so.

SELECT * FROM \\server1\APPLICATION where message like ‘%lock%’

or lets look at the Application and System Event Log entries for server1

SELECT * FROM \\server1\APPLICATION, \\server1\SYSTEM where message like ‘%lock%’

but wait there, what if I have 2 front end CRM servers, server1 and server2.

SELECT * FROM \\server1\APPLICATION, \\server1\SYSTEM, \\server2\APPLICATION, \\server2\SYSTEM where message like ‘%lock%’

This is just touching the surface of what this tool can do to dig through information held in your environment, this is also all from my own desktop machine, there is no need to log on to various servers to gather this information. So command line is so yesterday I hear you say, well there is also Log Parser Studio which presents a library of ready to go queries for various sources. You need to install Log Parser first and then you’re ready to go.

You can also take a look at Log Parser Lizard by Dimce Kuzmanov, a free GUI tool for managing queries and exporting results to Excel and charts. In addition, you will find input filters for RegEx and log4net input log formats (with support for regular expressions) and SQL server T-SQL queries.

Here is a useful article from MS Support regarding some useful Log Parser queries http://support.microsoft.com/kb/910447

So what about CRM Trace Files

SELECT top 2 * FROM C:\Temp\server1-w3wp-CRMWeb-20120210-1.log where Text like ‘%Error%’

As you can see this is fairly awesome stuff and there is so much more that you can use this tool for. Hopefully this has introduced you to something new and useful for your future discovery.

Advertisements

About Rhett Clinton MVP
Dynamics CRM MVP

2 Responses to Troubleshoot and analyse CRM 2011 using Log Parser

  1. This is great, and I love that Log Parser supports CRM trace files 🙂 But I can’t get it to parse multiple files. Any luck with this?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: