Document Type | Technical Information
Category | Installation
Applicable Product Version | 7FS02PS
Document Number | TINTI015
Overview
NoteBasic conceptual knowledge of Tibero and TSC is required to perform this document.
Method
This is the method to reconfigure TSC using the Suspend feature when a failure occurs on the Standby while TSC is connected.
Test Environment
| Primary | Standby |
|---|---|---|
OS | ip : 192.168.49.128 os : Rocky Linux release 8.10 cpu : 2 core memory : 4GB | ip : 192.168.49.129 os : Rocky Linux release 8.10 cpu : 2 core memory : 4GB |
DB | DB Name: t723 version: Tibero 7 (DB 7.2.3) Build 292332 port: 8629 tip: DB_NAME=t723 MAX_SESSION_COUNT=20 TOTAL_SHM_SIZE=1500M
| DB Name: t723 version: Tibero 7 (DB 7.2.3) Build 292332 port: 8629 tip: DB_NAME=t723 MAX_SESSION_COUNT=20 TOTAL_SHM_SIZE=1500M
|
TSC Reconfiguration Method
| Primary | Standby | Remarks |
|---|---|---|---|
1 | - Install Tibero engine on Standby - Extract engine files - Configure up to tip | Standby installation | |
2 | - Perform logswitch [t723@localhost config]$ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> alter system switch logfile; SQL> <repeat several times> SQL> exit | Primary Perform logswitch before BEGIN BACKUP | |
3 | - Perform BEGIN BACKUP [t723@localhost config]$ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> alter database begin backup;
- Copy data files to Standby [t723@localhost config]$ cd /home/t723/tibero7/database/t723 [t723@localhost t723]$ sftp t723@192.168.49.129 sftp> exit
- Perform END BACKUP after copy completes [t723@localhost config]$ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> alter database end backup; | Primary After BEGIN BACKUP | |
4 | - Prevent login history from being recorded in table. SQL> alter system set _USE_LOGIN_RECORD=N; (Default: N) | Disable redo logging operation on tbsql connection | |
5 | - Enable Suspend on Primary [t723@localhost t723]$ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> alter system suspend for standby;
| Primary Activate Suspend feature | |
6 | - Behavior after performing DML/DDL when Suspend is enabled SQL> create table test001 (col1 varchar(10)); <HANG occurs on execution> SQL> select * from tibero.test; 0 row selected. SQL> insert into tibero.test values (1); 1 row inserted. (Since log flush is blocked during suspend, large DML operations may cause hang) SQL> commit; <HANG occurs on execution>
| DML/DDL operations are restricted when Suspend is enabled | |
7 | - Copy redo and control files to Standby [t723@localhost t723]$ sftp t723@192.168.49.129 sftp> put c1.ctl
- Disable Suspend [t723@localhost t723]$ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> alter system resume; System altered. | Primary After copying redo and control files Disable Suspend | |
8 | - You can back up immediately after resume, but to prevent a situation where a log switch occurs instantaneously after resume changing the current log and making MR impossible: SQL> alter database backup controlfile to 'ctl.bkp'; | Control file backup | |
9 | - Behavior of DML/DDL statements that were hanging due to Suspend after disabling Suspend SQL> create table test001 (col1 varchar(10)); Table 'TEST001' created.
SQL> SQL> select * from tibero.test; 0 row selected. SQL> insert into tibero.test values (1); 1 row inserted. SQL> commit; Commit completed. | DML/DDL that were suspended are executed when alter system resume; is performed. | |
10 | - Record login history in table. SQL> alter system set _USE_LOGIN_RECORD=Y; (If originally Y, change to Y) | Enable redo logging operation on tbsql connection | |
11 | - Copy archive log files to Standby [t723@localhost t723]$ sftp t723@192.168.49.129 | Copy archivelogs generated during backup | |
12 | - Start tbboot mount [t723@localhost t723]$ tbboot mount Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved.
- tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> alter database standby controlfile; Database altered. SQL> alter database recover automatic for standby; Database altered. SQL> exit Tibero instance terminated (IMMEDIATE mode). | After Standby Mount startup, perform internal sync operations | |
13 | [t723@localhost t723]$ tbboot recovery Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. | Standby Recovery startup | |
14 | - If FLAGS is CONNECTED, it is normal. SQL> select * from v$standby_dest; STANDBY_ADDR TYPE
| SQL> select * from v$standby; PRIMARY_ADDR | Confirm sync status |
Key Command Descriptions
- alter system suspend for standby:
- Blocks I/O to ensure block consistency during online redo logfile backup - Because log flush is blocked, hang may occur during heavy DML operations - alter system resume: Allows redo logging operation
- alter database standby controlfile: Switches to Standby DB state
- alter database recover automatic for standby: Starts automatic recovery (archive log application) for Standby DB