TIBERO TAC FS 구성

eungjj·2023년 11월 14일

- TIBERO

목록 보기
1/8

한 서버에 구성

node1
TB_SID=eun2, CM_SID=cm1
node2
TB_SID=eun3, CM_SID=cm2

NODE1

.bash_profile

export TB_HOME=/home/tibero/tibero6
export TB_SID=eun2
export LD_LIBRARY_PATH=$ TB_HOME/lib:$ TB_HOME/client/lib: $ LD_LIBRARY_PATH
export PATH=$ PATH:$ TB_HOME/bin:$ TB_HOME/client/bin:$PATH

export CM_HOME=/home/tibero/tibero6
export CM_SID=cm1

eun2.tip

DB_NAME=tibero2
LISTENER_PORT=8639
CONTROL_FILES="/home/tibero/tac/control/c1.ctl"

MAX_SESSION_COUNT=20
TOTAL_SHM_SIZE=2G
MEMORY_TARGET=4G

CLUSTER_DATABASE=Y
THREAD=0
UNDO_TABLESPACE=UNDO0

LOCAL_CLUSTER_ADDR=192.168.0.67
LOCAL_CLUSTER_PORT=30001
CM_PORT=15001

cm1.tip

CM_NAME=cm1
CM_UI_PORT=15001
CM_RESOURCE_FILE="/home/tibero/tibero6/config/cm1_res"

-- 왜,, why
-- cm1.tip 에서 LOCAL_CLUSTER_PORT와 cmrctl network 의 portno 은 다르게 해야함..
cmrctl network의 portno이 잡고 있어서 tbboot가 안됐었다ㅠ

cmrctl

cmrctl add network --name net1 --nettype private --ipaddr 192.168.0.67 --portno 20001
-- cmrctl start network --name net1 알아서 됨
cmrctl add cluster --name cls --incnet net1 --cfile "/home/tibero/tibero_data/cfile"
cmrctl start cluster --name cls
cmrctl add service --name tibero2 --cname cls
cmrctl add db --name eun2 --svcname tibero2 --dbhome $TB_HOME

--service name이 DBNAME임

database create + undo, redo 추가

create database "tibero2"
user sys identified by tibero
maxdatafiles 4096
character set UTF8
national character set UTF16
logfile group 0 ('/home/tibero/tibero_data/eun2/redo/redo01.redo','/home/tibero/tibero_data/eun2/redo/redo02.redo') size 200m,
group 1 ('/home/tibero/tibero_data/eun2/redo/redo11.redo','/home/tibero/tibero_data/eun2/redo/redo12.redo') size 200m,
group 2 ('/home/tibero/tibero_data/eun2/redo/redo21.redo','/home/tibero/tibero_data/eun2/redo/redo22.redo') size 200m
noarchivelog
datafile 'system001.dtf' size 200m autoextend on next 16m maxsize 3G
syssub datafile 'tpr_ts.dtf' size 10m reuse autoextend on next 10m maxsize 32G
default tablespace usr
datafile 'usr001.dtf' size 100m autoextend on next 16m maxsize 3G
default temporary tablespace temp
tempfile 'temp001.dtf' size 1g autoextend on next 16m maxsize 32G
undo tablespace undo0
datafile 'undo001.dtf' size 1g autoextend on next 16m maxsize 32G
;


tbsql sys/tibero

CREATE UNDO TABLESPACE UNDO1
DATAFILE 'undo002.dtf' SIZE 100M;

ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 3 '/home/tibero/tibero_data/eun2/redo/redo31.redo' size 1024M;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 4 '/home/tibero/tibero_data/eun2/redo/redo41.redo' size 1024M;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 5 '/home/tibero/tibero_data/eun2/redo/redo51.redo' size 1024M;

alter database enable public thread 1;


--솔직히 경로도 마음에 안들고 어후 왜 이렇게 한번에 착착 못할까
--system.sh 돌리셈

NODE2

.bash_profile

export TB_HOME=/home/tibero/tibero6
export TB_SID=eun3
export LD_LIBRARY_PATH=$ TB_HOME/lib:$ TB_HOME/client/lib:$ LD_LIBRARY_PATH
export PATH=$ PATH:$ TB_HOME/bin:$ TB_HOME/client/bin:$PATH

export CM_HOME=/home/tibero/tibero6
export CM_SID=cm2

eun3.tip

DB_NAME=tibero2
LISTENER_PORT=8649
CONTROL_FILES="/home/tibero/tac/control/c1.ctl"

MAX_SESSION_COUNT=20
TOTAL_SHM_SIZE=2G
MEMORY_TARGET=4G

CLUSTER_DATABASE=Y
THREAD=1
UNDO_TABLESPACE=UNDO1

LOCAL_CLUSTER_ADDR=192.168.0.67
LOCAL_CLUSTER_PORT=30002
CM_PORT=15002

cm2.tip

CM_NAME=cm2
CM_UI_PORT=15002
CM_RESOURCE_FILE="/home/tibero/tibero6/config/cm2_res"

cmrctl

cmrctl add network --name net2 --nettype private --ipaddr 192.168.0.67 --portno 20002
cmrctl add cluster --name cls --incnet net2 --cfile "/home/tibero/tibero_data/cfile"
cmrctl start cluster --name cls
-- cmrctl add service --name tibero2 --cname cls
-- cmrctl add db --name eun3 --svcname tibero2 --dbhome $TB_HOME

--정상으로 cluster 까지 start하면 service, db 등록됨


tbdsn.tbr

tac=(
(INSTANCE=(HOST=localhost)
(PORT=8639)
(DB_NAME=tibero2)
)
(INSTANCE=(HOST=localhost)
(PORT=8649)
(DB_NAME=tibero2)
)
(LOAD_BALANCE=Y)
(USE_FAILOVER=Y)
)

0개의 댓글