When trying to troubleshoot issues a common
request from Microsoft support and from their Partners is to run a
DexSQL log. A DexSQL log is a file that logs commands made from
Dynamics GP to the database to help understand performance issues. After
creation, this file is sent to the company's partner or to Microsoft
for assistance in troubleshooting.
When creating a DexSQL log the key is to capture only
the amount of data related to the problem. In this recipe, we will look
at creating a DexSQL log to provide more information to Microsoft
support.
For our example, we will assume that the problem
relates to creating a financial batch; so that is the process that will
get captured in the DexSQL log.
How to do it...
To create a DexSQL log:
1. Ensure that Microsoft Dynamics GP is closed.
2. Open the Notepad utility in Windows.
3. Select File | Open in Notepad and navigate to the location where the Dex.ini file for Dynamics GP is installed. By default, this is c:\Program Files\Microsoft Dynamics\GP\Data\Dex.ini.
4. Once the Dex.ini file is open in Notepad, find these two lines in the file:
SQLLogSQLStmt=FALSE
SQLLogODBCMessages=FALSE
5. Change both lines to a value of TRUE and save the file. This turns on logging in Dynamics GP:
The first line, SQLLogSQLStmt=TRUE, logs all SQL statements that are sent to the server by the application.
The second line, SQLLogODBCMessages=TRUE, logs all ODBC messages returned to the application by ODBC:
Either line or both lines can be set to TRUE. Typically, Microsoft support asks that both lines be set to TRUE.
6. Start Microsoft Dynamics GP and log in. This creates a file named DexSQL.log in the same location as the Dex.ini file.
7. Select Financial from the Navigation Pane on the left. Select Batches under Transactions.
8.
The DexSQL log now holds all of the information related to logging in
and everything done so far in this GP session. The log now needs to be
cleared prior to recording the actual problem scenario.
9. To clear the DexSQL log, find the DexSQL.log file in the same directory as the Dex.ini file. Using File Manager, select and delete the file. Once activity starts in Dynamics GP, a new file is created.
10 Return to Dynamics GP. In the open Batch Entry window type TEST BATCH in the Batch ID field. Set the Origin field to General Entry and save the batch. Now the DexSQL.log file needs to be renamed to avoid adding unrelated data:
11. Return to the DexSQL.log file in File Manager. Right-click on the DexSQL.log file and rename it to DexSQL-Batch.log.
12.
Once the DexSQL log has been renamed it's important to close Dynamics
GP and turn off logging. If this doesn't happen, Dynamics GP can
significantly slow down and the DexSQL log can grow to consume all of a
computer's hard drive space.
13. To turn off logging, close Dynamics GP, and reopen the Dex.ini file.
14. Find these lines in the Dex.ini file and change TRUE to FALSE:
SQLLogSQLStmt=TRUE
SQLLogODBCMessages=TRUE
15. Save the Dex.ini file and delete the leftover DexSQL.log file that was created when closing Dynamics GP.
16. What is left is the DexSQL-Batch.log
file that holds specifics from right before and after the problem area.
This file can be opened using Notepad to see what information is being
sent to Microsoft or the company's Dynamics GP partner.
How it works...
Creating a DexSQL log is an important
maintenance process for companies to understand. Microsoft and Microsoft
Partners often ask for this information when troubleshooting errors.
Being able to generate a DexSQL log to facilitate problem resolution is
important for maintaining a healthy Dynamics GP system.