[unixODBC-dev] Problem connecting to the DSN

Nick Gorham nick at lurcher.org
Mon Jun 6 13:35:35 BST 2016


On 06/06/16 13:24, Igor Korot wrote:
> Nick,
>
> On Mon, Jun 6, 2016 at 6:48 AM, Nick Gorham <nick at lurcher.org> wrote:
>> On 06/06/16 11:42, Igor Korot wrote:
>>> Nick,
>>>
>>> On Mon, Jun 6, 2016 at 3:18 AM, Nick Gorham <nick at lurcher.org> wrote:
>>>> On 05/06/16 23:23, Igor Korot wrote:
>>>>> Nick,
>>>>>
>>>>> On Sun, Jun 5, 2016 at 2:30 PM, Nick Gorham <nick at lurcher.org> wrote:
>>>>>> On 05/06/16 18:27, Igor Korot wrote:
>>>>>>> Do you see anything wrong with my .ini files?
>>>>>>
>>>>>> No. I would normally try and connect using isql and see what error that
>>>>>> gives.
>>>>> igor at IgorDellGentoo ~/dbhandler $ isql mypdbc-5.2-test root
>>>>> [ISQL]ERROR: Could not SQLConnect
>>>>
>>>> Try
>>>>
>>>> isql -v mypdbc-5.2-test root
>>> igor at IgorDellGentoo ~/dbhandler $ isql -v mypdbc-5.2-test root
>>> [IM002][unixODBC][Driver Manager]Data source name not found, and no
>>> default driver specified
>>> [ISQL]ERROR: Could not SQLConnect
>>
>> You get that error if:
>>
>> 1. The DSN doesn't exist
>> 2. The DSN exists, but it points to a driver entry that does not exist in
>> odbcinst.ini
>> 3. The DSN exists, but the lib entry it contains for Driver= either doesn't
>> exist, or fails to load
>>
>> ldd /usr/lib/libmyodbc5a.so
>>
>> would be my first move.
> IgorDellGentoo igor # ls -la /usr/lib/libmyo*
> -rwxr-xr-x 1 root root 351656 Nov 11  2015 /usr/lib/libmyodbc5a.so
> -rwxr-xr-x 1 root root 347560 Nov 11  2015 /usr/lib/libmyodbc5w.so
> IgorDellGentoo igor # ldd /usr/lib/libmyodbc5a.so
>          linux-vdso.so.1 (0x00007ffccddb5000)
>          libmysqlclient.so.18 => /usr/lib64/libmysqlclient.so.18
> (0x00007f403436d000)
>          libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4034152000)
>          libodbcinst.so.2 => /usr/lib64/libodbcinst.so.2 (0x00007f4033f3f000)
>          libdl.so.2 => /lib64/libdl.so.2 (0x00007f4033d3b000)
>          libc.so.6 => /lib64/libc.so.6 (0x00007f40339a4000)
>          libz.so.1 => /lib64/libz.so.1 (0x00007f403378d000)
>          libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f403351d000)
>          libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f4033137000)
>          libm.so.6 => /lib64/libm.so.6 (0x00007f4032e35000)
>          /lib64/ld-linux-x86-64.so.2 (0x0000564dc3dc5000)
>          libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f4032c2b000)
> IgorDellGentoo igor # nano /etc/unixODBC/odbcinst.ini
>
> I changed the driver to be a UNICODE one.
>
> IgorDellGentoo igor # ldd /usr/lib/libmyodbc5w.so
>          linux-vdso.so.1 (0x00007fff45302000)
>          libmysqlclient.so.18 => /usr/lib64/libmysqlclient.so.18
> (0x00007efff998f000)
>          libpthread.so.0 => /lib64/libpthread.so.0 (0x00007efff9774000)
>          libodbcinst.so.2 => /usr/lib64/libodbcinst.so.2 (0x00007efff9561000)
>          libdl.so.2 => /lib64/libdl.so.2 (0x00007efff935d000)
>          libc.so.6 => /lib64/libc.so.6 (0x00007efff8fc6000)
>          libz.so.1 => /lib64/libz.so.1 (0x00007efff8daf000)
>          libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007efff8b3f000)
>          libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007efff8759000)
>          libm.so.6 => /lib64/libm.so.6 (0x00007efff8457000)
>          /lib64/ld-linux-x86-64.so.2 (0x0000563e5e47d000)
>          libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007efff824d000)
>
> IgorDellGentoo igor # ls -la /usr/lib/linux-v*
> ls: cannot access /usr/lib/linux-v*: No such file or directory
>
> Any idea what package I'm missing?
>
> Thank you.

Seems ok. Check they are all 64 bit

file `which isql`
file usr/lib/libmyodbc5w.so

Other than that try strace to see what goes on.

-- 
Nick


More information about the unixODBC-dev mailing list