Document Type | Technical Information
Category | Migration
Applicable Product Version | 7FS02PS
Document Number | TMITI028
Overview
Set up CLI logs to record the connection and operation history of clients connecting to the database via CLI.
These logs can be used for root cause analysis and troubleshooting when issues occur in CLI-based programs such as tbESQL, tbsql, ODBC, etc.
Set up OLE DB logs to record connection and SQL execution information for applications connecting to the database via OLE DB. These logs can be used for root cause analysis and troubleshooting in case of connection errors, SQL execution failures, etc., in ADO (VB, etc.) environments.
Method
1. Environment Variables
ODBC (tbCLI) Environment Variables
When setting tbCLI logs, you must specify environment variables. The main environment variables are as follows.
| Environment Variable | Meaning | Default Value | Example |
|---|---|---|---|
| TBCLI_LOG_LVL |
| None | TRACE |
| TBCLI_LOG_DIR |
|
| $TB_HOME/tbcli_log |
| TB_NLS_LANG | Sets the character set of the client. The default is MSWIN949 (Korean). Usually, it is set to match or be a subset of the DB character set. The values that can be set are the same as the DB character set. | MSWIN949 | MSWIN949 |
The log level types for the TBCLI_LOG_LVL parameter are as follows.
| Level | Description |
|---|---|
| FATAL | Used when a critical error occurs (program needs to stop) |
| ERROR | Error occurs, but the operation continues |
| WARN | Not an error, but requires attention |
| INFO | Records general operation and status information |
| DEBUG | Records major progress details (e.g., API calls) |
| TRACE | Records very detailed debugging information (e.g., memory dumps, etc.) |
| INTERNAL | Highest level of detailed logging (for internal debugging, lock information, etc.) |
OLEDB Environment Variables
Currently, Tibero does not support OLE DB, and recommends using MSDASQL in ADO (VB) environments and TDP.NET in ADO.NET (C#, VB NET) environments.
When using MSDASQL, you can apply the Tibero ODBC environment variables described above and verify with the tbCLI log.
When using TDP.NET, you must set environment variables. The Windows environment variables are as follows.
| Environment Variable | Description |
|---|---|
| TDPNET_LOG_PATH | Specifies the path where the log file is created |
| TDPNET_LOG_LVL |
|
2. Configuration Method
ODBC (tbCLI) Log Configuration Method
tbCLI log environment variables can be set in the tbdsn.tbr file or as environment variables. If both are set, the tbdsn.tbr setting takes precedence.
How to set tbdsn.tbr
tibero7=(
(INSTANCE=(HOST=localhost)
(PORT=8629)
(DB_NAME=tibero7)
)
)
TBCLI_LOG_LVL=TRACE
TBCLI_LOG_DIR=/home/tibero/cli_log
How to set environment variables
- Unix or Linux environment
$ export TBCLI_LOG_LVL=TRACE $ export TBCLI_LOG_DIR=/home/tibero/cli_log
- Windows environment
Set the environment variables in [System Properties].
OLE DB Log Configuration Method
How to set when using MSDASQL
When using MSDASQL, proceed in the same way as setting tbCLI log environment variables in the Windows environment.
How to set when using TDP.NET
Set the TDP.NET log environment variables in the Windows environment [System Properties].