You can set a trace to record activity while Ritmo is running. The trace file contains all the sequences of buffers exchanged between the PC client and the IBM DB2 platform. Every time a DB2 call is made, details about the call are appended to the same file. The trace starts in one of the following cases:
- If trace mode was set prior to connection time, the trace starts with the first call that invokes DB2.
- When trace mode is activated from the toolbox, the trace starts the first time a data source object is instantiated or released.
- The trace can also be set to run-time, because Ritmo checks for this setting every time a connection object is instantiated.
Every time the Ritmo provider is loaded in memory and Enable Trace is checked, the trace file is truncated and the trace starts from the beginning of the file.
Setting Up a Trace in the Toolbox
This is the recommended way to use a trace with Ritmo. If you start a trace from the toolbox, the trace is stopped when you exit the toolbox. This prevents you from accidentally running the trace with Ritmo at all times, thereby impacting performance and building up a huge trace file.
- Double-click the Trace icon in the tool tree to display the Trace Settings dialog.
- Select Enable Trace.
- Specify a trace file name and path, using the Browse button, or leave the default value.This name can only be changed when there are no consumers using the DB2 platform.
- Click Apply to save your selections and OK to confirm; close the Trace Settings dialog.
The right pane updates to show that the Detailed Trace has been activated, by displaying a green triangle icon instead of a red square icon.
Trace Options in the Toolbox
- Only one file: The trace is created in one single file. This is appropriate for quick testing. In case of large operations it is better to split the trace into different files using the other options.
- One file every X days: The trace is split among multiple files: every day a new trace is created. The names of the files end with a numeric suffix that increases, starting from 0000.
- One file with size limited to X MB: The trace is split among multiple files: a new trace is created with a limit in size. The names of the files end with a numeric suffix that increases, starting from 0000.
- Keep max X trace files: Enabled if option 2 or 3 is chosen. Forces deletion of old files to avoid using too much space for traces.
The “Open Trace location” button allows you to open the folder where the trace file(s) are located.
Starting and Stopping a Trace in the Toolbox
You can start and stop a trace using the right mouse button menu in the Toolbox's right pane.
- Select the trace in the left window pane.
The trace is displayed in the right window pane.
- Select the trace in the right pane.
- From the right mouse button menu, choose Start to enable the trace or stop to disable the trace.
The trace icon updates to show when enabled and when disabled.
The trace ends in one of the following cases:
- When trace mode is disabled from the toolbox, the trace ends the first time a data source object is instantiated or released.
- When the application utilizing the provider is no longer active and Ritmo is no longer in memory.
- When the toolbox is closed.
Setting Up a Trace from the Ritmo Config File
The file Ritmo_i.xml (or RitmoDB2.xml) contains configuration settings for Ritmo and can be found in C:\ProgramData\HiT Software\Ritmo xxxx.
You can set a trace file name and enable the trace from this file. However, HiT Software recommends that you run a trace from the toolbox to avoid the possibility of impacting performance of the provider and creating large trace files.
- In the Windows Explorer, go to the folder where you installed Ritmo
- Open the file Ritmo_i.xml or RitmoDB2.xml in a text editor.
- Modify the trace entries below as needed (refer to the “Trace Option in Toolbox section” for details.)
- Save the file and exit the text editor.
- The trace will run whenever Ritmo is in use.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<section name="trace" />
<traceFile>C:\ProgramData\HiT Software\Ritmo i Server 6.0.0\logs\SqlRitmo.trc</traceFile>
<traceFlag>: False = trace not enabled; True = trace enabled
<traceFile>: Name of the file
<traceFileMode>: 0 = single file (default); 1 = One file every x days; 2= One file every X Mb;
<traceFileLimitedToSize>: Max size of every file (mode 2)
<traceKeepNumberOfFiles> max number of files to keep, older are deleted (for modes 1 and 2