RE: DBD::Solid or DBD::ODBC with Solid
- From: martin.evans@xxxxxxxxxxxx (Martin J. Evans)
- Date: Fri, 21 Apr 2006 09:18:34 +0100 (BST)
Simon,
I can't tell from this why it is not working.
Assuming the entries you mentioned are in the odbcinst.ini and odbc.ini files
used by unixODBC (the output of odbcinst -j) and the shared object for your
driver can be loaded then it should work. You haven't by any chance set the
ODBCINI or ODBCINSTINI environment variables have you? If not then the only
thing I can suggest is you send an strace (Linux) or truss (Solaris) of the
isql run - don't bother mailing it to the list - it will be too big.
Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com
On 20-Apr-2006 Simon Windsor wrote:
Hi.
Thanks for your response again.
The odbc.ini file is located at /opt/utran/apps/unixODBC/etc/odbc.ini
The odbcinst.ini file is located
at /opt/utran/apps/unixODBC/etc/odbcinst.ini
The output you asked for below,
Simon
Checking for SQLConnect
-----------------------
dltest /opt/utran/apps/unixODBC/Solid4.5/bin/sacs9x45.so SQLConnect
SUCCESS: Loaded /opt/utran/apps/unixODBC/Solid4.5/bin/sacs9x45.so
SUCCESS: Found SQLConnect
Trace file for isql -v hh1tnes04_Today user password
----------------------------------------------------
[ODBC][7651][__handles.c][444]
Exit:[SQL_SUCCESS]
Environment = 27308
[ODBC][7651][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 27308
[ODBC][7651][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 27ca8
[ODBC][7651][SQLConnect.c][3549]
Entry:
Connection = 27ca8
Server Name = [hh1tnes04_Today][length = 15
(SQL_NTS)]
User Name = [unsupported][length = 11
(SQL_NTS)]
Authentication = [**********][length = 10
(SQL_NTS)]
[ODBC][7651][SQLConnect.c][3758]Error: IM002
[ODBC][7651][SQLError.c][424]
Entry:
Connection = 27ca8
SQLState = ffbef4f0
Native = ffbef4e8
Message Text = ffbef500
Buffer Length = 500
Text Len Ptr = ffbef4ee
[ODBC][7651][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = IM002
Native = ffbef4e8 -> 0
Message Text = [[unixODBC][Driver Manager]Data
source name not found, and no default driver specified]
[ODBC][7651][SQLError.c][424]
Entry:
Connection = 27ca8
SQLState = ffbef4f0
Native = ffbef4e8
Message Text = ffbef500
Buffer Length = 500
Text Len Ptr = ffbef4ee
[ODBC][7651][SQLError.c][461]
Exit:[SQL_NO_DATA]
[ODBC][7651][SQLError.c][504]
Entry:
Environment = 27308
SQLState = ffbef4f0
Native = ffbef4e8
Message Text = ffbef500
Buffer Length = 500
Text Len Ptr = ffbef4ee
[ODBC][7651][SQLError.c][541]
Exit:[SQL_NO_DATA]
[ODBC][7651][SQLFreeHandle.c][268]
Entry:
Handle Type = 2
Input Handle = 27ca8
[ODBC][7651][SQLFreeHandle.c][317]
Exit:[SQL_SUCCESS]
[ODBC][7651][SQLFreeHandle.c][203]
Entry:
Handle Type = 1
Input Handle = 27308
On Thu, 2006-04-20 at 14:43 +0100, Martin J. Evans wrote:
On 20-Apr-2006 Simon Windsor wrote:--
Hi
Thanks for the prompt response.
Here goes ...
=====================================================================
odbjinst -j
-----------
unixODBC 2.2.11
DRIVERS ...........: /opt/utran/apps/unixODBC/etc/odbcinst.ini
SYSTEM DATA SOURCES: /opt/utran/apps/unixODBC/etc/odbc.ini
USER DATA SOURCES..: /opt/utran/.odbc.ini
odbcinst.ini
------------
[solid_driver_45]
Driver = /opt/utran/apps/unixODBC/Solid4.5/bin/sacs9x45.so
Trace = Yes
TraceFile = /tmp/sql_45.log
This odbcinst.ini file needs to be /opt/utran/apps/unixODBC/etc/odbcinst.ini
-
you don't actually say if it is or not.
The Trace and TraceFile are ODBC options so go in the [odbc] section:
[ODBC]
Trace = Yes
TraceFile = /tmp/sql_45.log
[solid_driver_45]
Driver = /opt/utran/apps/unixODBC/Solid4.5/bin/sacs9x45.so
You won't get much of a trace until the driver is loaded but assuming you
make
the change above, I'd re-run isql and look in /tmp/sql_45.log.
odbc.ini (A few lines)
--------
[hh1tnes04_Today]
Driver = solid_driver_45
This odbc.ini file needs to be /opt/utran/apps/unixODBC/etc/odbc.ini or
/opt/utran/.odbc.ini - here again - you didn't say.
I'm guessing you need extra attributes in here but it is not your current
problem.
solid.ini (Sample Line)
---------
hh1tnes04_Today = tcp 192.168.57.52 1300
===========================================================================
I have set LD_LIBRARY_PATH to
include /opt/utran/apps/unixODBC/Solid4.5/bin and trying ...
isql DSN User Password -v
-------------------------
[IM002][unixODBC][Driver Manager]Data source name not found, and no
default driver specified.
[ISQL]ERROR: Could not SQLConnect
That should be
isql -v hh1tnes04_Today user password
because 1) hh1tnes04_Today is the name of your DSN
2) isql is a bit sensitive to options after args - put -v first
I have not tried DBD::ODBC yet, I have only attempted DBD::Solid, and
now I am trying to get a working ODBC connection before using DBD::ODBC.
Finally, the output of ldd is
libc.so.1 => /usr/lib/libc.so.1
libm.so.1 => /usr/lib/libm.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
librt.so.1 => /usr/lib/librt.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/FJSV,GPUZC-M/lib/libc_psr.so.1
Any help or insight you can offer is appreciated.
Simon
I'd do the above changes and if it does not work check the log file and if
you
get nothing in this I'd try something like:
dltest /opt/utran/apps/unixODBC/Solid4.5/bin/sacs9x45.so SQLConnect
to make sure unixODBC thinks you've got a SQLConnect in the ODBC driver.
BTW, I don't normally answer stuff not on the list as others cannot see what
is
going on and cannot help so it would be nice when this is running if you
posted
the problem/solution.
Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com
On Thu, 2006-04-20 at 13:10 +0100, Martin J. Evans wrote:
On 20-Apr-2006 Simon Windsor wrote:--
Hi
I have been asked to add a few reports using data from several Solid
databases to a Solaris Webserver that I manage.
I have access to Solid SDK 3.7FE and 4.5.
I have checked DBD::Solid and it does not appear to support versions
greater than 3.5.
I have tried unixODBC and DBD::ODBC, but I keep getting
[IM002][unixODBC][Driver Manager]Data source name not found
[ISQL]ERROR: Could not SQLConnect
Can anyone provide any help/advice on how to get DBD::Solid working for
3.7Fe, or on configuring unixODBC(odbcinst.ini ?).
All the best
Simon
ps Sorry this is slightly off topic
What does odbcinst -j output?
How have you added a solid entry to your odbcinst.ini file and where is
your
odbcinst.ini file?
Where is your odbc.ini file and what does it look like?
Instead of using Perl, why not just run:
isql -v my_dsn_name my_username my_password
(it will be easier to diagnose the problem).
Have you set and exported LD_LIBRARY_PATH such that any shared objects
required
by the shared object named in Driver = xxx in your odbcinst.ini file are
found.
What does ldd on the shared object named by Driver = xxx report?
Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com
Simon Windsor
Eml: simon.windsor@xxxxxxxxxxxxxxxx
Tel: 01454 617689
Mob: 07960 321599
Simon Windsor
Eml: simon.windsor@xxxxxxxxxxxxxxxx
Tel: 01454 617689
Mob: 07960 321599
- References:
- RE: DBD::Solid or DBD::ODBC with Solid
- From: Simon Windsor
- RE: DBD::Solid or DBD::ODBC with Solid
- Prev by Date: Re: Error on DBI
- Next by Date: Re: last insert id
- Previous by thread: RE: DBD::Solid or DBD::ODBC with Solid
- Next by thread: Is Class::DBI slow?
- Index(es):
Relevant Pages
|