Document Type | Technical Information
Category | Administration
Applicable Product Version | -
Document Number | TADTI237
Overview
This document guides you on the logs related to Tibero Single DB operation.
Method
4. Checking Tibero Logs
4.1. Tibero Log Locations and Purposes
4.1.1. $TB_HOME/instance/$TB_SID/log/
This is the path where the out files are generated, and files matching the pattern tbsvr.out.xxx are created here.
The tbsvr.out.xxx files (where xxx is the PID of the monitor process) record the SQL statements that triggered the Callstack Dump on error, the date and time when the Callstack Dump file was created, session ID, process PID, and thread number.
The file creation path can be confirmed by the LOG_DEFAULT_DEST parameter.
(Default path: $TB_HOME/instance/$TB_SID/log)
$ ls -l $TB_HOME/instance/$TB_SID/log/tbsvr.out.11994 -rw------- 1 tibero dba 412 Mar 27 09:50 /tibero/tibero7/instance/tibero/log/tbsvr.out.11994 $ cat $TB_HOME/instance/$TB_SID/log/tbsvr.out.11994 [90] *** Callstack Dump by Executing DDL(ALTER SYSTEM KILL SESSION (89, 2232) mode=0) *** [22] *** 2023/03/27 09:35:25.599 *** [22] callstack dump from tbsvr_AGNT for [WTHR, 89, 12146/11998] [22] SEE DUMP tbsvr.callstack.11998 (lwpid 12146) BY PSTACK [22] *** 2023/03/27 09:50:19.269 *** [22] callstack dump from tbsvr_AGNT for [WTHR, 89, 12146/11998] [22] SEE DUMP tbsvr.callstack.11998 (lwpid 12146) BY PSTACK
4.1.2. $TB_HOME/instance/$TB_SID/log/callstack/
This is the location where callstack files are generated when errors occur.
Callstack files have names following the pattern tbsvr.callstack.. (Example: tbsvr.callstack.11998)
The file creation path can be confirmed by the CALLSTACK_DUMP_DEST parameter.
(Default path: $TB_HOME/instance/$TB_SID/log/callstack)
$ ls -l $TB_HOME/instance/$TB_SID/log/callstack/tbsvr.callstack.11998 -rw------- 1 tibero dba 31387 Mar 27 09:50 tbsvr.callstack.11998 $ cat $TB_HOME/instance/$TB_SID/log/callstack/tbsvr.callstack.11998 | head -n10 [22] *** 2023/03/27 09:35:25.599 *** CALL STACK DUMP BY PSTACK (from 89:12146) Thread 11 (Thread 0x7f5be769f700 (LWP 12146)): #0 0x00007f5c2adb9a9b in recv () from /lib64/libpthread.so.0 #1 0x00000000006df2df in tbsvr_read_msg_buf_by_wthr (timed_out=<synthetic pointer>, no_free=<optimized out>, timeout=0, cl_conn=0x7f5c2e5852c8) at /home/chef/workspace/Build_centos_7/tibero7/src/tbsvr/common/tbsvr_msg.c:944 #2 tbsvr_read_msg_internal (cl_conn=cl_conn@entry=0x7f5c2e5852c8, timeout=0, no_free=no_free@entry=0 '00') at /home/chef/workspace/Build_centos_7/tibero7/src/tbsvr/common/tbsvr_msg.c:146
4.1.3. $TB_HOME/instance/$TB_SID/log/tracedump/
This is the location where tracedump files for debugging are generated.
If you execute the statement ALTER SYSTEM DUMP CALLSTACK ON ERROR error_code ON/OFF; to set the error code first, debugging information will be recorded in the tracedump directory when that error occurs.
Among the debugging information, when an SQL error occurs, the SQL and PSM statements are recorded in a file named in the format โtb_dump___โ.
SQL> ALTER SYSTEM DUMP CALLSTACK ON ERROR -7071 ON; System altered. SQL> DROP TABLE TIBERO.HELLO; TBR-7071: Schema object 'TIBERO.HELLO' was not found or is invalid. SQL> ALTER SYSTEM DUMP CALLSTACK ON ERROR -7071 OFF; System altered. $ cat $TB_HOME/instance/$TB_SID/log/tracedump/tb_dump_11998_91_40995.trc PRINT CALLSTACK on error (TBR-7071) While executing sql : [DROP TABLE TIBERO.HELLO]
Additionally, dump files are generated in this directory through DDL dump commands.
The file creation path can be confirmed by the TRACE_DUMP_DEST parameter.
(Default path: $TB_HOME/instance/$TB_SID/log/tracedump/)
SQL> ALTER SYSTEM DUMP CONTROLFILE;
System altered.
$ ls -l $TB_HOME/instance/$TB_SID/log/tracedump
-rw-r--r-- 1 tibero dba 20021 Mar 27 08:25 tb_dump_11998_89_2232.trc
$ cat $TB_HOME/instance/$TB_SID/log/tracedump/tb_dump_11998_89_2232.trc | head -n9
**Dump start at 2023-03-27 08:25:11
Control file dump
* checkpoint progress sections
(blkno = 0x1, pblkno = 0x1, blkcnt = 8
size = 16364, max = 8, used = 1, last_recid = 0)
inst #0, flags=1, dirty=0, low=0000.00012718 2023-03-27 08:25:10
LOG 13.2718/0000.00012754 2023-03-27 08:25:104.2. Checking System Logs
Each Tibero instance has a system log file. If it does not exist, it is created when the instance starts. The system log records the following information:
- Times when the database was started and shut down
- Parameter file contents at instance startup
- Process information
- Log sequence numbers recorded by LGWR
- Information about log switches
- Creation of tablespaces and undo segments
- Executed statements
- Error messages and error details
Because system log files record command logs, key event results, and errors as described above, they are important files used to diagnose and operate the database.
$ SQL> select value from v$parameters where name='SLOG_DEST'; VALUE ----------------------------------------------------------------------------------- /tibero/tibero7/instance/tibero/log/slog/ โ You can check the directory where the system log file exists by querying the SLOG_DEST parameter. โ The system log file name is sys.log. $ vi sys.log โ Navigate to the system log file directory on the OS and open the file with the vi command, then press โshift+gโ to move to the end of the file. โ Enter โ?ec=โ to search for errors or use the arrow keys to check recent logs. (If messages starting with โec=โ are found, enter โtberr error-numberโ on the OS to search for a brief error description or contact the responsible DBA.) $ tberr -7071 /* * err: -7071 * name: ERROR_DDL_INVALID_OBJ_NAME * desc: Schema object '%1$s.%2$s' was not found or is invalid. * cause: The specified object was not found or is an invalid type. * action: Specify a valid object name.; */
4.3. Checking Listener Logs
This file records information about connections to Tibero through the listener, as well as listener start/stop logs.
$ cd $TB_HOME/instance/$TB_SID/log/lsnr $ ls โl trace_list.log -rw-r--r-- 1 tibero dba 74937 Mar 27 11:25 trace_list.log $ head -n10 trace_list.log 2023/03/21 23:26:56.436 [1] listener:439 listener binded to -1:8629 2023/03/21 23:26:56.436 [1] listener:463 listener binded to -1:8631 (ssl) 2023/03/21 23:26:56.436 [5] listener:2692 accepted connection from mthr. 2023/03/21 23:26:57.911 [1] listener:718 *** listener started and got into main loop *** 2023/03/21 23:26:57.933 [5] listener:1029 a new client connection detected. 2023/03/21 23:26:57.933 [5] listener:948 a client connection from [127.0.0.1:21543] 2023/03/21 23:26:57.933 [5] listener:2540 sent a connection fd to the WTHR process 1 successfully. 2023/03/21 23:27:33.665 [2] listener:1395 listener stops listening. 2023/03/21 23:27:33.665 [2] listener:1188 listener disables the listener port. 2023/03/21 23:27:36.161 [1] listener:2316 Listener shutdown because MONP has ended or another listener exists.