Document Type | Technical Information
Category | Administration
Document Number | TADTI062
Overview
To extract CLI logs, you need to set the environment variables
TBCLI_LOG_LVL and TBCLI_LOG_DIR as shown below.TBCLI_LOG_LVL=TRACE TBCLI_LOG_DIR=log location
However, if you want to extract CLI logs only for operations performed through tbsql, you can extract them using the
tbdsn.tbr file.tbdsn.tbr file usage instructions for extracting CLI logs are provided below.Method
tbdsn.tbr file with the following content applied will generate CLI logs directly in TBCLI_LOG_DIR.tibero=( (INSTANCE=(HOST=localhost) (PORT=8629) (DB_NAME=tibero) ) ) S=( (INSTANCE=(HOST=192.168.41.57) (PORT=5817) (DB_NAME=tibero) ) ) TBCLI_LOG_LVL=TRACE TBCLI_LOG_DIR=/home/tibero/log
If you declare
export TBCLI_LOG_LVL in the terminal and also declare it in tbdsn.tbr, the value in tbdsn.tbr takes precedence.Additionally, the
tbdsn.tbr file can also include the TB_NLS_LANG parameter.NoteTB_NLS_DATE_FORMATcauses the following error when specified:TBR-2004: DSN (Database Source Name) file format is invalid. at line 27, column 20: TB_NLS_DATE_FORMAT=yyyy/mm/dd hh24:mi:ss ^^^^ Driver can not be initialized. DSN file is not found or corrupted.