> For the complete documentation index, see [llms.txt](https://docs.tibero.com/prosync/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tibero.com/prosync/installation/examples/cluster-to-cluster-tac.md).

# Cluster to Cluster (TAC예시)

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

### 1. Agent 설치

#### prs\_install\_agent.cfg 예시

{% code collapsedlinecount="10" %}

```
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
```

{% endcode %}

#### agent 설치 및 설치 결과 예시

{% code collapsedlinecount="10" %}

```bash
$ cd $PRS_HOME/install
$ ./prs_install_agent.sh
```

{% endcode %}

<pre class="language-bash" data-collapsed-line-count="10"><code class="lang-bash"><strong>********************************************************************************
</strong>* 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.
</code></pre>

### 2. Instance 설치

#### prs\_install.cfg 설정 예시

{% code collapsedlinecount="10" %}

```bash
############################################
#
# 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
#AUTO_SYNC_ON_CREATE=N

# (for Tibero Standby Cluster source synchronization)
# When USE_TSC=Y, set SRC_DB_NAME to the readable standby alias and
# SRC_PRIMARY_DB_NAME to the writable primary alias.
#USE_TSC=N
#SRC_PRIMARY_DB_NAME=

# (for TAC-TSC) per-instance writable primary aliases, parallel to
# SRC_DB_ALIAS_N.
#SRC_PRIMARY_DB_ALIAS_0=
#SRC_PRIMARY_DB_ALIAS_1=

# (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 DB Only)
#SUPP_LOG_LVL_ALL=N

# (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

```

{% endcode %}

#### instance 설치 및 설치 결과 예시

{% code collapsedlinecount="10" %}

```bash
$ cd $PRS_HOME/install
$ ./prs_install.sh
```

{% endcode %}

아래 출력은 다른 설정으로 수행한 설치의 예시이므로, 인스턴스명·사용자·Agent 배치 등 일부 값이 위 설정 파일과 다를 수 있다.

{% code collapsedlinecount="10" %}

```bash
********************************************************************************
* 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 processes 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
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
Checking log mining parameters [tibero1]... ok
Checking log mining parameters [tibero2]... ok
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 TAC2TAC... ok
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
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
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 
*
********************************************************************************


```

{% endcode %}

### 3. Prosync 실행

실행 절차는 [ProSync 실행](/prosync/installation/execution.md) 문서를 참고한다.

***

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

### 1. Agent 설치

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

#### prs\_install\_agent.cfg 예시

{% code collapsedlinecount="10" %}

```bash
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
```

{% endcode %}

#### agent 설치 및 설치 결과 예시

{% code collapsedlinecount="10" %}

```bash
$ cd $PRS_HOME/install
$ ./prs_install_agent.sh
```

{% endcode %}

<pre class="language-bash" data-collapsed-line-count="10"><code class="lang-bash"><strong>********************************************************************************
</strong>* 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.
</code></pre>

### 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 파일 예시

{% code collapsedlinecount="10" %}

```
#-------------------------------------------------
# /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)
)

```

{% endcode %}

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

{% code collapsedlinecount="10" %}

```
#-------------------------------------------------
# /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)
)            
```

{% endcode %}

#### SRC DB 장비에서 TAR DB client에 접근할 수 있는지 확인

{% code collapsedlinecount="10" %}

```bash
$ tbsql sys/tibero@tibero_tar1
```

{% endcode %}

**접근 확인 예시**

{% code collapsedlinecount="10" %}

```bash
tbSQL 7  

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

Connected to Tibero using tibero_tar1.

SQL> 
```

{% endcode %}

### 3. Instance 설치

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

#### prs\_install.cfg 설정 예시

{% code collapsedlinecount="10" %}

```bash
############################################
#
# 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
#AUTO_SYNC_ON_CREATE=N

# (for Tibero Standby Cluster source synchronization)
# When USE_TSC=Y, set SRC_DB_NAME to the readable standby alias and
# SRC_PRIMARY_DB_NAME to the writable primary alias.
#USE_TSC=N
#SRC_PRIMARY_DB_NAME=

# (for TAC-TSC) per-instance writable primary aliases, parallel to
# SRC_DB_ALIAS_N.
#SRC_PRIMARY_DB_ALIAS_0=
#SRC_PRIMARY_DB_ALIAS_1=

# (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 DB Only)
#SUPP_LOG_LVL_ALL=N

# (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
```

{% endcode %}

#### instance 설치 및 설치 결과 예시

{% code collapsedlinecount="10" %}

```bash
$ cd $PRS_HOME/install
$ ./prs_install.sh
```

{% endcode %}

아래 출력은 다른 설정으로 수행한 설치의 예시이므로, 인스턴스명·사용자·Agent 배치 등 일부 값이 위 설정 파일과 다를 수 있다.

{% code collapsedlinecount="10" %}

```bash
********************************************************************************
* 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 processes 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
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
Checking log mining parameters [tibero1]... ok
Checking log mining parameters [tibero2]... ok
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 TAC2TAC... ok
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
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
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 
*
********************************************************************************


```

{% endcode %}

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

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

{% hint style="warning" %}
**주의**

설치 시 생성된 설정 파일들(`*.cfg`)에는 **SRC DB 장비 기준의 경로**가 포함되어 있으므로, TAR DB 장비로 복사한 후에는 **경로를 TAR DB 장비 기준으로 수정**해야 **한다.**
{% endhint %}

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

**$PRS\_HOME/config**

* prs\_adm.cfg
* \<instance\_id>\_apply1.cfg
* prs\_agent\_\<agent\_id>.cfg
* prs\_instance.map

**$PRS\_HOME/var**

**옮긴 파일 예시**

{% code collapsedlinecount="10" %}

```bash
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
```

{% endcode %}

{% code collapsedlinecount="10" %}

```bash
# var directory tree 예시
.
├── admin
│   └── log
├── agent
│   ├── agent1
│   └── agent2
└── TAC2TAC
    ├── alloc
    ├── log
    ├── lr1
    ├── path
    └── sam

```

{% endcode %}

### 5. Prosync 실행

실행 절차는 [ProSync 실행](/prosync/installation/execution.md) 문서를 참고한다.
