[unixODBC][Driver Manager]Driver does not support this function {IM001}
1000286Apr 1 2013 — edited Apr 2 2013Hello,
I start from the end and details show below - this error message i got in sql session:
SQL> select count(*) from EnergyType@ENERGOPLAN;
select count(*) from EnergyType@ENERGOPLAN
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][Driver Manager]Driver does not support this function {IM001}
ORA-02063: preceding 2 lines from ENERGOPLAN
SQL>
First question - is Oracle Heterogeneous Services are licensed for standard edition ? I cant find this information, and my database - is SE 11.2.0.3.0 - 64bit.
If its ok and HS are licensed for SE, then please see details of my problem:
----OS and packages version
[oracle@aris_sv_db log]$ uname -a
Linux aris_sv_db 2.6.18-308.24.1.el5 #1 SMP Tue Dec 4 17:43:34 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[oracle@aris_sv_db log]$
[oracle@aris_sv_db log]$ rpm -qa | grep odbc
[oracle@aris_sv_db log]$ rpm -qa | grep unixodbc
[oracle@aris_sv_db log]$ rpm -qa | grep unixODBC
unixODBC-libs-2.2.11-10.el5
unixODBC-libs-2.2.11-10.el5
unixODBC-devel-2.2.11-10.el5
unixODBC-2.2.11-10.el5
unixODBC-devel-2.2.11-10.el5
[oracle@aris_sv_db log]$ rpm -qa | grep freetds
freetds-0.91-1.el5.rf
[oracle@aris_sv_db log]$
-----ODBC.INI, ODBCINST.INI and FREETDS.CONF
[oracle@aris_sv_db log]$ more /home/oracle/.odbc.ini
[ENERGOPLAN]
Driver = FreeTDS
Servername = ENERGOPLAN
Database = ess2
[oracle@aris_sv_db log]$
[oracle@aris_sv_db log]$ more /etc/odbcinst.ini
# Example driver definitions
[FreeTDS]
Description = MSSQL Driver
Driver = /usr/lib64/libtdsodbc.so.0
#Setup = /usr/lib64/libtdsodbc.so.0
#Driver = /usr/lib64/libodbc.so
#Driver = /usr/lib/libodbc.so
UsageCount = 1
Trace = Yes
TraceFile = /tmp/freetds.log
[ODBC]
DEBUG = 1
TraceFile = /tmp/sqltrace.log
Trace = Yes
[oracle@aris_sv_db log]$
[oracle@aris_sv_db log]$ more /etc/freetds.conf
# A typical Microsoft server
[ENERGOPLAN]
host = 192.168.10.64
port = 1433
tds version = 8.0
# client charset = UTF-8
client charset = cp1251
[oracle@aris_sv_db log]$
----CHECK CONNECT from ODBC
[oracle@aris_sv_db log]$ isql -v ENERGOPLAN user pass
---------------------------------------
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
---------------------------------------
SQL> select count(*) from EnergyType;
------------
| |
------------
| 8 |
------------
SQLRowCount returns 1
1 rows fetched
SQL> [oracle@aris_sv_db log]$ tsql -S ENERGOPLAN -U user -P pass
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "cp1251"
1> select count(*) from EnergyType;
2> go
8
(1 row affected)
1> [oracle@aris_sv_db log]$
----LISTENER.ORA, TNSNAMES and initENERGOPLAN.ora
[oracle@aris_sv_db log]$ more /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/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))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
SID_LIST_ENERGOPLAN =
(SID_LIST =
(SID_DESC=
(SID_NAME=ENERGOPLAN)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM=dg4odbc)
(ENVS="LD_LIBRARY_PATH=/usr/lib64:/u01/app/oracle/product/11.2.0/dbhome_1/lib")
)
)
ENERGOPLAN =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = PNPKEY))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.72)(PORT = 1523))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
[oracle@aris_sv_db log]$ more /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/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.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
ENERGOPLAN =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.10.72)(PORT=1523))
(CONNECT_DATA=(SID=ENERGOPLAN))
(HS=OK)
)
[oracle@aris_sv_db log]$ more /u01/app/oracle/product/11.2.0/dbhome_1/hs/admin/initENERGOPLAN.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = ENERGOPLAN
#HS_FDS_CONNECT_INFO = 192.168.0.199:1433//test
HS_FDS_TRACE_LEVEL = DEBUG
#HS_FDS_TRACE_FILE_NAME = /tmp/hs1.log
HS_FDS_TRACE_FILE_NAME = /u01/app/oracle/product/11.2.0/dbhome_1/hs/log/mytrace.log
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so #/usr/lib64/libtdsodbc.so.0
#HS_FDS_SHAREABLE_NAME = /usr/lib64/libtdsodbc.so.0
#HS_FDS_SHAREABLE_NAME = /usr/lib/libodbc.so
#HS_LANGUAGE=american_america.we8iso8859p1
#HS_LANGUAGE=AMERICAN_AMERICA.AL32UTF8
#HS_LANGUAGE=AMERICAN_AMERICA.CL8MSWIN1251
#HS_LANGUAGE=RUSSIAN_RUSSIA.UTF8
#HS_LANGUAGE=Russian_CIS.AL32UTF-8
#HS_FDS_FETCH_ROWS=1
HS_NLS_NCHAR = UCS2
HS_FDS_SQLLEN_INTERPRETATION=32
#
# ODBC specific environment variables
#
set ODBCINI=/home/oracle/.odbc.ini
set ODBCINSTINI=/etc/odbcinst.ini
#HS_KEEP_REMOTE_COLUMN_SIZE=ALL
#HS_NLS_LENGTH_SEMANTICS=CHAR
#HS_FDS_SUPPORT_STATISTICS=FALSE
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>
[oracle@aris_sv_db log]$
[oracle@aris_sv_db log]$ tnsping ENERGOPLAN
TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 01-APR-2013 16:27:49
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.10.72)(PORT=1523)) (CONNECT_DATA=(SID=ENERGOPLAN)) (HS=OK))
OK (0 msec)
[oracle@aris_sv_db log]$
----CREATE DBLINK and test from sqlplus
CREATE DATABASE LINK "ENERGOPLAN" CONNECT TO "user" IDENTIFIED BY "pass" USING 'ENERGOPLAN';
[oracle@aris_sv_db log]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 1 16:30:14 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
SQL> select count(*) from EnergyType@ENERGOPLAN;
select count(*) from EnergyType@ENERGOPLAN
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][Driver Manager]Driver does not support this function {IM001}
ORA-02063: preceding 2 lines from ENERGOPLAN
SQL>
----logs from hs and odbc
[oracle@aris_sv_db log]$ tail -50 ENERGOPLAN_agt_12117.trc
12 VARCHAR N 100 100 0/ 0 1000 0 200 ConsumptionYearCostUOM
3 DECIMAL N 24 24 9/ 3 0 0 0 ConsumptionYearFactorAmount
-7 BIT N 1 1 0/ 0 0 0 20 NeedToBeApprovedByREK
Exiting hgodtab, rc=0 at 2013/04/01-16:30:42
Entered hgodafr, cursor id 0 at 2013/04/01-16:30:42
Free hoada @ 0x14e5fd20
Exiting hgodafr, rc=0 at 2013/04/01-16:30:42
Entered hgopars, cursor id 1 at 2013/04/01-16:30:42
type:0
SQL text from hgopars, id=1, len=36 ...
00: 53454C45 43542043 4F554E54 282A2920 [SELECT COUNT(*) ]
10: 46524F4D 2022454E 45524759 54595045 [FROM "ENERGYTYPE]
20: 22204131 [" A1]
Exiting hgopars, rc=0 at 2013/04/01-16:30:42
Entered hgoopen, cursor id 1 at 2013/04/01-16:30:42
hgoopen, line 87: NO hoada to print
Deferred open until first fetch.
Exiting hgoopen, rc=0 at 2013/04/01-16:30:42
Entered hgodscr, cursor id 1 at 2013/04/01-16:30:42
Allocate hoada @ 0x14e5fd80
Entered hgodscr_process_sellist_description at 2013/04/01-16:30:42
Entered hgopcda at 2013/04/01-16:30:42
Column:1(): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2013/04/01-16:30:42
Entered hgopoer at 2013/04/01-16:30:42
hgopoer, line 231: got native error 0 and sqlstate IM001; message follows...
[unixODBC][Driver Manager]Driver does not support this function {IM001}
Exiting hgopoer, rc=0 at 2013/04/01-16:30:42
hgodscr, line 407: calling SQLSetStmtAttr got sqlstate IM001
Free hoada @ 0x14e5fd80
hgodscr, line 464: NO hoada to print
Exiting hgodscr, rc=28500 at 2013/04/01-16:30:42 with error ptr FILE:hgodscr.c LINE:407 FUNCTION:hgodscr() ID:Set array fetch size
Entered hgoclse, cursor id 1 at 2013/04/01-16:31:24
Exiting hgoclse, rc=0 at 2013/04/01-16:31:24
Entered hgocomm at 2013/04/01-16:31:24
keepinfo:0, tflag:1
00: 4F52434C 2E343535 32623466 342E362E [ORCL.4552b4f4.6.]
10: 32322E37 363237 [22.7627]
tbid (len 20) is ...
00: 4F52434C 5B362E32 322E3736 32375D5B [ORCL[6.22.7627][]
10: 312E345D [1.4]]
cmt(0):
Entered hgocpctx at 2013/04/01-16:31:24
Exiting hgocpctx, rc=0 at 2013/04/01-16:31:24
Exiting hgocomm, rc=0 at 2013/04/01-16:31:24
Entered hgolgof at 2013/04/01-16:31:24
tflag:1
Exiting hgolgof, rc=0 at 2013/04/01-16:31:24
Entered hgoexit at 2013/04/01-16:31:24
Exiting hgoexit, rc=0
[oracle@aris_sv_db log]$
[oracle@aris_sv_db log]$ tail -50 /tmp/sqltrace.log
Native = 0x7fff6ca974f4
Message Text = 0x14e5f968
Buffer Length = 510
Text Len Ptr = 0x7fff6ca97750
[ODBC][12117][SQLGetDiagRecW.c][582]
Exit:[SQL_SUCCESS]
SQLState = IM001
Native = 0x7fff6ca974f4 -> 0
Message Text = [[unixODBC][Driver Manager]Driver does not support this function]
[ODBC][12117][SQLGetDiagRecW.c][540]
Entry:
Statement = 0x14e399f0
Rec Number = 2
SQLState = 0x7fff6ca97700
Native = 0x7fff6ca974f4
Message Text = 0x14e5f908
Buffer Length = 510
Text Len Ptr = 0x7fff6ca97750
[ODBC][12117][SQLGetDiagRecW.c][582]
Exit:[SQL_NO_DATA]
[ODBC][12117][SQLEndTran.c][315]
Entry:
Connection = 0x14dbd4b0
Completion Type = 0
[ODBC][12117][SQLGetInfo.c][214]
Entry:
Connection = 0x14dbd4b0
Info Type = SQL_CURSOR_COMMIT_BEHAVIOR (23)
Info Value = 0x7fff6ca9781e
Buffer Length = 8
StrLen = 0x7fff6ca9781c
[ODBC][12117][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][12117][SQLEndTran.c][488]
Exit:[SQL_SUCCESS]
[ODBC][12117][SQLDisconnect.c][204]
Entry:
Connection = 0x14dbd4b0
[ODBC][12117][SQLDisconnect.c][341]
Exit:[SQL_SUCCESS]
[ODBC][12117][SQLFreeHandle.c][268]
Entry:
Handle Type = 2
Input Handle = 0x14dbd4b0
[ODBC][12117][SQLFreeHandle.c][317]
Exit:[SQL_SUCCESS]
[ODBC][12117][SQLFreeHandle.c][203]
Entry:
Handle Type = 1
Input Handle = 0x14dbb0c0
[oracle@aris_sv_db log]$