Document Type | Technical Information
Category | Administration
Applicable Product Versions | 6FS07, 6FS07PS, 7FS02, 7FS02PS
Document Number | TADTI020
Overview
This guide explains the method of configuring a DBLink from Tibero to Oracle by installing and operating the Gateway on the Oracle server instead of the Tibero server. (Operation with the Tibero Gateway program directly placed on the Oracle server)
Caution
DB Link usage is possible only when the Gateway process is running on the Oracle server. (Restart required after server reboot) Oracle Client and Tibero Gateway versions must be compatible. (Compatibility verification required) Since the Oracle listener port 9999 must be open, please verify the Oracle server's firewall settings.
Method
1. [Oracle Server] Copy Tibero Gateway files to Oracle server
Create a directory and upload the gw4orcl file.
$ mkdir tibero $ cd tibero $ ls gw4orcl_12c
Check the required libraries.
Caution
Be sure to verify that essential libraries (such as libclntsh.so) exist in the Oracle home directory.
$ ldd gw4orcl_12c
linux-vdso.so.1 (0x00007ffed11b1000)
libclntsh.so.12.1 => /home/oracle/db/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1 (0x00007fd226c79000)
libm.so.6 => /lib64/libm.so.6 (0x00007fd2268f7000)
libnnz12.so => /home/oracle/db/product/12.1.0/dbhome_1/lib/libnnz12.so (0x00007fd2261ae000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fd225faa000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd225d8a000)
libons.so => /home/oracle/db/product/12.1.0/dbhome_1/lib/libons.so (0x00007fd225b3c000)
libclntshcore.so.12.1 => /home/oracle/db/product/12.1.0/dbhome_1/lib/libclntshcore.so.12.1 (0x00007fd22556f000)
libipc1.so => /home/oracle/db/product/12.1.0/dbhome_1/lib/libipc1.so (0x00007fd22513c000)
libmql1.so => /home/oracle/db/product/12.1.0/dbhome_1/lib/libmql1.so (0x00007fd224ec5000)
libc.so.6 => /lib64/libc.so.6 (0x00007fd224b00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fd2248e7000)
librt.so.1 => /lib64/librt.so.1 (0x00007fd2246df000)
libaio.so.1 => /lib64/libaio.so.1 (0x00007fd2244dc000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fd2242c5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd22a713000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fd2240ad000)
2. [Oracle Server] Add TBGW_HOME environment variable
$ vi ~/.bash_profile #. Tibero export TB_HOME=/home/oracle/tibero export TBGW_HOME=$TB_HOME/client/gateway $ source ~/.bash_profile
3. [Oracle Server] Create Gateway configuration file (tbgw.cfg)
$ cd /home/oracle/tibero/client/gateway/oracle/config $ mkdir config $ cd config/ $ vi tbgw.cfg LISTENER_PORT=9999 LOG_DIR=/home/oracle/tibero/client/gateway/oracle/log LOG_LVL=2
4. [Oracle Server] Start Gateway
$ cd $TBGW_HOME $ ./gw4orcl_12c $ ps -ef | grep gw4orcl_12c oracle 3723 1 0 14:01 ? 00:00:00 ./gw4orcl_12c oracle 3739 1529 0 14:01 pts/0 00:00:00 grep --color=auto gw4orcl_12c #. Verify process $ ps -ef | grep gw4orcl_12c
5. [Tibero Server] Configure tbdsn.tbr
Enter the Oracle server IP for HOST and the Oracle LISTENER_PORT for Port.
$ vi $TB_HOME/client/config/tbdsn.tbr
oracle_remote=(
(GATEWAY=
(LISTENER=(HOST=192.168.58.20)(PORT=9999))
(TARGET=ORA)
(TX_MODE=GLOBAL)
)
)
SQL
6. [Tibero Server] Create DBLink and test connection
$ tbsql tibero/tmax SQL> create database link test connect to tibero identified by 'tmax' using 'oracle_remote'; Database Link 'TEST' created. SQL> select * from dual@test; DUMMY ----- X 1 row selected.
Verify English Data
SQL> select * from en@ora_remote; NAME ---------- THIS IS TEST 3 rows selected.
Verify Korean Data
SQL> select * from hangul@ora_remote; NAME ---------- ํ๊ธ ํ ์คํธ ์ ๋๋ค 3 rows selected.