DG4ODBC (11.2 g) on LINUX 64bit using FreeTDS ODBC Driver Manager
647767May 9 2011 — edited May 10 2011Hi,
I got a problem to connect via dg4odbc using usind database link. Below I've listed all my configuration files + dg4odbc trace output.
This is what I've already done:
1. Configured FreeTDS with odbc (see below)
2. I did some test using odbc.ini using isql,tsql and all were succeed :)
3. Configured three files initMSSQL.ora, listener and tnsnames
4. tnsping tns_entry also was succeed (HS=OK)
But when I created public dblink (CREATE PUBLIC DATABASE LINK hslink CONNECT TO "dbuser" IDENTIFIED BY "dbpassword" using 'my_tns entry') i cannot use it becouse it shows me errors listed in dg4odbc file.
Please see my configuration and help me tu figure out what I could done wrong or missmatch something !!!!!!!!!!!!
DATABASE INFO:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
Heterogeneous Agent Release 11.2.0.1.0 - 64bit Production Built with
Oracle Database Gateway for ODBC
**********typical freetds.conf, odbc.ini, odbcinst.ini configuration*********
/etc/freetds/freetds.conf
# Microsoft server
[SQLSERVER]
host = my_host_ip
port = 593377
tds version = 7.0
/etc# cat odbc.ini
[MSSQL]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
Trace = No
Servername = SQLSERVER
Language =
Database = mydb_name
User = mydb_user
Password = mydb_passwd
Logging = 0
LogFile =
QuotedId = Yes
AnsiNPW = Yes
/etc# cat odbcinst.ini
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so
CPTimeout =
CPReuse =
FileUsage = 1
*****Configuration init[SID].ora, listener.ora, tnsnames.ora*****
/u01/app/oracle/product/11.2.0/dbhome_1/hs/admin$ cat initMSSQL.ora
# is a sample agent init file containing the HS parameters that
# are needed for an ODBC Agent.
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = MSSQL
HS_FDS_SHAREABLE_NAME = /usr/lib/odbc/libtdsodbc.so
set ODBCINI=/etc/odbc.ini
set ODBCINSTINI=/etc/odbcinst.ini
HS_FDS_TRACE_LEVEL = Debug
#HS_FDS_SUPPORT_STATISTICS = FALSE
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC=
(SID_NAME=MSSQL)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH = /usr/lib:/usr/lib/odbc)
)
)
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
[...]
MSSQLCONN=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))
(CONNECT_DATA= (SID=MSSQL))
(HS=OK)
)
*******dg4odbc trace output***********
:/u01/app/oracle/product/11.2.0/dbhome_1/hs/log$ cat MSSQL_agt_12650.trc
Oracle Corporation --- MONDAY MAY 09 2011 16:22:44.248
Heterogeneous Agent Release
11.2.0.1.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "Debug"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
setting HS_IDLE_TIMEOUT to default of 0
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "AL32UTF8"
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "MSSQL"
Product-Info:
Port Rls/Upd:1/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:MSSQL
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=873
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=873
HOCXU_SEM_VER=112000
Entered hgolofn at 2011/05/09-16:22:44
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib/odbc/libtdsodbc.so"
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff65b50
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff63720
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff62f30
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
symbol_peflctx=0xbff638f0
hoaerr:0
Exiting hgolofns at 2011/05/09-16:22:44
Entered hgolofns at 2011/05/09-16:22:44
hoaerr:28500
Exiting hgolofns at 2011/05/09-16:22:44
Failed to load ODBC library symbol: /usr/lib/odbc/libtdsodbc.so(SQLDescribeParam)
Exiting hgolofn, rc=28500 at 2011/05/09-16:22:44
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:337 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:108 FUNCTION:hgoexit() ID:Connection context
Could somebody help me please to figure out what is wrong with??????