Document Type | Troubleshooting
Category | Administration
Applicable Product Versions | 5SP1FS06, 6FS01, 6FS02, 6FS03, 6FS04, 6FS05, 6FS06, 6FS07
Error Codes | 2131, 12130
Document Number | TADTS025
Issue
- This explains the symptom where an existing DB Link disconnects intermittently.
- There are cases where connection to the remote DB is possible via tbsql, but not via DB Link.
Note [Applicable Environment]
Tibero6 FS07 (Linux)
MSSQL 2016 (Windows)
-- Connection to MSSQL possible via tbsql [tibero@localhost ~]$tbsql tibero/tibero@msgate tbSQL 6 TmaxData Corporation Copyright (c) 2008-. All rights reserved. Connected to SQL SERVER GATEWAY using msgate. SQL> select * from test; C1 ใ กใ กใ กใ กใ กใ กใ กใ ก Alice 1 row selected. -- Connection not possible via DB Link [tibero@localhost ~]$tbsql tibero/tmax tbSQL 6 TmaxData Corporation Copyright (c) 2008-. All rights reserved. Connected to Tibero. SQL> create database link mslink connnect to tibero identified by 'tibero' using 'msgate'; Database Link 'MSLINK' created. SQL> select * from tibero_test@mslink; TBR-12130 : Unable to connect to remote database(RemoteDB_name=MSLINK). TBR-2131 : Generic I/O error.
Cause
- The issue occurs because the connection time to the remote DB via DB Link exceeds the DBLINK_CONN_TIMEOUT value.
- In Tibero, when connecting through a DB Link, if the connection is not established within the DBLINK_CONN_TIMEOUT period, it is treated as a timeout.
Solutions
Check the Gateway log to see if there are intervals exceeding the DBLINK_CONN_TIMEOUT value, then apply the parameter dynamically.
# jgw.log -- It takes about 1 minute until connection success is returned 09:07:17.559 146163 [SessThr-12] INFO com.tmax.tibero.gateway.comm.SQLServerComm - LOCAL Transaction mode starting... 09:08:13.665 202269 [SessThr-12] TRACE com.tmax.tibero.gateway.comm.SQLServerComm - connection succeeded. [
# Dynamically apply DBLINK_CONN_TIMEOUT parameter ex) alter system set DBLINK_CONN_TIMEOUT=100;
To apply the parameter after future DB restarts, it must be added to the tip file.
- Linux : $TB_HOME/config/$TB_SID.tip
- Windows : %TB_HOME%/config/%TB_SID%.tip
Note
Until Tibero6 version, the default value of DBLINK_CONN_TIMEOUT was set to 10 seconds, but from Tibero7 onwards, the default value has been changed to 100 seconds.