Document Type | Technical Information
Category | Administration
Applicable Product Version | -
Document Number | TADTI236
Overview
This guide provides the essential configuration files for operating Tibero Single DB.
Method
3. Essential Tibero Configuration Files
3.1. Redo Log File
Records all changes to data and provides recovery methods in case of Media Failure.
Configured with at least two or more groups (Mirroring).
3.1.1. Checking Redo Log Files
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
--------------- ------------ ---------- ------------------------------
0 ONLINE /tibero/tbdata/redo_1/log001.log
1 ONLINE /tibero/tbdata/redo_1/log011.log
2 ONLINE /tibero/tbdata/redo_1/log021.log
β Currently, there is 1 log file (1 member) in each of the 3 groups, all in Online status.
SQL> select group#, members, archived, status from v$log;
GROUP# MEMBERS ARCHIVED STATUS
---------------- --------------- ---------------- --------
βββ 0 1 ββYES INACTIVE
βββ 1 1 ββ YES INACTIVE
βββ 2 1 ββNO CURRENT
β It can be confirmed that log files are currently being written to Group 2.
When the CURRENT log file is full or a manual log switch is triggered, the next log file becomes CURRENT, and redo logs are recorded.
3.1.2. Adding Redo Log Files / Mirroring
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
----------------- -------------- ----------- -----------------------------------
0 ONLINE /tibero/tbdata/redo_1/log001.log
1 ONLINE /tibero/tbdata/redo_1/log011.log
2 ONLINE /tibero/tbdata/redo_1/log021.log
β Check the current Redo Log File configuration.
SQL> alter database add logfile member '/tibero/tbdata/redo_2/log002.log' to group 0;
SQL> alter database add logfile member '/tibero/tbdata/redo_2/log012.log' to group 1;
β Add log file members to each group to mirror the redo log files.
β Since Group 2 is currently in CURRENT status, add members to Groups 0 and 1 which are in INACTIVE status first.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
---------------- ---------------- ----------- -----------------------------------
0 ONLINE /tibero/tbdata/redo_1/log001.log
0 ONLINE /tibero/tbdata/redo_2/log002.log
1 ONLINE /tibero/tbdata/redo_1/log011.log
1 ONLINE /tibero/tbdata/redo_2/log012.log
2 ONLINE /tibero/tbdata/redo_1/log021.log
β It can be seen that members were added to Groups 0 and 1.
β Since Group 2 is in CURRENT status, member addition cannot be performed at this time.
SQL> alter system switch logfile;
SQL> select group#, members, archived, status from v$log;
GROUP# ββ MEMBERS ARCHIVED STATUS
----------------- ------------------ ----------------- -------------
βββ 0 2 βββββNO CURRENT
βββ 1 2 βββββ YES INACTIVE
βββ 2 1 βββββYES INACTIVE
β Manually switch logs to make Group 2 INACTIVE.
SQL> alter database add logfile member '/tibero/tbdata/redo_2/log022.log' to group 2;
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
----------------- ------------ ----------- -----------------------------------
0 ONLINE /tibero/tbdata/redo_1/log001.log
0 ONLINE /tibero/tbdata/redo_2/log002.log
1 ONLINE /tibero/tbdata/redo_1/log011.log
1 ONLINE /tibero/tbdata/redo_2/log012.log
2 ONLINE /tibero/tbdata/redo_1/log021.log
2 ONLINE /tibero/tbdata/redo_2/log022.log
β Confirmed that a member was added to Group 2, so all groups now have 2 members.
Note
Since redo log files are often mistakenly deleted or nulled by confusing them with regular log files, careful management of redo log files is required.
3.2. Control File
An essential file for maintaining database integrity, recording the location of data files and the physical database's current status.
Required during database mount and open stages; if lost, the entire database becomes unusable and must be recovered.
3.2.1. Checking Control Files
SQL> select * from v$controlfile;
STATUS NAME βββ ββBLKSIZE BLOCKS
--------------- --------------------------------------- ---------- ----------
β 0 /tibero/tbdata/cont_1/c1.ctl β16384 4645
ββ 0 /tibero/tbdata/cont_2/c2.ctl β 16384 4645
β Control files are created and maintained in duplicate to prepare for loss.
It is recommended to create them in different storage locations to increase stability.
3.2.2. Control File Backup
Since control files are very important for database operation, it is recommended to back them up regularly.
SQL> alter database backup controlfile to trace as '/tibero/tbdata/_BACKUP/control.sql'; Database altered. β Executing the above command backs up the control file as a text file containing the creation query at the path specified after βto trace asβ. β This backup file can be used for recovery if the control file is damaged or deleted later. $ ls -l /tibero/tbdata/_BACKUP total 8 -rw-r--r-- 1 tibero dba 4124 Mar 27 05:35 control.sql β You can verify the backup file using the ls command in the specified OS path.
3.3. Datafile
The physical storage space where actual data is stored; multiple datafiles can exist within one tablespace (logical storage unit).
3.3.1. Checking Datafiles
SQL> select tablespace_name, file_name, bytes/1024/1024 from dba_data_files;
TABLESPACE_NAME FILE_NAME ββββBYTES/1024/1024
-------------------------- ------------------------------------------------- ---------------------
SYSTEM ββ /tibero/tbdata/data/system001.dtf βββ 110
UNDO ββ β /tibero/tbdata/data/undo001.dtf ββββ 200
USR βββ /tibero/tbdata/data/usr001.dtf ββββ 100
SYSSUB β β /tibero/tbdata/data/syssub001.dtf βββ 20
TEST01 β β /tibero/tbdata/data/test01001.dtf βββ 100
TEST02 β /tibero/tbdata/data/test02001.dtf ββββ 100
6 rows selected.
β This command shows the tablespace name, the file name belonging to the tablespace, and the file size. βBYTES/1024/1024β converts the file size to megabytes.
SQL> select file#, name, status from v$datafile;
FILE# ββ NAME βββββββββSTATUS
-------------- ----------------------------------------------- -------------------
ββ 0 /tibero/tbdata/data/system001.dtf βββ ONLINE
ββ1 /tibero/tbdata/data/undo001.dtf ββββONLINE
ββ 2 /tibero/tbdata/data/usr001.dtf ββββONLINE
ββ3 /tibero/tbdata/data/syssub001.dtf βββ ONLINE
ββ4 /tibero/tbdata/data/test01001.dtf ββββONLINE
ββ5 /tibero/tbdata/data/test02001.dtf ββββONLINE
6 rows selected.
β This command also retrieves a list of datafiles existing in the database.
Note
The above redo log files, control files, and datafiles are essential files related to Tibero operation and must be regularly backed up and managed.