How to track JDBC calls in Oracle, Sybase, and SQLServer

Source: Internet
Author: User
In this article, we will learn how to use DataDirectSpyforJDBC for Oracle, Sybase, and SQLServer to track JDBC calls in IBM data replication product InfoSphereChangeDataCapture (CDC.

In this article, we will learn how to use DataDirect Spy for JDBC for Oracle, Sybase, and SQL Server to track JDBC calls in InfoSphere Change Data Capture (CDC), an IBM Data replication product.

DataDirect Spy supports JDBC driver tracing, which is very useful for solving customer problems. The IBM InfoSphere Change Data Capture engine uses the DataDirect JDBC driver to implement JDBC access only for Oracle, SQL Server, and Sybase.

DataDirect Spy is a tool that tracks calls in running programs. The tool passes the call from the application to the basic DataDirect JDBC driver and records detailed information about these calls. The results returned from the database to the application are also recorded. If the problem is suspected to occur between the driver and the database (that is, the problem from the application to the driver has been ruled out), The result log can be used to solve the fault.

Prerequisites

To understand the content of this article, you must have the following basic knowledge:

  • Windows®
  • UNIX®
  • Use the IBM InfoSphere CDC Management Console
  • Use IBM InfoSphere CDC for Oracle, Sybase, and SQL Server

About DataDirect Spy

JDBC APIs support viewing warnings and exceptions generated by databases and JDBC drivers. An SQLException object contains an error description, X/Open SQLState, and the error code number of the driver supplier. To view exceptions, you can use a catch Block to print them out. Warning is a subclass of SQLException used to handle database access warnings. Warnings cannot prevent application execution. They only warn users that some tasks are not performed as planned. For example, the privileges are not withdrawn as required. Warning will be reported in Connection object, Statement object (including PreparedStatement and CallableStatement object), and ResultSet object. You can use the getWarnings method to retrieve warnings from these objects.

DataDirect Technologies makes debugging and troubleshooting of JDBC applications easier by providing a JDBC Developer Kit (SDK). JDBC Developer's Kit (SDK) dataDirect Spy for JDBC trace and call are provided in the running application. The utility transmits the call made by the application to the basic DataDirect JDBC driver and records detailed call Information. The results returned from the database to the application are also recorded. DataDirect Spy is used together with a running application to track JDBC calls from the application.

DataDirect Spy provides the following advantages:

  • Log records are JDBC 4.0 compatible.
  • The log records are consistent and independent from the DataDirect Connect for JDBC driver.
  • Records all parameters and function results of JDBC calls.
  • Log records are used with all DataDirect Connect for JDBC drivers.
  • You can enable logging without changing the application.

DataDirect Spy attributes

DataDirect Spy supports the following attributes.

Table 1. attributes and descriptions of DataDirect Spy

Attribute Description
Log = System. out Redirect logs to Java™Output standard: System. out.
Log = (file) filename Redirects logs to the file specified by the file name.
Linelimit = numberofchars Set the maximum number of characters that DataDirect Spy can record in any row. The default value is 0 (no maximum value ).
LogIS = {yes | no | nosingleread} Specifies whether the DataDirect Spy records the activities on InputStream and Reader objects. When it is logIS = nosingleread, logs on InputStream and Reader objects are active. However, one byte reads InputStream. read or single-character Reader. the read log is blocked to prevent the generation of a large number of log files that contain single-byte or single-character reading messages. The default value is no.
LogTName = {yes | no} Specifies whether the DataDirect Spy records the name of the current thread. The default value is no.
Timestamp = {yes | no} Specifies whether each row of DataDirect Spy logs contains a timestamp. The default value is no.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.