Document Type | Technical Information
Category | Interface/Integration
Document Number | TIITI029
Overview
You can use the DBLink feature to integrate Tibero with MS-SQL.
This article explains the concept and overall structure of MS-SQL DBLink, and guides you through setting the TBGW_HOME environment variable, copying and extracting the Java Gateway to prepare for integration.
MS-SQL DBLink
The DBLink feature provided by Tibero RDBMS supports querying, inserting, updating, and deleting tables on a remote MS-SQL server. MS-SQL DBLink connects through the Java Gateway and returns the query results requested by the user via the following process path.
Note
The DBLink setup was performed in the following environment.
OS: Windows
DBMS: Tibero, MS-SQL
Method
Installing Java Gateway
You can copy the Java Gateway to your desired directory and extract it to use.
For ease of management, this article specifies the TBGW_HOME environment variable and copies it to that directory to proceed with the setup.
Setting Environment Variable
Check if the
TBGW_HOME environment variable is set in the command prompt.C:\Users\kar>echo %TBGW_HOME% %TBGW_HOME%
If the output appears as above, it means the variable is not set yet. If a path is displayed, it is already set, so you can proceed to the Gateway extraction step.
You can register the environment variable at the following location:
- Setting Path
Right-click [My Computer] โ [Properties] โ [Advanced system settings] โ [Advanced] tab โ [Environment Variables] โ System Variables [New]
- Setting Value
Variable Name: TBGW_HOME
Variable Value: Gateway home directory (e.g., C:\TmaxData\gateway )
After setting, open a new command prompt window and run the command below to verify that it is properly registered.
C:\Users\kar>echo %TBGW_HOME% C:\TmaxData\gateway
Extracting Gateway
mssql Create a directory named mssql, then copy the Java Gateway compressed file located under the engine directory.C:\Users\kar>mkdir %TBGW_HOME%\mssql Tibero6 copy %TB_HOME%\client\bin\tbJavaGW.zip %TBGW_HOME%\mssql\. Tibero5 copy %TB_HOME%\client\bin\tbgateway.zip %TBGW_HOME%\mssql\.
Using a compression utility to extract the Java Gateway files will create a tbJavaGW directory.
After extraction, the directory includes the following files:
- lib: Library directory
- jgw_service.bat: Java Gateway executable (for Tibero 5 version, it is tbgw.bat)
- jgw.cfg: Java Gateway configuration file
- jgwlog.properties: Java Gateway log configuration file