SQLDBC Trace Options
SQLDBC trace options are common trace options for environment variables, connection tracing to a console, the Node.js trace callback, and the ODBC trace callback.
Trace options are a comma-separated list of option names with optional values:
<option>[=<value>][,<option>[=<value>] ...]
For the SQL, DEBUG, and DISTRIBUTION trace options, the following severity level values are supported:
- NONE
- FATAL
- ERROR
- WARNING
- INFO
- DEBUG
Each higher level contains the information from the previous level (FATAL traces the least amount of content for the category while DEBUG traces all of the content for the category). If the option is specified without a severity level value, the default level will be DEBUG.
If a category is specified multiple times, the last category to be specified decides what is enabled.
List of SQLDBC Trace Options
The following table lists the SQLDBC trace options:
| Option | Value | Default | Description |
|---|---|---|---|
| API | <severity-level> | NONE |
Traces driver API calls. |
| CSE | ON | OFF | OFF |
Traces client-side encryption. |
| DEBUG | <severity-level> | NONE |
Traces the internal debug code in the client. |
| DISTRIBUTION | <severity-level> | NONE |
Traces distributed connections. This option is useful for tracking "10108 Session has been reconnected" errors. |
| FLUSH | ON | OFF | OFF |
Enables frequent flushing of the trace buffer to the trace file. If FLUSH is specified without a value, FLUSH will be turned on.
|
| OutBufferSize | <size> | 64K |
Specifies the size of the buffer to use to accumulate trace messages for the callback. The minimum value is 4K, and setting it to zero will disable the feature. This option is only supported for the node trace callback. |
| PACKET | <packet-options> | OFF |
Traces network command protocol packets. <packet-options> can be ON, OFF, UNLIMITED, or an integer part data size limit optionally followed by K, M, or G. For example, “PACKET=10K”. A part data size limit of 0 enables packet summary tracing with a minimum of packet trace output. |
| SIZE | <size-options> | UNLIMITED |
Controls the maximum size of the trace file output, before archiving. <size-options> can be OFF, UNLIMITED, or a file size limit. |
| SQL | <severity-level> | NONE |
Traces SQL statements, results, and parameters. |
| TIMING | ON | OFF | OFF |
When enabled, traces the elapsed, client, network, and server time for each call into SQLDBC. |
Example
traceOptions="SQL,DEBUG=INFO,SIZE=100M"
set HDB_SQLDBC_TRACEFILE="%TEMP%/sqldbctrace.txt" set HDB_SQLDBC_TRACEOPTS="DEBUG,SQL" ...reproduce issue using the client... set HDB_SQLDBC_TRACEFILE= set HDB_SQLDBC_TRACEOPTS=
export HDB_SQLDBC_TRACEFILE="/tmp/sqldbctrace.txt" export HDB_SQLDBC_TRACEOPTS="DEBUG,SQL" ...reproduce issue using the client... unset HDB_SQLDBC_TRACEFILE unset HDB_SQLDBC_TRACEOPTS