Document Type | Technical Information
Category | Interface/Integration
Applicable Product Version | 7FS02PS
Document Number | TIITI066
Overview
This guide explains how to connect a Tibero server and Oracle Database using Tibero Gateway in a Linux environment, and how to configure DBLINK to access Oracle data from Tibero.
Method
1. Oracle Environment Setup (All settings on Tibero server, no changes on Oracle)
1.1 Oracle Instant Client
It is free and allows easy setup of client applications for local or remote Oracle Database.
To connect to a remote Oracle server, download and install from the site below.
Download from the following location.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
โป The path may change due to site renewal.
โป This manual is based on LINUX OS.
Check the Oracle server version and download the โinstantclientโ of the same version.
psdblcbp:/sdiskc/oracle> sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 10 13:35:17 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Extract the โOracle instantclientโ archive. If โ$TB_HOMEโ is โ/home/tibero/tibero7โ, extract it under โ/home/tibero/โ. It is preferable to install it outside the Tibero engine directory.
[ps1@psdblcbp:/home/tibero]$ unzip instantclient-basic-linux.x64-19.21.0.0.0dbru.zip Archive: instantclient-basic-linux.x64-19.21.0.0.0dbru.zip
The extracted contents of the downloaded file are as follows.
[ps1@psdblcbp:/home/tibero/instantclient_19_21]$ ls adrci genezi libclntsh.so.10.1 libclntsh.so.18.1 libmql1.so libocci.so.10.1 libocci.so.18.1 libocijdbc19.so ojdbc8.jar xstreams.jar BASIC_LICENSE libclntshcore.so.19.1 libclntsh.so.11.1 libclntsh.so.19.1 libnnz19.so libocci.so.11.1 libocci.so.19.1 liboramysql19.so ucp.jar BASIC_README libclntsh.so libclntsh.so.12.1 libipc1.so libocci.so libocci.so.12.1 libociei.so network uidrvci
This is the configuration diagram intended in this document.
โป This is a common method for configuring DBLINK from Tibero to Oracle.
โป No additional changes or installations are required on the Oracle server in this configuration.
Create directories on the Tibero server required to start the gateway.
mkdir /home/tibero/tbgateway/
mkdir /home/tibero/tbgateway/oracle
mkdir /home/tibero/tbgateway/oracle/config
mkdir /home/tibero/tbgateway/oracle/log
vi /home/tibero/tbgateway/oracle/config/tbgw.cfg
Contents of /home/tibero/tbgateway/oracle/config/tbgw.cfg.
[ps1@psdblcbp:/home/tibero/tbgateway/oracle/config]$ cat tbgw.cfg LISTENER_PORT=9998 LOG_DIR=/home/tibero/tbgateway/oracle/log LOG_LVL=2
2. TIBERO Environment Setup
2.1 TIBERO Gateway DBLINK Configuration
Copy the gateway file. The gateway file is located in โ$TB_HOME/client/binโ.
[ps1@psdblcbp:/home/tibero/tibero7/client/bin]$ ls -al | grep gw4orcl -rwxr-xr-x. 1 ps1 psall 32118008 Apr 9 2025 gw4orcl โป You should select according to the Oracle server version, but from Tibero7 onward, the gateway is unified as one. cp -r /home/tibero/tibero7/client/bin/gw4orcl /home/tibero/tbgateway($TBGW_HOME)
In the account where Tibero is installed, set the environment in the .profile file as follows:
######## TIBERO TO ORACLE DBLINK ####### export TBGW_HOME=/home/tibero/tbgateway export ORACLE_HOME=/home/tibero/instantclient_19_21 export ORACLE_SID=orcl ## Oracle DB NAME export LIBPATH=$ORACLE_HOME:$LIBPATH export LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH export PATH=$ORACLE_HOME:$PATH
To access the Oracle server from the Tibero server, create tnsnames.ora as shown below.
[ps1@psdblcbp:/home/tibero/instantclient_19_21]$ mkdir -p network/admin [ps1@psdblcbp:/home/tibero/instantclient_19_21]$ cd network/admin/ [ps1@psdblcbp:/home/tibero/instantclient_19_21/network/admin]$ vi tnsnames.ora โป /home/tibero/instantclient_19_21 = $ORACLE_HOME โป tnsnames.ora does not exist in instantclient, so you must create it manually
Contents of $ORACLE_HOME/network/admin/tnsnames.ora.
oralink = ## (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.188)(PORT = 1525)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) ## oralink = DBLINK name (e.g., select * from dual@oralink) ## HOST = IP of Oracle server ## PORT = Port of Oracle server ## SERVICE_NAME = Service name of Oracle server
Add the following to $TB_HOME/client/config/tbdsn.tbr.
MOF = (
(GATEWAY =
(LISTENER = (HOST=192.168.1.186)(PORT=9998))
(TARGET=oralink)
(TX_MODE=GLOBAL)
)
)
## MOF = Alias name for accessing Oracle server
## HOST = IP of TIBERO server, the server where gw4orcl should run
## PORT = Port specified in tbgw.cfg, passed to tnsnames.ora
## TARGET = DBLINK name, linked to tnsnames.ora
2.2 gw4orcl ldd Check (Verify link status)
Check on the Tibero server that none of the below shows โnot foundโ.
[ps1@psdblcbp:/home/tibero]$ cd $TBGW_HOME
[ps1@psdblcbp:/home/tibero/tbgateway]$ ldd gw4orcl
linux-vdso.so.1 => (0x00007ffccc1d2000)
libclntsh.so.19.1 => /home/tibero/instantclient_19_21/libclntsh.so.19.1 (0x00007f64b0b98000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f64b097d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f64b0761000)
libm.so.6 => /lib64/libm.so.6 (0x00007f64b045f000)
libc.so.6 => /lib64/libc.so.6 (0x00007f64b0090000)
libnnz21.so => /home/tibero/instantclient_19_21/libnnz19.so (0x00007f64afa1b000)
librt.so.1 => /lib64/librt.so.1 (0x00007f64af813000)
libaio.so.1 => /lib64/libaio.so.1 (0x00007f64af610000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f64af3f6000)
/lib64/ld-linux-x86-64.so.2 (0x00007f64b4f74000)
libclntshcore.so.21.1 => /home/tibero/instantclient_19_21/libclntshcore.so.19.1 (0x00007f64aee46000)
โป Linux : LD_LIBRARY_PATH AIX : LIBPATH HP-UX : SHLIB_PATH
2.3 Service Start
Start Tibero Gateway. It runs separately from Tibero. It does not stop even if Tibero is shut down.
[ps1@psdblcbp:/home/tibero]$ cd $TBGW_HOME [ps1@psdblcbp:/home/tibero/tbgateway]$ ls -al [ps1@psdblcbp:/home/tibero/tbgateway]$ ls -al | grep gw4orcl -rwxr-xr-x. 1 ps1 psall 31775712 Apr 11 2025 gw4orcl [ps1@psdblcbp:/home/tibero/tbgateway]$ ./gw4orcl [ps1@psdblcbp:/home/tibero/tbgateway]$ ps -ef | grep gw4orcl ps1 11269 1 0 Apr11 ? 00:00:15 ./gw4orcl ps1 27231 11744 0 15:35 pts/17 00:00:00 grep --color=auto gw4orcl โป To stop the gateway process, use the kill -9 pid command.
3. DBLINK Test
3.1 TIBERO tbsql Test
Accessing the Oracle server schema via tbsql.
[ps1@psdblcbp:/home/tibero/tbgateway]$ tbsql scott/tiger@MOF tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to ORACLE GATEWAY using MOF.
Connect as tbsql sys to create a user and grant the user permission to โcreate database linkโ.
[ps1@psdblcbp:/home/tibero/tbgateway]$ tbsql sys/tibero tbSQL 7 TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Connected to Tibero. SQL> create user mofdb identified by 'mofdb'; User 'MOFDB' created. SQL> grant connect, resource to mofdb; Granted. SQL> grant create database link to mofdb; โป If the account exists, only the above SQL needs to be executed. Granted. SQL> conn mofdb/mofdb Connected to Tibero.
In this document, the Oracle scott account is used to create the db_link.
SQL> conn mofdb/mofdb Connected to Tibero. SQL> create database link oralink connect to scott identified by "tiger" using 'MOF'; Database Link 'ORALINK' created. SQL> select * from user_db_links; OWNER DB_LINK USERNAME HOST CREATED -------------------- ----------- ------------ ----------- -------------- MOFDB ORALINK SCOTT MOF 2025/12/10 1 row selected.
DB link connection test.
[ps1@psdblcbp:/home/tibero/tbgateway]$ tbsql mofdb/mofdb SQL> select * from dual@oralink; DUMMY ----- X 1 row selected.
4. References
4.1 How to Delete DBLINK
How to delete a DB_LINK in Tibero.
SQL> drop database link oralink; Database Link 'ORALINK' dropped. SQL> select * from user_db_links; 0 row selected.
4.2 Tibero & Oracle Versions
| Tibero Version | Oracle Version |
| Tibero 7.2.4 | Oracle Database 19c |