Document Type | Technical Information
Category | Administration/Configuration
Applicable Product Version | -
Document Number | TADTI235
Overview
This document guides you on how to check the environment needed for Tibero Single DB operation and the procedures for starting and stopping the database.
The instructions in this document apply to Tibero 7 and Tibero 6.
Method
1. Verify Tibero Environment
1.1. Verify DBA Group and Tibero OS User
1.1.1. Verify OS DBA Group and Tibero User
To install and operate Tibero on the server, you must create a Tibero User and a dba Group in the OS.
When installing Tibero for the first time, create the Tibero User and dba Group in the OS. If Tibero is already running, check their existence with the following commands.
$ cat /etc/group | grep dba dba:x:500:tibero $ cat /etc/passwd | grep tibero tibero:x:100:500::/tibero:/bin/bash
Note
The Tibero User name may vary depending on the environment.
1.1.2. Verify Tibero Process Operation
Running Tibero includes Listener, Worker Processes (Foreground Processes), and Background Processes. These processes automatically start when Tibero is started with the tbboot command and perform their respective functions to ensure smooth operation of Tibero.
$ ps -ef | grep tbsvr tibero โ2998โ 1705 0 22:09 pts/0 โโ00:00:00 grepโโโโโโ--color=auto tbsvr tibero 31684 โโ 1 0โโ06:36 ? 00:00:20 tbsvr โโโ -t NORMAL -SVR_SID tibero tibero 31686 31684 0โโ06:36 ? 00:00:00 tbsvr_MGWP โ -t NORMAL -SVR_SID tibero tibero 31687 31684 0โโ06:36 ? 00:00:45 tbsvr_FGWP000 -t NORMAL -SVR_SID tibero tibero 31688 31684 0โโ06:36 ? 00:01:02 tbsvr_FGWP001 -t NORMAL -SVR_SID tibero tibero 31689 31684 0โโ06:36 ? 00:00:00 tbsvr_PEWP000 -t NORMAL -SVR_SID tibero tibero 31690 31684 0โโ06:36 ? 00:00:00 tbsvr_PEWP001 -t NORMAL -SVR_SID tibero tibero 31691 31684 0โโ06:36 ? 00:00:00 tbsvr_PEWP002 -t NORMAL -SVR_SID tibero tibero 31692 31684 0โโ06:36 ? 00:00:00 tbsvr_PEWP003 -t NORMAL -SVR_SID tibero tibero 31693 31684 0โโ06:36 ? 00:01:15 tbsvr_AGNT โ -t NORMAL -SVR_SID tibero tibero 31694 31684 0โโ06:36 ? 00:00:56 tbsvr_DBWR โ -t NORMAL -SVR_SID tibero tibero 31695 31684 0โโ06:36 ? 00:00:02 tbsvr_RCWP โ -t NORMAL -SVR_SID tibero $ ps -ef | grep tblistener tibero 11995 11994 0 06:06 pts/0 00:00:00 /tibero/tibero7/bin/tblistener -n 11 -t NORMAL -SVR_SID tibero tibero 32624 17083 0 17:13 pts/9 00:00:00 grep --color=auto tblistener
1.2. Verify TB_BASE and TB_HOME Directories
1.2.1. Verify TB_BASE Directory
TB_BASE is the directory where the entire Tibero product is installed. It includes basic data files, log files, and configuration files including the Tibero Engine.
It is typically set in the profile located in the Tibero User's home directory. The setting can be changed, and you can check it using the OS echo command.
$ echo $TB_BASE /tibero
1.2.2. Verify TB_HOME Directory
TB_HOME is the directory where the executable programs of the Tibero Engine are installed.
It is typically set in the profile located in the Tibero User's home directory and can be changed.
Use the following command to check TB_HOME.
$ echo $TB_HOME /tibero/tibero7
1.3. Verify Tibero Instance Name
1.3.1. Verify TB_SID
TB_SID is the value assigned to identify the Tibero Instance. The Tibero Instance includes Listener, Worker Process, Background Process, and TSM.
It is typically set in the profile located in the Tibero User's home directory. The setting can be changed, and you can check it using the OS echo command.
$ echo $TB_SID tibero
2. Starting and Stopping the Database
2.1. Starting the Database
2.1.1. Start the Database
Log in as the Tibero User in the OS.
Start Tibero using the tbboot command executable located at $TB_HOME/bin/tbboot.
You can use options with the tbboot command depending on the startup purpose.
2.1.2. tbboot Options
tbboot provides the following options.
NOMOUNT: Creates TSM (Tibero Shared Memory) and starts Listener Process, Worker Process, and Background Process. The instance starts without mounting the database, so database access is not allowed.MOUNT: Mounts the database to perform specific DBA tasks. User database access is not allowed. Used for renaming data files, adding/deleting/modifying redo log files, enabling or disabling archive options, or full database recovery operations.NORMAL: Allows users to access the database.
$ tbboot Change core dump dir to /tibero/tibero7/bin/prof. Listener port = 8629 Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero instance started up (NORMAL mode). $ $ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> SELECT STATUS FROM V$INSTANCE; STATUS ---------------- NORMAL
2.2. Stopping the Database
2.2.1. Verify Database
Log in as the Tibero User in the OS.
Use the following commands to check $TB_HOME and $TB_SID to confirm the database you want to stop.
$ echo $TB_HOME /tibero/tibero7 $ echo $TB_SID tibero
2.2.2. Generate Checkpoint
When a checkpoint occurs, the CKPT thread of the DBWR Background Process updates the contents of the Control File and Datafile Header. It also generates a checkpoint, which is the starting point for recovery in the Online Redo Log File.
The DBWR Process writes modified contents of the Database Buffer in TSM memory to the corresponding Datafiles. The checkpoint is executed before stopping the database to maintain data consistency.
TSM (Tibero Shared Memory) is the shared memory area of Tibero where database information shared by database processes is stored.
Generate a checkpoint with the following command.
SQL> alter system checkpoint; System altered.
2.2.3. Stop the Database
Log in as the Tibero User in the OS.
Stop Tibero using the tbdown command executable located at $TB_HOME/bin/tbdown.
Use the following command to stop Tibero.
$ tbdown immediate; Tibero instance terminated (IMMEDIATE mode).
2.2.4. tbdown Options
tbdown provides the following options.
NORMAL: Waits until all currently connected users properly terminate their sessions.POST_TX: Waits until the current transactions finish before terminating sessions.IMMEDIATE: Terminates currently running SQL statements, rolls back uncommitted transactions, and then terminates sessions.ABORT: Stops the database without waiting for statements to finish or user connections to disconnect. This is an abnormal shutdown mode where uncommitted transactions are not rolled back.
Note
In general, use the
IMMEDIATEoption to stop the database.Use the
ABORToption only if the database does not stop for a long time and processes are not cleaned up.