Document Type | Technical Information
Category | Administration
Applicable Product Version | Tibero6
Document Number | TADTI223
Overview
This document is a guide for performing synchronization without service interruption for customers who cannot afford service downtime when using the TmaxTibero TSC product.
Test Environment
DB: T6
OS: CentOS 7.7
Configuration Information:
- PRIMARY Server: 192.168.41.250 (node 1)
- STANDBY Server: 192.168.41.251 (node 2)
- OBSERVER Server: 192.168.41.251 (node 2)
Method
Execution Test
- Check OBSERVER User cm Status
$ su โ OBSERVER โ Connect to observer process user account
$ cmrctl show โ Check observer cm status
Resource List of Observer OBSERVER
===================================================================
TSC_ID CLS_ID CM_NAME NID CM_STAT INST_STAT PRI/TAR
-------- --------- ------------ ----- ---------- ------------ ---------------
11 7 PRIMARY 1 UP UP(NRML) PRIMARY
6 STANDBY 1 UP UP(RECO) TARGET
===================================================================
โป CM_NAME: Name set when registering cm resource (PRIMARY: node 1, STANDBY: node 2)
PRI/TAR: Current DB running status (PRIMARY: DB Normal running status, TARGET: DB Recovery running status)
- Force Shutdown PRIMARY Server DB and Check OBSERVER cm Status
$ su โ PRIMARY โ Connect to DB user on PRIMARY running state
$ tbdown abnormal โ Force shutdown DB
$ cmrctl show โ Confirm service, db, vip stopped
Resource List of Node PRIMARY
=====================================================================
CLUSTER TYPE NAME STATUS DETAIL
----------- -------- -------------- -----------------------------------
COMMON network pub01 UP (public) enp0s8
COMMON network net01 UP (private) 192.168.41.252/29000
COMMON cluster cls01 UP inc: net01, pub: pub01
cls01 file cls01:0 UP /home/tsc1/tibero6/config/cls1_cfile
cls01 service tibero DOWN Database, Active Cluster (auto-restart: OFF)
cls01 db tibero_p DOWN tibero, /home/tsc1/tibero6, failed retry cnt: 0
cls01 vip vip01 DOWN tibero, 192.168.41.254/255.255.255.0/192.168.41.255 (1)
failed retry cnt: 0
=====================================================================
$ su โ OBSERVER User
$ cmrctl show
Resource List of Observer OBSERVER
===================================================================
TSC_ID CLS_ID CM_NAME NID CM_STAT INST_STAT PRI/TAR
-------- -------- ----------- ----- --------- ----------- ---------
11 7 PRIMARY 1 UP DOWN N
8 STANDBY 1 UP UP(NRML) PRIMARY
===================================================================
โป It can be confirmed that failover occurred to node 2 as node 1โs DB was forcibly shut down.
- Recover PRIMARY Server and Start in Recovery Mode (Using suspend)
$ su โ STANDBY โ Connect to STANDBY user
$ cmrctl show โ Check service, db, vip running
Resource List of Node STANDBY
=====================================================================
CLUSTER TYPE NAME STATUS DETAIL
----------- -------- -------------- -----------------------------------
COMMON network pub01 UP (public) enp0s8
COMMON network net01 UP (private) 192.168.41.253/29000
COMMON cluster cls01 UP inc: net01, pub: pub01
cls01 file cls01:0 UP /home/tsc1/tibero6/config/cls1_cfile
cls01 service tibero UP Database, Active Cluster (auto-restart: OFF)
cls01 db tibero_s UP(NRML) tibero, /home/tsc1/tibero6, failed retry cnt: 0
cls01 vip vip01 UP tibero, 192.168.41.254/255.255.255.0/192.168.41.255 (1)
failed retry cnt: 0
=====================================================================
โป It can be confirmed that the service and vip are active.
- Recover PRIMARY Server and Start in Recovery Mode (Using suspend)
$ su โ STANDBY
$ tbsql sys/tibero
SQL> select name from v$datafile โ Check DATAFILE paths
union all
select file_name from dba_temp_files;
SQL> alter database begin backup;
SQL> exit
$ sftp tibero@192.168.41.250
sftp> cd /home/tsc1/tbdata
sftp> put /home/tsc1/tbdata/system001.dtf
sftp> put /home/tsc1/tbdata/undo001.dtf
sftp> put /home/tsc1/tbdata/usr01.dtf
sftp> put /home/tsc1/tbdata/tpr_ts.dtf
sftp> put /home/tsc1/tbdata/temp001.dtf
sftp> exit
$ tbsql sys/tibero
SQL> alter database end backup;
SQL> alter system suspend for standby;
SQL> exit
$ sftp tibero@192.168.41.250
sftp> cd /home/tsc1/tbdata
sftp> put /home/tsc1/tbdata/redolog001.redo
sftp> put /home/tsc1/tbdata/redolog002.redo
sftp> put /home/tsc1/tbdata/redolog003.redo
sftp> put /home/tsc1/tbdata/c1.ctl
sftp> put /home/tsc1/tbdata/c2.ctl
sftp> exit
$ tbsql sys/tibero
SQL> alter system resume;
exit
โป If there are changes in archive files, copying archive files is also necessary
$ sftp tibero@192.168.41.250
sftp> cd /home/tsc1/tbdata/tbarch
sftp> put log-t0-r0-s9.arc
sftp> put log-t0-r0-s10.arc
sftp> put log-t0-r0-s11.arc
$ su โ PRIMARY โ Connect to PRIMARY Server user
$ tbboot mount
$ tbsql sys/tibero
SQL> alter database standby controlfile;
SQL> alter database recover automatic for standby;
SQL> exit
$ tbdown immediate
$ tbboot recovery โ Start PRIMARY Server as Target DB
$ su โ OBSERVER User
$ cmrctl show
Resource List of Observer OBSERVER
===================================================================
TSC_ID CLS_ID CM_NAME NID CM_STAT INST_STAT PRI/TAR
-------- -------- ----------- ----- --------- ----------- ---------
11 7 PRIMARY 1 UP UP(RECO) TARGET
8 STANDBY 1 UP UP(NRML) PRIMARY
===================================================================
โป Due to failover, the STANDBY (node 2) DB is running in Normal state, and the PRIMARY (node 1) DB is running in Recovery state as confirmed.