Document Type | Technical Information
Category | Administration
Applicable Product Versions | Tibero5, Tibero6, Tibero7
Document Number | TADTI214
Overview
This document describes a BMT scenario to verify the proper operation of the redundancy function in a TAC environment.
Method
DBMS Failure Failover
This section explains the failover function for DBMS instance failures.
Procedure
| Step | Scenario |
|---|---|
| 1 | Client connection setup (tbdsn.tbr) |
| 2 | Confirm instance connection |
| 3 | Prepare data for query execution |
| 4 | Execute query |
| 5 | Instance failure (process kill) |
| 6 | Verify failover |
Results
| Step | Scenario | |||
|---|---|---|---|---|
| 1 | Client connection setup (tbdsn.tbr) | |||
| tta1=( (INSTANCE=(HOST=192.168.51.161) (PORT=8639) (DB_NAME=tta) ) (INSTANCE=(HOST=192.168.51.162) (PORT=8639) (DB_NAME=tta) ) (USE_FAILOVER=(TYPE=CURSOR) (RETRY=3) ) ) | ||||
| 2 | Confirm instance connection | |||
| tbsql sys/tibero@tta1 select instance_name from v$instance; INSTANCE_NAME ---------------------------------------- tta1 | ||||
| 3 | Prepare data for query execution | |||
| drop table tibero.test; drop table tibero.test1; create table tibero.test as select level as col1, level || '_test' as col2, trunc(level/100) as col3 from dual connect by level < 10000001; create table tibero.test1 as select level as col1, level || '_test' as col2, trunc(level/100) as col3 from dual connect by level < 10000001; | ||||
| 4 | Execute query | |||
| ||||
| 5 | Instance failure (process kill) | |||
-- Node1 tbdown abnormal | ||||
| 6 | Verify failover | |||
-- Node2 select max(a.col1), max(b.col1) from tibero.test a , tibero.test1 b where a.col1= b.col1; MAX(A.COL1) MAX(B.COL1) ----------- ----------- |
DBMS Failure Failback
This section explains the failback function for DBMS instance failures.
Procedure
| Step | Scenario |
|---|---|
| 1 | Check service |
| 2 | Start instance |
| 3 | Connect with tbsql and verify connected instance |
Results
| Step | Scenario |
|---|---|
| 1 | Check service |
| [root@tech-tac0 cumulative]$ cmrctl show all Resource List of Node cm0 ===================================================================== CLUSTER TYPE NAME STATUS DETAIL ----------- -------- -------------- -------- ------------------------ COMMON network net0 UP (private) 10.10.10.231/29000 COMMON cluster cls0 UP inc: net0, pub: N/A cls0 file cls0:0 UP /share/tac/CMFILE/CMFILE cls0 service testdb UP Database, Active Cluster (auto-restart: OFF) cls0 db testdb0 DOWN testdb, /root/tibero_engine, failed retry cnt: 0 ===================================================================== Resource List of Node cm1 ===================================================================== CLUSTER TYPE NAME STATUS DETAIL ----------- -------- -------------- -------- ------------------------ COMMON network net1 UP (private) 10.10.10.232/29000 COMMON cluster cls0 UP inc: net1, pub: N/A cls0 file cls0:0 UP /share/tac/CMFILE/CMFILE cls0 service testdb UP Database, Active Cluster (auto-restart: OFF) cls0 db testdb1 UP(NRML) testdb, /root/tibero_engine, failed retry cnt: 0 ===================================================================== | |
| 2 | Start instance |
[root@tech-tac0 cumulative]$ tbboot Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. | |
| 3 | Connect with tbsql and verify connected instance |
SQL> select instance_name from v$instance; INSTANCE_NAME 1 row selected. SQL> exit
|
Network (public) Failure Failover
This section explains the failover function for public network failures.
Procedure
| Step | Scenario |
|---|---|
| 1 | Client connection setup (tbdsn.tbr) |
| 2 | Confirm instance connection |
| 3 | Prepare data for query execution |
| 4 | Execute query |
| 5 | Network (public) failure |
| 6 | Verify failover |
Results
| Step | Scenario | |||
|---|---|---|---|---|
| 1 | Client connection setup (tbdsn.tbr) | |||
tta1=( (INSTANCE=(HOST=192.168.51.162) (SELF_KEEPINTVL=4) | ||||
| 2 | Confirm instance connection | |||
| tbsql sys/tibero@tta1 select instance_name from v$instance; INSTANCE_NAME ---------------------------------------- tta1 | ||||
| 3 | Prepare data for query execution | |||
| drop table tibero.test; drop table tibero.test1; create table tibero.test as select level as col1, level || '_test' as col2, trunc(level/100) as col3 from dual connect by level < 10000001; create table tibero.test1 as select level as col1, level || '_test' as col2, trunc(level/100) as col3 from dual connect by level < 10000001; | ||||
| 4 | Execute query | |||
| ||||
| 5 | Network (public) failure | |||
-- Node1 ifconfig en1 down | ||||
| 6 | Verify failover | |||
-- Node2 select max(a.col1), max(b.col1) from tibero.test a , tibero.test1 b where a.col1= b.col1; MAX(A.COL1) MAX(B.COL1) ----------- ----------- |
Network (Public) Failure Failback Function
This section explains the failback function for public network failures.
Procedure
| Step | Scenario |
|---|---|
| 1 | Restore network (Public) |
| 2 | Check service |
| 3 | Connect with tbsql and verify connected instance |
Results
| Step | Scenario |
|---|---|
| 1 | Restore network (Public) |
| ifconfig en1 up | |
| 2 | Check service |
| cmrctl show all Resource List of Node cm0 ===================================================================== CLUSTER TYPE NAME STATUS DETAIL ----------- -------- -------------- -------- ------------------------ COMMON network net0 UP (private) 10.10.10.231/29000 COMMON cluster cls0 UP inc: net0, pub: N/A cls0 file cls0:0 UP /share/tac/CMFILE/CMFILE cls0 service testdb UP Database, Active Cluster (auto-restart: OFF) cls0 db testdb0 UP(NRML) testdb, /root/tibero_engine, failed retry cnt: 0 ===================================================================== Resource List of Node cm1 ===================================================================== CLUSTER TYPE NAME STATUS DETAIL ----------- -------- -------------- -------- ------------------------ COMMON network net1 UP (private) 10.10.10.232/29000 COMMON cluster cls0 UP inc: net1, pub: N/A cls0 file cls0:0 UP /share/tac/CMFILE/CMFILE cls0 service testdb UP Database, Active Cluster (auto-restart: OFF) cls0 db testdb1 UP(NRML) testdb, /root/tibero_engine, failed retry cnt: 0 ===================================================================== | |
| 3 | Connect with tbsql and verify connected instance |
| select instance_name from v$instance; INSTANCE_NAME ---------------------------------------- tta2 1 row selected. |
Network (Interconnect) Failure Failover Function
This section explains the failover function for interconnect network failures.
Procedure
| Step | Scenario |
|---|---|
| 1 | Client connection setup (tbdsn.tbr) |
| 2 | Confirm instance connection |
| 3 | Prepare data for query execution |
| 4 | Execute query |
| 5 | Network (interconnect) failure |
| 6 | Check query execution result |
| 7 | Check service |
Results
| Step | Scenario | |||
|---|---|---|---|---|
| 1 | Client connection setup (tbdsn.tbr) | |||
| tta1=( (INSTANCE=(HOST=192.168.51.161) (PORT=8639) (DB_NAME=tta) ) (INSTANCE=(HOST=192.168.51.162) (PORT=8639) (DB_NAME=tta) ) (USE_FAILOVER=(TYPE=CURSOR) (RETRY=3) ) ) | ||||
| 2 | Confirm instance connection | |||
tbsql sys/tibero@tta1 select instance_name from v$instance; | ||||
| 3 | Prepare data for query execution | |||
| drop table tibero.test; drop table tibero.test1; create table tibero.test as select level as col1, level || '_test' as col2, trunc(level/100) as col3 from dual connect by level < 10000001; create table tibero.test1 as select level as col1, level || '_test' as col2, trunc(level/100) as col3 from dual connect by level < 10000001; | ||||
| 4 | Execute query | |||
| ||||
| 5 | Network (interconnect) failure | |||
| ifconfig en4 down | ||||
| 6 | Check query execution result | |||
MAX(A.COL1) MAX(B.COL1) ----------- ----------- | ||||
| 7 | Check service | |||
| [root@tech-tac0 cumulative]$ cmrctl show all Resource List of Node cm0 ===================================================================== CLUSTER TYPE NAME STATUS DETAIL ----------- -------- -------------- -------- ------------------------ COMMON network net0 DOWN (private) 10.10.10.231/29000 COMMON cluster cls0 DOWN inc: net0, pub: N/A cls0 file cls0:0 DOWN /share/tac/CMFILE/CMFILE cls0 service testdb UP Database, Active Cluster (auto-restart: OFF) cls0 db testdb0 DOWN testdb, /root/tibero_engine, failed retry cnt: 0 ===================================================================== Resource List of Node cm1 ===================================================================== CLUSTER TYPE NAME STATUS DETAIL ----------- -------- -------------- -------- ------------------------ COMMON network net1 UP (private) 10.10.10.232/29000 COMMON cluster cls0 UP inc: net1, pub: N/A cls0 file cls0:0 UP /share/tac/CMFILE/CMFILE cls0 service testdb UP Database, Active Cluster (auto-restart: OFF) cls0 db testdb1 UP(NRML) testdb, /root/tibero_engine, failed retry cnt: 0 ===================================================================== |
Network (Interconnect) Failure Failback Function
This section explains the failback function for interconnect network failures.
Procedure
| Step | Scenario |
|---|---|
| 1 | Restore network (interconnect) |
| 2 | Start instance |
| 3 | Connect with tbsql and verify connected instance |
Results
| Step | Scenario |
|---|---|
| 1 | Restore network (interconnect) |
| ifconfig en4 up | |
| 2 | Start instance |
tbcm -b TBCM 7.1.1 (Build 300983) TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero cluster manager started up.
tbboot Tibero 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. | |
| 3 | Connect with tbsql and verify connected instance |
SQL> select instance_name from v$instance; INSTANCE_NAME 1 row selected. |