Document TypeㅣTechnical Information
Category | Administration
Applicable Product Versionㅣ7FS02PS
Document NumberㅣTADTI023
Overview
This document provides procedures and execution methods for configuring data reverse synchronization between Primary and Standby in the Tibero Standby Cluster (TSC) environment. In particular, it also includes the process of recovering the Standby DB using the forced reverse synchronization feature (Reverse Sync) in case of exceptional situations.
Constraints
- Control file reverse synchronization is not supported.
Reverse synchronization is not possible during Tablespace/Datafile addition/deletion/resize operations. - Archive Log-based reverse synchronization is not supported.
- If the control file is regenerated after Standby DB Failover, failover RBA information is lost, making reverse synchronization impossible.
- Switching to Read-Only mode before reverse synchronization is complete is not recommended.
- If reverse synchronization fails during the process, rebuilding the Standby DB is necessary.
- It is recommended to set the LOG transmission mode as follows:
(PERFORMANCE, LGWR ASYNC) - Patch 235482g is required to use this feature.
CautionApply the patch through technical support provided by Tmax Tibero.The TSC forced reverse synchronization feature has been incorporated starting from Tibero6 FS07 PS version.
Method
1. Configure TSC (Primary DB <-> Standby DB linkage)
After completing the basic TSC configuration, perform the following steps while the Primary-Standby linkage is active.
2. Shut down Standby DB and abnormally shut down Primary DB
Test a scenario where the Standby DB is shut down, load is applied to the Primary DB, and then the Primary DB is abnormally shut down.
Shut down Standby DB
$ tbdown immediate Tibero instance terminated (IMMEDIATE mode).
Add data to Primary DB
$ tbsql tibero/tmax SQL> create table b(b) as select level from dual connect by level <10000; SQL> create table c(c) as select level from dual connect by level <10000; SQL> create table d(d) as select level from dual connect by level <10000; SQL> create table e(e) as select level from dual connect by level <10000;
Abnormally shut down Primary DB
$ tbdown abnormal Tibero instance terminated (ABNORMAL mode).
3. Start Standby DB by Failover → Change to Primary DB
Modify $TB_SID.tip file (Standby DB)
Path: $TB_HOME/config/$TB_SID.tip
LOG_REPLICATION_MODE=PERFORMANCE LOG_REPLICATION_DEST_1="192.168.179.65:8862 LGWR ASYNC" #_STANDBY_CONN_PORT=8862 #_STANDBY_NETWORK_TIMEOUT=60
- Enter the correct IP address of Standby DB[1].
- Port and Timeout parameters for Standby DB are managed as commented out.
Start by failover (Standby DB → Primary DB)
$ tbboot failover
Confirm the switch
SQL> select DATABASE_ROLE from v$database; DATABASE_ROLE ----------------- PRIMARY 1 row selected.
NoteIf the Standby DB is not yet connected, the following error logs may appear in sys.log:[2024-12-23T13:48:30.814110] [FRM-28] [I] THROW. ec=ERROR_CACHE_LOGNET_WRITE_FAILED(-1029) [ Log network write failed.] (csr_id:4294967295) [tcr_lnw.c:1648:lnw_connect] [2024-12-23T13:48:30.814173] [LNW-28] [I] log network writer for 192.168.179.65 was down : rc(0)
4. Boot the previous Primary DB in recovery mode
Modify $TB_SID.tip (Primary DB)
_STANDBY_CONN_PORT=8862 _STANDBY_NETWORK_TIMEOUT=60
Change control file from Primary DB to Standby DB in Mount mode
$ tbboot mount Listener port = 8857 Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero instance started up (MOUNT mode). $ tbsql sys/tibero SQL> alter database standby controlfile; Database altered. $ tbdown immediate Tibero instance terminated (IMMEDIATE mode). $ tbboot recovery Listener port = 8857 Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero instance started up (RECOVERY mode).
5. Apply reverse synchronization settings to Primary DB
Apply reverse synchronization parameters to the Primary DB to synchronize data with the Standby DB.
$ tbsql sys/tibero SQL> alter system set _LNW_REVERSE_SYNC=Y; System altered.
CautionWhen applying reverse synchronization, the Standby DB will automatically shut down and needs to be restarted..******************************************************** .* Standby reverse sync is successfully finished. .* Media recovery is required. .* Shutting down. .******************************************************** [2024-12-23T14:44:49.050063] [FRM-00] [I] MTHR received SHUTDOWN message! SHUTTING DOWN...(issuer:70, mode[4]:ABORT) [2024-12-23T14:44:49.050113] [MT-00] [I] MTHR starts to shutdown mode=4, CUR_SVRMODE=6
6. Start Standby DB
Starting the Standby DB in recovery mode will make the instance operate as a Standby server.
$ tbboot recovery Listener port = 8857 Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero instance started up (RECOVERY mode).
7. Confirm Primary DB <-> Standby DB connection
Verify the connection to the Standby DB from the Primary DB.
$ tbsql sys/tibero
tbSQL 7
TmaxTibero Corporation Copyright (c) 2020-. All rights reserved.
Connected to Tibero.
SQL> select * from v$standby_dest;
STANDBY_ADDR
--------------------------------------------------------------------------------
TYPE THREAD# FLAGS
-------------------------------- ---------- --------------------------------
SENT_SEQ SENT_BLKNO ACKED_SEQ ACKED_BLKNO DELAY
---------- ---------- ---------- ----------- ----------
192.168.179.65:8862
LGWR ASYNC MAIN 0 CONNECTED
8 3017 8 3017 0
1 row selected.