Procedure documentationActivating the JDBC Trace Locate this document in the navigation structure

Prerequisites

You are logged on as the operating system user who started (or will start) the JDBC application.

Note Note

You always activate the JDBC trace for all JDBC applications that the current operating system user has started.

Configuration changes have an effect on all JDBC applications that the current operating system user has started.

End of the note.

Procedure

Variant 1
  1. Enter the following command on the command line:

    java -jar <installation_path>\runtime\jar\sapdbc.jar

    Note Note

    You can display the installation path using the dbm_getpath DBM command:

    dbmcli dbm_getpath InstallationPath

    For more information, see Database Manager CLI, dbm_getpath.

    End of the note.
  2. Select Trace enabled.

  3. Choose your trace options.

    SAP MaxDB JDBC Trace: Options

    Option

    Command Line Option

    Description

    Trace File Folder

    -

    Directory where the system writes the trace file

    When you do not configure a directory, the system writes the trace files to the temporary operating system directory (Microsoft Windows: %TEMP%, Unix and Linux: $TMP)

    Trace File Name

    TRACE FILENAME [<path>]<file_name>

    Sets the name of the trace file

    The system assigns each trace file an additional unique ID <id>: <file_name>_<id>.prt

    Default value for <file_name>: jdbctrace

    Limit File Size

    TRACE SIZE <size> [KB|MB|GB]

    Limits the size of the trace data to <size>

    -

    TRACE SIZE UNLIMITED

    Removes all size limitations for the trace file

    Stop on Error

    TRACE STOP ON ERROR <error_code>

    TRACE STOP ON ERROR OFF

    Stops writing the JDBC trace when the error <error_code> appears or the first error occurs

  4. Choose OK.

Variant 2
  1. To display the current configuration, enter

    java –jar <installation_path>\runtime\jar\sapdbc.jar SHOW

  2. Enter your trace options:

    java -jar <installation_path>\runtime\jar\sapdbc.jar <command_line_option>

  3. Enter

    java -jar <installation_path>\runtime\jar\sapdbc.jar TRACE ON

Variant 3

Specify the following option in the connection URL:

trace=<file_name>

More information: Connection URL

Result

The system writes the results of the JDBC trace to files in the trace directory.