3

I am trying to install ODBC drivers and I am running into brick walls.

[root@Crux pkg]# isql -v
[IM002][DataDirect][ODBC lib] Data source name not found and no default driver specified
[ISQL]ERROR: Could not SQLConnect
[root@Crux pkg]# isql -3 SUBS2A
[IM003][DataDirect][ODBC lib] Specified driver could not be loaded
[ISQL]ERROR: Could not SQLConnect

My INI files are as follows;

odbcinst.ini

[ProgressOpenEdge]
Description = ODBC for Progress OpenEdge
Driver = /usr/dlc/odbc/lib/pgoe1023.so
;Setup = /usr/dlc/odbc/lib/pgoe1023.so
FileUsage = 1

odbc.ini

[SUBS2A]
Driver = ProgressOpenEdge
Description = Fail
DatabaseName = SUBS
PortNumber = 4000
HostName = 192.168.1.2
LogonID = SYSPROGRESS
Password = SYSPROGRESS
APILevel = 1
ConnectFunctions = YYN
CPTimeout = 60
DriverODBCVer = 03.50
FileUsage = 0
SQLLevel = 0
UsageCount = 1
ArraySize = 50
DefaultLongDataBuffLen = 2048
DefaultIsolationLevel = REPEATABLE READ
StaticCursorLongColBuffLen = 4096
[ODBC]
InstallDir = /usr/dlc/odbc
Trace = 0
TraceFile = odbctrace.out
TraceDll = /usr/dlc/odbc/lib/odbctrac.so
UseCursorLib = 0

I have already made sure all dependencies are loaded properly via ldd.

UPDATE

OUTPUT OF: strace isql -v http://pastebin.com/tXFY4vVt

OUTPUT OF: strace isql -3 SUBS2A http://pastebin.com/Yu5e54mR

OUTPUT OF: /tmp/odbctrace.out http://pastebin.com/0kgvNdWv

Thanks

TheFrack
  • 2,823
  • 7
  • 28
  • 47

2 Answers2

3

You should check that your ODBC driver is loadable:

ldd /usr/dlc/odbc/lib/pgoe1023.so

Probably the loader fails to find dependencies as shared objects (so libraries) that are not available yet in your environment or available in different version.

I recommend you add /usr/dlc/odbc/lib/ or maybe other paths according to your system:

  • either in the environment variable LD_LIBRARY_PATH
  • either add a specific file for linux loader, for instance /etc/ld.so.conf.d/odbc-pgoe.conf with the line /usr/dlc/odbc/lib/ and refresh with ldconfig (best option)

Please report the ldd command output if problem persists. Maybe expected libraries file names do not match exactly your Linux distribution.

Update : The last comment of this post confirms that a ld.so.conf file is a solution to get the driver working. You should test it.

This forum refers to a similar situation. Maybe the solution will fix your issue.

If still wrong, please report the output of strace isql -3 SUBS2A. You will probably get a clue there of what is wrong like a failed library loading, a file access permission issue or whatever, just before the error message is written.

Yves Martin
  • 10,217
  • 2
  • 38
  • 77
  • Yeah that's been done already, everything loads... apologies, I'll edit my question. – TheFrack May 04 '12 at 04:50
  • Have you used the /etc/ld.so.conf.d/ method I propose or the "move" described in your previous question ? You should not move libraries from one location to an other... Libraries may be loaded dynamically by the C code itself (without references for loader in ELF). So I recommend you test all libraries from your ODBC driver installation (probably all in /usr/dlc/odbc/lib) with "ldd". – Yves Martin May 09 '12 at 11:22
  • strace isql -v: http://pastebin.com/tXFY4vVt Also, in /etc/ld.so.conf.d/ all I see is perl.conf, but I don't think that is supported by the system. I did put it in the environment file(s) and ran export also. I voted up your answer as helpful, appreciate it a lot, but still not a solution. – TheFrack May 09 '12 at 15:40
  • Here are my instructions: create a file "/etc/ld.so.conf.d/odbc-pgoe.conf" with a single line as content: "/usr/dlc/odbc/lib/". It is confirmed by http://www.virtadept.com/?p=200 It should work really – Yves Martin May 09 '12 at 20:04
  • Sorry I made a mistake about the command to monitor. The "isql -v" error message is expected, probably you have not set a default driver. Please send output of "strace isql -3 SUBS2A" and the content of /tmp/odbctrace.out – Yves Martin May 09 '12 at 20:10
  • Sorry, here is the new version: strace: http://pastebin.com/Yu5e54mR odbctrace.out: http://pastebin.com/0kgvNdWv – TheFrack May 10 '12 at 14:10
  • The only thing I find strange is ";mystest is" that is read from /etc/odbc.ini Maybe there is an syntax error in your file somewhere. – Yves Martin May 10 '12 at 14:31
  • ugh I forgot I replaced those files with another attempt at a different configuration, I'll have to get back to this later... – TheFrack May 10 '12 at 15:05
0

(1) You can check whether the driver is correct before using it.

$ ivtestlib /usr/dlc/odbc/lib/pgoe1023.so

(2) Watching the log when loading drivers In a console,

tail -f /path/to/SysLog_OrOtherName.file

In another console,

odbc.sh
wuliang
  • 749
  • 5
  • 7