Using CRLogger.dll to troubleshoot database issues

Sunday 21 August 2011 @ 12:26 pm

There is a technical article in the SAP library that caught my attention recently.    It mentions something called CR Logger and suggested that it could help you troubleshoot database error messages.  But when I went to read the article I was disappointed to find that there was no information on how to use it, when to use it, or what it would do for you.  So I decided to try it and see if I could see some value in it.

You unzip a DLL and put it into a specific folder in your CR 2008 program directory:

64 Bit:
C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86

32 Bit:
C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86

Then you have to set three system environment variables.  This article explains how to do that in Windows 7.  Then you close and reopen Crystal Reports.  From now on every time Crystal hits the database (refresh, verify database, show SQL query, etc)   a whole bunch of actions are logged in a pair of log files.   A new pair of files is created whenever you close and open Crystal.

The real question is how do you use the contents of the log file.    It does show the SQL Query and if it was successfully run in the database, but this is buried in hundreds or even thousands of lines of repetitive data. It seem to detail every library file used in the connection process and the result.  It might be that this is intended to help SAP understand what is going on within your system during a support call.  Otherwise, the value of the logs didn’t immediately jump out at me.   I would be interested in hearing from someone who actually got some value out of this process.

One more note.  The size of the log entry is related to the amount of data returned, so it makes sense to do your testing with a small result when possible.  And it is even more important to turn the logging off when you are done or the log files can get very large very quickly.  You disable logging by renaming the CRLogger.dll, like changing the extension to .ORG.

Leave a Reply

Recrystallize Pro