Cluster to Cluster (TAC예시)

SRC DB와 TAR DB가 서로 같은 장비에 설치된 경우

1. Agent 설치

prs_install_agent.cfg 예시

AGENT_CNT=4

AGENT_ID_0=agent1
AGENT_HOST_0=172.19.0.11
AGENT_PORT_0=7600

AGENT_ID_1=agent2
AGENT_HOST_1=172.19.0.11
AGENT_PORT_1=7700

AGENT_ID_2=agent3
AGENT_HOST_2=172.19.0.11
AGENT_PORT_2=7800

AGENT_ID_3=agent4
AGENT_HOST_3=172.19.0.11
AGENT_PORT_3=7900

agent 설치 및 설치 결과 예시

$ cd $PRS_HOME/install
$ . prs_install_agent.sh
********************************************************************************
* Agent Install Step (1/4)
* Check System Parameters 
********************************************************************************
* Checking system type... 
Linux

* Checking PRS_HOME... 
PRS_HOME: /home/prosync/example

********************************************************************************
* Agent Install Step (2/4)
* Check install agent config file   [prs_install_agent.cfg]  
* Check Instance file               [prs_instance.map] 
********************************************************************************
* Checking configuration file... 
[/home/prosync/example/install/prs_install_agent.cfg] exists.

* Checking Agent configuration... 
parameter check for Agent[0] Started 
    AGENT_ID: agent1
    AGENT_HOST: 172.19.0.11
    AGENT_PORT: 7600
parameter check for Agent[0] Done 
parameter check for Agent[1] Started 
    AGENT_ID: agent2
    AGENT_HOST: 172.19.0.11
    AGENT_PORT: 7700
parameter check for Agent[1] Done 
parameter check for Agent[2] Started 
    AGENT_ID: agent3
    AGENT_HOST: 172.19.0.11
    AGENT_PORT: 7800
parameter check for Agent[2] Done 
parameter check for Agent[3] Started 
    AGENT_ID: agent4
    AGENT_HOST: 172.19.0.11
    AGENT_PORT: 7900
parameter check for Agent[3] Done 

* Checking prs_instance.map file... 
[/home/prosync/example/config/prs_instance.map] exists.

********************************************************************************
* Agent Install Step (3/4)
* Writing agent config file         [/home/prosync/example/install/prs_install_agent.cfg]  
* Writing Instance file             [/home/prosync/example/config/prs_instance.map] 
* Total Agent Cnt                   [4] 
********************************************************************************
* Writing all agents.. cnt: 4
* Writing Agent.. Index:           0
* Writing Agent.. AGENT_ID:        agent1
* Writing Agent.. AGENT_HOST:      172.19.0.11
* Writing Agent.. AGENT_PORT:      7600
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
File already exists... 
[/home/prosync/example/config/prs_agent_agent1.cfg]
Want to Delete ? (Y/N)
n
Skip deleteing...

* Writing Agent information... 
Agent information already exist
Want to Replace ? (Y/N)
n
Skipped... 


* Writing Agent.. Index:           1
* Writing Agent.. AGENT_ID:        agent2
* Writing Agent.. AGENT_HOST:      172.19.0.11
* Writing Agent.. AGENT_PORT:      7700
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
/home/prosync/example/config/prs_agent_agent2.cfg not found. Writing files...
Done.

* Writing Agent information... 


* Writing Agent.. Index:           2
* Writing Agent.. AGENT_ID:        agent3
* Writing Agent.. AGENT_HOST:      172.19.0.11
* Writing Agent.. AGENT_PORT:      7800
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
/home/prosync/example/config/prs_agent_agent3.cfg not found. Writing files...
Done.

* Writing Agent information... 


* Writing Agent.. Index:           3
* Writing Agent.. AGENT_ID:        agent4
* Writing Agent.. AGENT_HOST:      172.19.0.11
* Writing Agent.. AGENT_PORT:      7900
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
/home/prosync/example/config/prs_agent_agent4.cfg not found. Writing files...
Done.

* Writing Agent information... 


* Creating var directory...
   * Already Created.
********************************************************************************
* Agent Install Step (4/4)
* Creating files for CM
********************************************************************************
There's no AGENT_CM_ID, finishing installation
Agent installation Done.

2. Instance 설치

prs_install.cfg 설정 예시

############################################
#
# ProSync Installation Parameters
#
############################################

# (Mandatory)
INSTANCE_ID=TAC2TAC
PRS_USER=TAC2TAC
PRS_PWD=TAC2TAC

# (Optional)
#PRS_TS_NAME=
#PRS_TS_FILE=
#PRS_TS_SIZE=
#PRS_SKIP_USER_CREATE=N
#PRS_TARGET_MIN_PRIVILEGE=N
#PRS_LOG_DIR=
#LOG_BACKUP_DIR=
#CREATE_DSN_FILE=N
#DSN_DIR=
#DSN_FILE=#need DSN_DIR

############################################
#
# ProSync Processes Informations for Instance Map
#
############################################
### (Optional)
AGENT_LIST_DELIMITER=,

### (Mandatory)
# Ext process
## Ext cnt must be the same as SRC_DB_CNT
EXT_CNT=2
EXT_AGENT_ID_LIST_0=agent1,agent2
EXT_AGENT_ID_LIST_1=agent2,agent1

# Apply process
APPLY_PORT=7620
APPLY_AGENT_ID_LIST=agent3

# Llob process
LLOB_PORT=7630
LLOB_AGENT_ID_LIST=agent1,agent2

############################################
#
# Source database informations
#
############################################

# (Mandatory)
SRC_DB_TYPE=TIBERO
SRC_DB_NAME=tibero
SRC_INSTALL_USER=sys
SRC_INSTALL_PWD=tibero

# (Optional)
#AUTO_ADD_SUPP_LOG=Y
#SRC_SKIP_TS_CREATE=N

# (Number Of Database Instances)
SRC_DB_CNT=2

# (Dsn)
#SRC_DB_REAL_NAME=
#SRC_DB_IP_0=
#SRC_DB_PORT_0=
#SRC_DB_IP_1=
#SRC_DB_PORT_1=

# (for Cluster, only Extract Needed)
SRC_DB_ALIAS_0=tibero1
SRC_DB_ALIAS_1=tibero2

# (for Oracle Logminer only)
# Oracle 11g or less, use utl_file_dir instead of DICT_FILE_DIR
#USE_LOGMNR=Y
#DICT_FILE_DIR=

# (for MySQL only)
#PRS_EXT_IP=

############################################
#
# Target database informations
#
############################################

# (Mandatory)
TAR_DB_TYPE=TIBERO
TAR_DB_NAME=tibero_tar
TAR_INSTALL_USER=sys
TAR_INSTALL_PWD=tibero

# (Optional)
#TAR_SKIP_TS_CREATE=N

# (Number Of Database Instances)
TAR_DB_CNT=2

# (Dsn)
#TAR_DB_REAL_NAME=
#TAR_DB_IP_0=
#TAR_DB_PORT_0=
#TAR_DB_IP_1=
#TAR_DB_PORT_1=

# (for MySQL only)
#PRS_APPLY_IP=

# (for multi thread)
#GROUP_NUM=1

# (for TDE(transparent data encryption) synchronization)
#USE_TDE=N

instance 설치 및 설치 결과 예시

$ cd $PRS_HOME/install
$ . prs_install.sh
********************************************************************************
* Check System Parameters (1/5)
********************************************************************************
Checking system type... Linux
Checking PRS_HOME... /home/prosync/example
Checking TB_HOME... /home/tibero/tibero/tibero7
Checking ORACLE_HOME... not found
Checking psql ... not available
Checking psql service ...not found

********************************************************************************
* Check Installation Parameters (2/5)
********************************************************************************
Checking configuration file... ok
Checking prs_instance.map file... ok
Checking Instance Id from prs_instance.map...
* instance information for TAC2TAC was not found. It will be written in this script...
ok
Checking proecsses infos...
* Checking Ext processes Informations... EXT_CNT: 2
* Delimiter: [,]
   * Ext[0] process's Agent Id List 
       * Agent ID[agent1]
       * [agent1] found.
       * Agent ID[agent2]
       * [agent2] found.
   * Ext[1] process's Agent Id List 
       * Agent ID[agent2]
       * [agent2] found.
       * Agent ID[agent1]
       * [agent1] found.
* Checking Apply process Informations...
* Checking Apply Port..
   * APPLY_PORT=[7620]
* Checking Apply process's Agent Id List..
       * Agent ID[agent3]
       * [agent3] found.
       * Agent ID[agent4]
       * [agent4] found.
* Checking Llob process Informations...
* Checking Llob Port..
   * LLOB_PORT=[7630]
* Checking Llob process's Agent Id List..
       * Agent ID[agent1]
       * [agent1] found.
       * Agent ID[agent2]
       * [agent2] found.

Checking INSTANCE_ID... TAC2TAC
Checking PRS_USER... TAC2TAC
Checking PRS_TS_NAME... TAC2TAC_ts
Checking PRS_TS_FILE... TAC2TAC_ts.dtf
Checking PRS_TS_SIZE... 1G
Checking PRS_EXT_IP... %
Checking PRS_APPLY_IP... %
Checking SRC_DB_CNT... 2
Checking SRC_DB_TYPE... TIBERO
Checking SRC_INSTALL_USER... sys
Checking SRC_DB_NAME... tibero
Checking source connection(1/2)... ok
Checking source connection(2/2)... ok
_list_create: Variable TAR_DB_IP_0 is undefined or empty.
_list_create: Variable TAR_DB_PORT_0 is undefined or empty.
Checking TAR_DB_TYPE... TIBERO
Checking TAR_INSTALL_USER... sys
Checking TAR_DB_NAME... tibero_tar
Checking target connection [tibero_tar](1/2)... ok
Checking target connection [tibero_tar](2/2)... ok

********************************************************************************
* Install to Source Database (3/5)
********************************************************************************
Checking archived log mode... ok
Usage: _list_get <list> <index>
Checking log mining parameters [tibero1]... ok
Checking log mining parameters [tibero2]... ok
Usage: _list_get <list> <index>
Get Archive log directory [tibero1]... ok
Get Archive log format [tibero1]... ok
Get Archive log directory [tibero2]... ok
Get Archive log format [tibero2]... ok
Dropping ProSync objects... ok
Dropping ProSync tablespace... DROP TABLESPACE instance_ts INCLUDING CONTENTS AND DATAFILES;

done

ok
Creating ProSync tablespace... ok
Dropping ProSync user... ok
Creating ProSync user... ok
Granting privileges... ok
Granting privileges for trigger... ok
Creating ProSync internal tables... ok
Creating ProSync internal package... ok
Creating ProSync internal trigger... ok
Prosync user TAC2TAC to uppercase TAC2TACok
Checking source object file(group num : 1)... ok
Building source object for TEST%.%... ok
Adding table supplemental log... 4, and one for prosync
  "TAC2TAC"."PRS_DUMMY_TBL" : Supplemental logging set
  "TEST"."T1" : supplemental log already exists, continue.
  "TEST"."T2" : supplemental log already exists, continue.
  "TEST"."T3" : supplemental log already exists, continue.
  TAC2TAC.PRS_DUMMY_TBL : supplemental log already exists, continue.
Counting total source objects... 4
Generating initial DDL history... ok
Checking initial DDL history... ok
Insert default value in PRS_DUMMY_TBL...ok
Querying NLS_CHARACTERSET... UTF8
Querying NLS_NCHAR_CHARACTERSET... UTF16
Switching logfile [tibero1]... ok
Switching logfile [tibero2]... ok
Usage: _list_get <list> <index>
Querying current log sequence [tibero1]... 8
Querying current log sequence [tibero2]... 8
Querying current snapshot#... 93289


********************************************************************************
* Install to Target Database (4/5)
********************************************************************************
Dropping ProSync objects... ok
Dropping ProSync tablespace... DROP TABLESPACE TAC2TAC_ts INCLUDING CONTENTS AND DATAFILES;

done

ok
Creating ProSync tablespace... ok
Dropping ProSync user... ok
Creating ProSync user... ok
Granting privileges... ok
Creating ProSync internal tables... ok
Generating initial construct history [tibero1 (group 1)]... ok
Generating initial construct history [tibero2 (group 1)]... ok
Generating initial commit history... ok

********************************************************************************
* Generate Configuration Parameters (5/5)
********************************************************************************
Generating Wallet... ok
Usage: _list_get <list> <index>
Generating Extract [tibero1] configuration...  ok
Generating Extract [tibero2] configuration...  ok
Generating Apply [tibero_tar] configuration...  ok
Generating LONG/LOB configuration...  ok
Generating instance map to prs_instance.map ...


********************************************************************************
* ProSync is installed successfully on Fri, 18 Apr 2025 02:01:32 +0000.
*
*   PRS_HOME     = /home/prosync/example
*   Binary Path  = /home/prosync/example/bin
*   ProSync User = TAC2TAC
*
*   Archived Log Path     = /home/tibero/tibero/tibero7/database/tibero/archive/
*   Archived Log Format   = log-t%t-r%r-s%s.arc
*   Initial log sequence# = 9
*
*   Archived Log Path     = /home/tibero/tibero/tibero7/database/tibero/archive/
*   Archived Log Format   = log-t%t-r%r-s%s.arc
*   Initial log sequence# = 9
*
*   Initial change# (TSN) = 94003 
*
********************************************************************************

3. Prosync 실행

$ prs_adm
ProSync 4 - Admin Utility

TmaxData Corporation Copyright (c) 2024-. All rights reserved.


Admin> start agent agent1

*** Startup Agent Process... [agent1]

        Process 'prs_agent' started.



Admin> start agent agent2

*** Startup Agent Process... [agent2]

        Process 'prs_agent' started.



Admin> start agent agent3

*** Startup Agent Process... [agent3]

        Process 'prs_agent' started.



Admin> start agent agent4

*** Startup Agent Process... [agent4]

        Process 'prs_agent' started.



Admin> start TAC2TAC

*** Startup Process... [TAC2TAC_ext1]

        Process 'TAC2TAC_ext1' started.

*** Startup Process... [TAC2TAC_ext2]

        Process 'TAC2TAC_ext2' started.

*** Startup Process... [TAC2TAC_apply1]

        Process 'TAC2TAC_apply1' started.

*** Startup Process... [TAC2TAC_llob]

        Process 'TAC2TAC_llob' started.


SRC DB와 TAR DB가 서로 다른 장비에 설치된 경우

1. Agent 설치

SRC DB가 설치된 장비에서 Agent를 설치한다.

prs_install_agent.cfg 예시

AGENT_CNT=4

AGENT_ID_0=agent1
AGENT_HOST_0=172.19.0.11
AGENT_PORT_0=7600

AGENT_ID_1=agent2
AGENT_HOST_1=172.19.0.12
AGENT_PORT_1=7700

AGENT_ID_2=agent3
AGENT_HOST_2=172.19.0.13
AGENT_PORT_2=7800

AGENT_ID_3=agent4
AGENT_HOST_3=172.19.0.14
AGENT_PORT_3=7900

agent 설치 및 설치 결과 예시

$ cd $PRS_HOME/install
$ . prs_install_agent.sh
********************************************************************************
* Agent Install Step (1/4)
* Check System Parameters 
********************************************************************************
* Checking system type... 
Linux

* Checking PRS_HOME... 
PRS_HOME: /home/prosync/example

********************************************************************************
* Agent Install Step (2/4)
* Check install agent config file   [prs_install_agent.cfg]  
* Check Instance file               [prs_instance.map] 
********************************************************************************
* Checking configuration file... 
[/home/prosync/example/install/prs_install_agent.cfg] exists.

* Checking Agent configuration... 
parameter check for Agent[0] Started 
    AGENT_ID: agent1
    AGENT_HOST: 172.19.0.11
    AGENT_PORT: 7600
parameter check for Agent[0] Done 
parameter check for Agent[1] Started 
    AGENT_ID: agent2
    AGENT_HOST: 172.19.0.12
    AGENT_PORT: 7700
parameter check for Agent[1] Done 
parameter check for Agent[2] Started 
    AGENT_ID: agent3
    AGENT_HOST: 172.19.0.13
    AGENT_PORT: 7800
parameter check for Agent[2] Done 
parameter check for Agent[3] Started 
    AGENT_ID: agent4
    AGENT_HOST: 172.19.0.14
    AGENT_PORT: 7900
parameter check for Agent[3] Done 

* Checking prs_instance.map file... 
[/home/prosync/example/config/prs_instance.map] exists.

********************************************************************************
* Agent Install Step (3/4)
* Writing agent config file         [/home/prosync/example/install/prs_install_agent.cfg]  
* Writing Instance file             [/home/prosync/example/config/prs_instance.map] 
* Total Agent Cnt                   [4] 
********************************************************************************
* Writing all agents.. cnt: 4
* Writing Agent.. Index:           0
* Writing Agent.. AGENT_ID:        agent1
* Writing Agent.. AGENT_HOST:      172.19.0.11
* Writing Agent.. AGENT_PORT:      7600
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
File already exists... 
[/home/prosync/example/config/prs_agent_agent1.cfg]
Want to Delete ? (Y/N)
n
Skip deleteing...

* Writing Agent information... 
Agent information already exist
Want to Replace ? (Y/N)
n
Skipped... 


* Writing Agent.. Index:           1
* Writing Agent.. AGENT_ID:        agent2
* Writing Agent.. AGENT_HOST:      172.19.0.12
* Writing Agent.. AGENT_PORT:      7700
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
/home/prosync/example/config/prs_agent_agent2.cfg not found. Writing files...
Done.

* Writing Agent information... 


* Writing Agent.. Index:           2
* Writing Agent.. AGENT_ID:        agent3
* Writing Agent.. AGENT_HOST:      172.19.0.13
* Writing Agent.. AGENT_PORT:      7800
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
/home/prosync/example/config/prs_agent_agent3.cfg not found. Writing files...
Done.

* Writing Agent information... 


* Writing Agent.. Index:           3
* Writing Agent.. AGENT_ID:        agent4
* Writing Agent.. AGENT_HOST:      172.19.0.14
* Writing Agent.. AGENT_PORT:      7900
* Writing Agent.. AGENT_CM_GROUP:  
* Writing Agent.. AGENT_CM_ID:     
* Writing Agent configuration... 
/home/prosync/example/config/prs_agent_agent4.cfg not found. Writing files...
Done.

* Writing Agent information... 


* Creating var directory...
   * Already Created.
********************************************************************************
* Agent Install Step (4/4)
* Creating files for CM
********************************************************************************
There's no AGENT_CM_ID, finishing installation
Agent installation Done.

2. tbdsn.tbr 설정

SRC DB 장비에서 TAR DB Client 접근을 위한 tbdsn.tbr 설정으로, src db 장비에서 instance를 설치하기 위해서 src db 장비에서 tar db client에 접근할 수 있어야 한다. 이를 위해 src db 장비의 tbdsn.tbr 파일에 tar db 정보를 추가해야 한다.

TAR DB tbdsn.tbr 파일 예시

#-------------------------------------------------
# /home/tibero_tar/tibero/tibero7/client/config/tbdsn.tbr
# Network Configuration File.
# Generated by gen_tip_for_tac.sh at Thu Apr 17 10:51:54 UTC 2025

#-------------------------------------------------
# Appended by gen_tip_for_tac.sh at Thu Apr 17 10:51:54 UTC 2025

tibero_tar1=(
    (INSTANCE=(HOST=172.19.0.13)
              (PORT=8620)
              (DB_NAME=tibero_tar)
    )
)
tibero_tar1priv=(
    (INSTANCE=(HOST=172.19.0.13)
              (PORT=8621)
              (DB_NAME=tibero_tar)
    )
)

#-------------------------------------------------
# Appended by gen_tip_for_tac.sh at Thu Apr 17 10:51:54 UTC 2025

tibero_tar2=(
    (INSTANCE=(HOST=172.19.0.14)
              (PORT=8650)
              (DB_NAME=tibero_tar)
    )
)
tibero_tar2priv=(
    (INSTANCE=(HOST=172.19.0.14)
              (PORT=8651)
              (DB_NAME=tibero_tar)
    )
)

tibero_tar=(
    (INSTANCE=(HOST=172.19.0.13)
              (PORT=8620)
              (DB_NAME=tibero_tar)
    )
    (INSTANCE=(HOST=172.19.0.14)
              (PORT=8650)
              (DB_NAME=tibero_tar)
    )
    #(LOAD_BALANCE=Y)
)

SRC DB 장비에 TAR DB 정보를 반영한 tbdsn.tbr 예시

#-------------------------------------------------
# /home/tibero/tibero/tibero7/client/config/tbdsn.tbr
# Network Configuration File.
# Generated by gen_tip_for_tac.sh at Thu Apr 17 10:19:44 UTC 2025

#-------------------------------------------------
# Appended by gen_tip_for_tac.sh at Thu Apr 17 10:19:44 UTC 2025

tibero1=(
    (INSTANCE=(HOST=172.19.0.11)
              (PORT=8620)
              (DB_NAME=tibero)
    )
)
tibero1priv=(
    (INSTANCE=(HOST=172.19.0.11)
              (PORT=8621)
              (DB_NAME=tibero)
    )
)

#-------------------------------------------------
# Appended by gen_tip_for_tac.sh at Thu Apr 17 10:19:44 UTC 2025

tibero2=(
    (INSTANCE=(HOST=172.19.0.12)
              (PORT=8650)
              (DB_NAME=tibero)
    )
)
tibero2priv=(
    (INSTANCE=(HOST=172.19.0.12)
              (PORT=8651)
              (DB_NAME=tibero)
    )
)

tibero=(
    (INSTANCE=(HOST=172.19.0.11)
              (PORT=8620)
              (DB_NAME=tibero)
    )
    (INSTANCE=(HOST=172.19.0.12)
              (PORT=8650)
              (DB_NAME=tibero)
    )
    #(LOAD_BALANCE=Y)
)

#-------------------------------------------------
# Appended by gen_tip_for_tac.sh at Thu Apr 17 10:51:54 UTC 2025

tibero_tar1=(
    (INSTANCE=(HOST=172.19.0.13)
              (PORT=8620)
              (DB_NAME=tibero_tar)
    )
)
tibero_tar1priv=(
    (INSTANCE=(HOST=172.19.0.13)
              (PORT=8621)
              (DB_NAME=tibero_tar)
    )
)

#-------------------------------------------------
# Appended by gen_tip_for_tac.sh at Thu Apr 17 10:51:54 UTC 2025

tibero_tar2=(
    (INSTANCE=(HOST=172.19.0.14)
              (PORT=8650)
              (DB_NAME=tibero_tar)
    )
)
tibero_tar2priv=(
    (INSTANCE=(HOST=172.19.0.14)
              (PORT=8651)
              (DB_NAME=tibero_tar)
    )
)

tibero_tar=(
    (INSTANCE=(HOST=172.19.0.13)
              (PORT=8620)
              (DB_NAME=tibero_tar)
    )
    (INSTANCE=(HOST=172.19.0.14)
              (PORT=8650)
              (DB_NAME=tibero_tar)
    )
    #(LOAD_BALANCE=Y)
)            

SRC DB 장비에서 TAR DB client로 접근 가능여부 확인

$ tbsql sys/tibero@tibero_tar1

접근 확인 예시

tbSQL 7  

TmaxTibero Corporation Copyright (c) 2020-. All rights reserved.

Connected to Tibero using tibero_tar1.

SQL> 

3. Instance 설치

SRC DB가 설치된 장비에서 Instance를 설치한다.

prs_install.cfg 설정 예시

############################################
#
# ProSync Installation Parameters
#
############################################

# (Mandatory)
INSTANCE_ID=TAC2TAC
PRS_USER=TAC2TAC
PRS_PWD=TAC2TAC

# (Optional)
#PRS_TS_NAME=
#PRS_TS_FILE=
#PRS_TS_SIZE=
#PRS_SKIP_USER_CREATE=N
#PRS_TARGET_MIN_PRIVILEGE=N
#PRS_LOG_DIR=
#LOG_BACKUP_DIR=
#CREATE_DSN_FILE=N
#DSN_DIR=
#DSN_FILE=#need DSN_DIR

############################################
#
# ProSync Processes Informations for Instance Map
#
############################################
### (Optional)
AGENT_LIST_DELIMITER=,

### (Mandatory)
# Ext process
## Ext cnt must be the same as SRC_DB_CNT
EXT_CNT=2
EXT_AGENT_ID_LIST_0=agent1,agent2
EXT_AGENT_ID_LIST_1=agent2,agent1

# Apply process
APPLY_PORT=7620
APPLY_AGENT_ID_LIST=agent3

# Llob process
LLOB_PORT=7630
LLOB_AGENT_ID_LIST=agent1,agent2

############################################
#
# Source database informations
#
############################################

# (Mandatory)
SRC_DB_TYPE=TIBERO
SRC_DB_NAME=tibero
SRC_INSTALL_USER=sys
SRC_INSTALL_PWD=tibero

# (Optional)
#AUTO_ADD_SUPP_LOG=Y
#SRC_SKIP_TS_CREATE=N

# (Number Of Database Instances)
SRC_DB_CNT=2

# (Dsn)
#SRC_DB_REAL_NAME=
#SRC_DB_IP_0=
#SRC_DB_PORT_0=
#SRC_DB_IP_1=
#SRC_DB_PORT_1=

# (for Cluster, only Extract Needed)
SRC_DB_ALIAS_0=tibero1
SRC_DB_ALIAS_1=tibero2

# (for Oracle Logminer only)
# Oracle 11g or less, use utl_file_dir instead of DICT_FILE_DIR
#USE_LOGMNR=Y
#DICT_FILE_DIR=

# (for MySQL only)
#PRS_EXT_IP=

############################################
#
# Target database informations
#
############################################

# (Mandatory)
TAR_DB_TYPE=TIBERO
TAR_DB_NAME=tibero_tar
TAR_INSTALL_USER=sys
TAR_INSTALL_PWD=tibero

# (Optional)
#TAR_SKIP_TS_CREATE=N

# (Number Of Database Instances)
TAR_DB_CNT=2

# (Dsn)
#TAR_DB_REAL_NAME=
#TAR_DB_IP_0=
#TAR_DB_PORT_0=
#TAR_DB_IP_1=
#TAR_DB_PORT_1=

# (for MySQL only)
#PRS_APPLY_IP=

# (for multi thread)
#GROUP_NUM=1

# (for TDE(transparent data encryption) synchronization)
#USE_TDE=N

instance 설치 및 설치 결과 예시

$ cd $PRS_HOME/install
$ . prs_install.sh
********************************************************************************
* Check System Parameters (1/5)
********************************************************************************
Checking system type... Linux
Checking PRS_HOME... /home/prosync/example
Checking TB_HOME... /home/tibero/tibero/tibero7
Checking ORACLE_HOME... not found
Checking psql ... not available
Checking psql service ...not found

********************************************************************************
* Check Installation Parameters (2/5)
********************************************************************************
Checking configuration file... ok
Checking prs_instance.map file... ok
Checking Instance Id from prs_instance.map...
* instance information for TAC2TAC was not found. It will be written in this script...
ok
Checking proecsses infos...
* Checking Ext processes Informations... EXT_CNT: 2
* Delimiter: [,]
   * Ext[0] process's Agent Id List 
       * Agent ID[agent1]
       * [agent1] found.
       * Agent ID[agent2]
       * [agent2] found.
   * Ext[1] process's Agent Id List 
       * Agent ID[agent2]
       * [agent2] found.
       * Agent ID[agent1]
       * [agent1] found.
* Checking Apply process Informations...
* Checking Apply Port..
   * APPLY_PORT=[7620]
* Checking Apply process's Agent Id List..
       * Agent ID[agent3]
       * [agent3] found.
       * Agent ID[agent4]
       * [agent4] found.
* Checking Llob process Informations...
* Checking Llob Port..
   * LLOB_PORT=[7630]
* Checking Llob process's Agent Id List..
       * Agent ID[agent1]
       * [agent1] found.
       * Agent ID[agent2]
       * [agent2] found.

Checking INSTANCE_ID... TAC2TAC
Checking PRS_USER... TAC2TAC
Checking PRS_TS_NAME... TAC2TAC_ts
Checking PRS_TS_FILE... TAC2TAC_ts.dtf
Checking PRS_TS_SIZE... 1G
Checking PRS_EXT_IP... %
Checking PRS_APPLY_IP... %
Checking SRC_DB_CNT... 2
Checking SRC_DB_TYPE... TIBERO
Checking SRC_INSTALL_USER... sys
Checking SRC_DB_NAME... tibero
Checking source connection(1/2)... ok
Checking source connection(2/2)... ok
_list_create: Variable TAR_DB_IP_0 is undefined or empty.
_list_create: Variable TAR_DB_PORT_0 is undefined or empty.
Checking TAR_DB_TYPE... TIBERO
Checking TAR_INSTALL_USER... sys
Checking TAR_DB_NAME... tibero_tar
Checking target connection [tibero_tar](1/2)... ok
Checking target connection [tibero_tar](2/2)... ok

********************************************************************************
* Install to Source Database (3/5)
********************************************************************************
Checking archived log mode... ok
Usage: _list_get <list> <index>
Checking log mining parameters [tibero1]... ok
Checking log mining parameters [tibero2]... ok
Usage: _list_get <list> <index>
Get Archive log directory [tibero1]... ok
Get Archive log format [tibero1]... ok
Get Archive log directory [tibero2]... ok
Get Archive log format [tibero2]... ok
Dropping ProSync objects... ok
Dropping ProSync tablespace... DROP TABLESPACE instance_ts INCLUDING CONTENTS AND DATAFILES;

done

ok
Creating ProSync tablespace... ok
Dropping ProSync user... ok
Creating ProSync user... ok
Granting privileges... ok
Granting privileges for trigger... ok
Creating ProSync internal tables... ok
Creating ProSync internal package... ok
Creating ProSync internal trigger... ok
Prosync user TAC2TAC to uppercase TAC2TACok
Checking source object file(group num : 1)... ok
Building source object for TEST%.%... ok
Adding table supplemental log... 4, and one for prosync
  "TAC2TAC"."PRS_DUMMY_TBL" : Supplemental logging set
  "TEST"."T1" : supplemental log already exists, continue.
  "TEST"."T2" : supplemental log already exists, continue.
  "TEST"."T3" : supplemental log already exists, continue.
  TAC2TAC.PRS_DUMMY_TBL : supplemental log already exists, continue.
Counting total source objects... 4
Generating initial DDL history... ok
Checking initial DDL history... ok
Insert default value in PRS_DUMMY_TBL...ok
Querying NLS_CHARACTERSET... UTF8
Querying NLS_NCHAR_CHARACTERSET... UTF16
Switching logfile [tibero1]... ok
Switching logfile [tibero2]... ok
Usage: _list_get <list> <index>
Querying current log sequence [tibero1]... 8
Querying current log sequence [tibero2]... 8
Querying current snapshot#... 93289


********************************************************************************
* Install to Target Database (4/5)
********************************************************************************
Dropping ProSync objects... ok
Dropping ProSync tablespace... DROP TABLESPACE TAC2TAC_ts INCLUDING CONTENTS AND DATAFILES;

done

ok
Creating ProSync tablespace... ok
Dropping ProSync user... ok
Creating ProSync user... ok
Granting privileges... ok
Creating ProSync internal tables... ok
Generating initial construct history [tibero1 (group 1)]... ok
Generating initial construct history [tibero2 (group 1)]... ok
Generating initial commit history... ok

********************************************************************************
* Generate Configuration Parameters (5/5)
********************************************************************************
Generating Wallet... ok
Usage: _list_get <list> <index>
Generating Extract [tibero1] configuration...  ok
Generating Extract [tibero2] configuration...  ok
Generating Apply [tibero_tar] configuration...  ok
Generating LONG/LOB configuration...  ok
Generating instance map to prs_instance.map ...


********************************************************************************
* ProSync is installed successfully on Fri, 18 Apr 2025 02:01:32 +0000.
*
*   PRS_HOME     = /home/prosync/example
*   Binary Path  = /home/prosync/example/bin
*   ProSync User = TAC2TAC
*
*   Archived Log Path     = /home/tibero/tibero/tibero7/database/tibero/archive/
*   Archived Log Format   = log-t%t-r%r-s%s.arc
*   Initial log sequence# = 9
*
*   Archived Log Path     = /home/tibero/tibero/tibero7/database/tibero/archive/
*   Archived Log Format   = log-t%t-r%r-s%s.arc
*   Initial log sequence# = 9
*
*   Initial change# (TSN) = 94003 
*
********************************************************************************

4. 설치 파일 및 디렉토리 이동

TAR DB 장비 Prosync 디렉토리에 설치 파일 및 디렉토리를 옮긴다. ProSync는 SRC DB 장비에서만 설치되었기 때문에, TAR DB 장비에서도 ProSync를 기동하려면 SRC DB 장비에서 설치 후 생성된 파일 및 디렉토리를 TAR DB 장비로 복사해야 한다.

복사 필요한 파일 및 디렉토리

$PRS_HOME/config

  • prs_adm.cfg

  • <instance_id>_apply1.cfg

  • prs_agent_<agent_id>.cfg

  • prs_instance.map

$PRS_HOME/var

옮긴 파일 예시

total 36
drwxr-xr-x 3 tibero tibero 4096 Apr 18 02:15 ./
drwxr-xr-x 8 tibero tibero 4096 Apr 18 02:24 ../
-rw-r--r-- 1 tibero tibero  534 Apr 18 02:15 TAC2TAC_apply1.cfg
-rw-r--r-- 1 tibero tibero  339 Apr 18 02:15 prs_adm.cfg
-rw-r--r-- 1 tibero tibero  353 Apr 18 02:15 prs_agent_agent3.cfg
-rw-r--r-- 1 tibero tibero  353 Apr 18 02:15 prs_agent_agent4.cfg
-rw-r--r-- 1 tibero tibero 1262 Apr 18 02:07 prs_instance.map
drwxr-xr-x 2 tibero tibero 4096 Apr 17 10:51 templates/
-rw-r--r-- 1 tibero tibero    5 Feb  5 04:59 variant
# var directory tree 예시
.
├── admin
│   └── log
├── agent
│   ├── agent1
│   └── agent2
└── TAC2TAC
    ├── alloc
    ├── log
    ├── lr1
    ├── path
    └── sam

5. Prosync 실행

$ prs_adm

5.1. SRC DB agent 실행

A. 1번 Node

ProSync 4 - Admin Utility
TmaxData Corporation Copyright (c) 2024-. All rights reserved.

Admin> start agent agent1

*** Startup Agent Process... [agent1]
        Process 'prs_agent' started.

B. 2번 Node

ProSync 4 - Admin Utility
TmaxData Corporation Copyright (c) 2024-. All rights reserved.

Admin> start agent agent2

*** Startup Agent Process... [agent2]
        Process 'prs_agent' started.

5.2. TAR DB agent 실행

A. 1번 Node

ProSync 4 - Admin Utility
TmaxData Corporation Copyright (c) 2024-. All rights reserved.

Admin> start agent agent3

*** Startup Agent Process... [agent3]
        Process 'prs_agent' started.

B. 2번 Node

ProSync 4 - Admin Utility
TmaxData Corporation Copyright (c) 2024-. All rights reserved.

Admin> start agent agent4

*** Startup Agent Process... [agent4]
        Process 'prs_agent' started.

5.3. SRC DB Node or TAR DB Node instance 실행

Admin> start TAC2TAC

*** Startup Process... [TAC2TAC_ext1]

        Process 'TAC2TAC_ext1' started.

*** Startup Process... [TAC2TAC_ext2]

        Process 'TAC2TAC_ext2' started.

*** Startup Process... [TAC2TAC_apply1]

        Process 'TAC2TAC_apply1' started.

*** Startup Process... [TAC2TAC_llob]

        Process 'TAC2TAC_llob' started.

Last updated