Obtaining an MKDE Trace of a Failing Application
Last Updated: 05/18/2004
Sometimes, in the course of working a problem with an application or service like Pervasive.SQL, it becomes imperative to capture the exact point at which an application fails, and see exactly what is going to and coming back from the database engine. This is especially important when a database application does not report the Btrieve status codes properly (or at all). The process of obtaining an MKDE trace is an important step that end-users can take to help a support technician (either from Pervasive, Goldstar, or the application vendor) quickly determine the problem and devise a resolution to it.
The process is fairly simple. First, we make sure that nobody is using the database engine, which helps to minimize the amount of data collected. Then, we enable the tracing feature. After running the program to the point of the error, we then disable the trace and view the resulting file.
Let's go through it step by step here.
1. Make sure that all users are out of the database.
On a single-computer system running the Pervasive.SQL Workstation or Workgroup engines, this is easy -- simply exit all applications.
On a client/server engine, you should ask all users to exit their database applications and to stay out of them for the duration of these tests. You can also verify that all users are out by running the Pervasive Monitor application on the server and checking the Microkernel/Active Users screen to see if anyone shows up there.
2. Find the MKDE Tracing Settings on the Database Engine.
This can be done several ways, depending on if you are on the server or a workstation, and if you are running the Client/Server or Workgroup engines.
On the server: Start the Pervasive Control Center. Click the plus sign next to the Pervasive.SQL Engines line. Click the plus sign next to the ServerName line. Click the plus sign next to the Configuration line. Click the plus sign next to the Server line. Click on the Debugging section to open it up.
On a workstation: Start the Pervasive Control Center. Click the plus sign next to the Pervasive.SQL Engines line. If you do not see the database server listed here, right-click on Pervasive.SQL Engines and select the line Register New Engine. Enter the server's compuer name and press Enter to save it. Click the plus sign next to the ServerName line. Click the plus sign next to the Configuration line. You will be prompted to provide a username and password -- these should be your network administrator credentials. Click the plus sign next to the Server line. Click on the Debugging section to open it up.
3. Verify the existing database tracing settings.
Change the settings if needed to the following values. Make changes by double-clicking on the item, making a chance, and then pressing OK.
- Number of Bytes from Data Buffer: 128
- Number of Bytes from Key Buffer: 128
- Select Operations: All
- Trace File Location: C:\MKDE.TRA
- Trace Operation: Off
If you need to change any values, the icon in front will turn Red. This is normal. When finished making any needed changes, click on the red exclamation point button on the tool bar to apply the settings to the database. Minimize the PCC, but do NOT close it at this time.
4. Run the program to just BEFORE the error occurs.
If the error occurs when starting the application, then you need do nothing at this time. However, if the error occurs somewhere inside the application, get the system started and navigate as far as you can before the error occurs.
5. Enable MKDE Tracing.
Switch back to the Pervasive Control Center. Change the Trace Operation setting to "On" and click the exclamation point to apply the setting. This starts logging ALL database calls to the trace file. Minimize the PCC but do NOT close it.
6. Run the program to get the error.
Run your application to duplicate the error condition. When you get it, STOP running it. Do not acknowledge any error dialogs at this time if you can avoid it.
7. Disable MKDE Tracing.
Switch back to the Pervasive Control Center. Change the Trace Operation setting to "Off" and click the exclamation point to apply the setting. This stops the logging. You can now safely close the PCC if you wish.
WARNING: Please note that if you forget this step and you leave logging turned ON in a production environment, the database will be very slow, and the MKDE log will fiill up ALL of your disk space and will liekly crash the server. You MUST remember to leave this OFF when you are done!
8. Submit your trace file.
You can now ZIP up the MKDE.TRA file (which should be located in the C:\ directory) and submit it to your support technician for follow-up.
If you still can't get it to work, contact Goldstar Software and let us work with
you to help! |