Tracing

 

There are multiple options for tracing, which can help to capture problems in the data consumer application, OLE DB service components, Data Provider, DB2 network client, and DB2 database server.

SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services. You can capture and save data about each event to a file or table to analyze later. For more information, see Introducing SQL Server Profiler (http://go.microsoft.com/fwlink/?LinkID=241520).

The Network Monitor captures network traffic for display and analysis. It enables you to perform tasks such as analyzing previously captured data in user-defined methods, extracting data from defined protocol parsers. It includes a Distributed Data Management (DDM) parser for use with the Data Provider. Contact Microsoft Customer Support Services for a copy of the DDM parser. For more information, see Network Monitor (http://go.microsoft.com/fwlink/?LinkID=180448).

For more information, see the IBM DB2 Administration Guide for the applicable DB2 platform and version.

The Event Viewer is a Microsoft Management Console (MMC) snap-in that enables you to browse and manage event logs. For more information, see Event Viewer (http://go.microsoft.com/fwlink/?LinkID=131274).

The Provider Trace Utility captures and saves information from the Microsoft client for DB2 network connections, OLE DB interfaces and data messages. The Trace Utility allows the IT Professional to trace information related to a single trace component, which is the Data Provider’s underlying DRDA Application Requester client (DB2 Network Library).

Trace File Names

Each trace file has two names associated with it, < Filename 1>.atf and <Filename 2>.atf.

Traces are written to the first file until it reaches the specified size, then to the second until it reaches that size, and so on alternating between the two files.

By default, the trace files are stored in the \Program Files\Microsoft OLE DB Provider for DB2\Traces folder, with an .atf file name extension.

The following table lists the file names by component and type:

ComponentType of tracingFile names usedFile names used
DB2 Network LibraryInternaldb2int1.atfdb2int2.atf
Messagedb2msg1.atfdb2msg2.atf
APIdb2api1.atfdb2api2.atf

Choosing a Trace Type

After selecting the component to be traced, decide the type of tracing to apply.

The following table describes the types of tracing available:

Type of tracingActivity tracedApplies to installed components
Internal*Activity within a software component.DB2 Network Library (DRDA AR client)
MessageMessages passed into and out of a software component, including messages sent to and received from the network.DB2 Network Library (DRDA AR client)
APIInformation passed into and out of a component DLL on the same computer.DB2 Network Library (DRDA AR client)

* Internal tracing is intended for use by product support technicians. Interpreting internal traces and certain types of message traces requires a specialized knowledge base.

Trace Types

Before setting up tracing, decide the software components you want to trace, and which types of tracing information will be useful.

Each type of tracing is enabled using the Data Provider Trace Utility application.

Internal Trace types:

  • Fatal Conditions

  • Error Conditions

  • Debug Conditions

  • Function Entry/Exit

  • State Transition

  • Custom Conditions

Message Trace types:

  • Internal Messages

  • Connection Info

  • Network Data Streams

API Trace types:

  • OLEDB API

  • Network API (DRDA)

Message Traces

The following table details Message traces.

Trace optionActivity traced for Host Integration Server Applications on Host Integration Server client computers
Internal MessagesMessages within the DB2 Network Library and its subcomponents
Connection InfoConnection settings used by the DB2 Network Library (DRDA AR client) to connect with the DB2 Server (DRDA AS)
Network Data StreamsMessages between DB2 Network Library (DRDA AR client) and DB2 Server (DRDA AS)

Using the HIS Trace Utility

To start tracing:

On the Start menu, point to Microsoft OLE DB Provider for DB2 Version 5.0, and then point to Trace Utility.

  1. In the Trace Items dialog of the HIS Trace Utility, click Properties.

  2. In the Internal Trace dialog, click Set All, and then click Message Trace.

  3. In the Message Trace dialog, click Set All, and then click API Trace.

  4. In the API Trace dialog, click Set All, and then click OK.

When one or more trace items is enabled, the Clear All Traces button is enabled and tracing is started.

To stop tracing:

  1. In the Trace Items dialog of the HIS Trace Utility, click Clear All Traces.

When no trace items are enabled, the Clear All Traces button is disabled and tracing is stopped.

To view trace files:

  1. In the Trace Items dialog of the Explore Traces.

To purge trace files:

  1. In the Trace Items dialog of the HIS Trace Utility, click Purge All Trace Files.

Tracing Global Properties

The Tracing Global Properties tab has several items that can be modified to adjust how Trace runs. These items include:

Trace File Flip Length

The default size is 20 Mbytes.

You can change the maximum length by highlighting the number and typing a new value.

Stop tracing by event

SNA Trace can monitor the Windows Event log and stop tracing when a configured event occurs. To enable this feature, click Monitor event log and enter an Event ID.

Write Traces on a Background Thread

Check this box to run tracing in the background. If the box is cleared (blank), tracing runs in the foreground.

To reduce performance impacts caused by tracing, traces can be queued and written by a background thread when this box is checked. Otherwise, trace files will be written immediately.

Background Thread Priority

If you select Write traces on a Background Thread, check only one item to set the level of priority for tracing to run within the Microsoft Windows operating system. Highest gives tracing the highest level of priority, which means that tracing takes precedence over other jobs. Idle means that tracing runs when the CPU is idle.

Trace File Directory Tab

The Trace File Directory tab allows you to change where the Trace Initiator files will be stored.

Use Browse or enter a new location.

Show: