Export (0) Print
Expand All

Tracing and Troubleshooting

SQL Server 2008 R2

There are a variety of tools and techniques that you can use for troubleshooting applications that use the Microsoft OLE DB Provider for DB2 (Data Provider). This topic contains the following sections.

The Data Provider returns two types of errors in the form of SQLSTATE and SQLCODE formatted error strings, which administrators and developers can use to troubleshoot issues.

DB2 server error strings

The Data Provider returns DB2 server error strings in the form of standard SQLSTATE with SQLCODE as part of the OLE DB IErrorInfo interface that the SQL Server consumer returns to the end user. The administrator and developer can research the description of the DB2 server error, based on the SQLSTATE and SQLCODE, in the IBM DB2 Messages and Codes reference for the applicable DB2 platform and version.

DB2 provider and DRDA protocol error strings

The Data Provider returns provider-specific and DRDA protocol error strings in the form of standard SQLSTATE HY000 and 08S01with SQLCODE as part of the OLE DB IErrorInfo interface that the SQL Server consumer returns to the end user. Administrators and developers can research the description of the DRDA protocol error, based on the SQLCODE error string, in the Distributed Relational Database Architecture (DRDA) protocol documentation. This is published as an industry standard through Open Group (http://www.opengroup.org/). You can download DRDA V4 Vol. 3: Distributed Data Management Architecture, publication number C068, published 26 April 2007, from http://www.opengroup.org/bookstore/catalog/c068.htm.

There are multiple options for tracing.

SQL consumer tracing using SQL Server Profiler

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=180433).

DB2 provider tracing using Provider Trace Utility

The Provider Trace Utility captures and saves information from the Microsoft client for DB2 network connections, OLE DB interfaces and data messages. For more information, see the Host Integration Server 2009 Trace Utility Help (http://go.microsoft.com/fwlink/?LinkID=180447) and SNA Trace Utility (http://go.microsoft.com/fwlink/?LinkID=180449).

Network tracing using Network Monitor

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).

DB2 server tracing using IBM tools

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

Windows Server events using Event Viewer

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).

Show:
© 2014 Microsoft