[egenix-users] unable to trace ODBC usage
mal at egenix.com
Mon Jan 21 17:36:56 CET 2008
On 2008-01-21 17:09, Peter Bengtsson wrote:
> M.-A. Lemburg wrote:
>> On 2008-01-21 14:37, Peter Bengtsson wrote:
>>> I've got a DSN entry that looks like this in /etc/odbc.ini
>>> Driver = FreeTDS
>>> Description = Connecting to VAUKLive_dev
>>> Trace = Yes
>>> TraceFile = /tmp/vauklive_dev-freetds.log
>>> Server = 172.24.66.6
>>> Database = VSODMS1_3
>>> Pooling = No
>>> I've tried restarting Apache, restarting Zope and opening, closing,
>>> opening and using the connection object in Zope. Nothing starts the
>>> trace. The file /tmp/vauklive_dev-freetds.log is never written!
>> While ODBC drivers are supposed to use those config settings in
>> the odbc.ini file, many of them don't.
>> In those cases it is usually better to enable logging at the ODBC
>> manager level:
>> Trace = On
>> TraceFile= /tmp/sql.log
> Tried that too. Restarted Zope, restarted Apache and re-opened the
> connection inside Zope but nothing happens.
> Could it be that I'm lacking the program that does the actual tracing?
> What is it that causes a re-read of the configs in odbc.ini and
Are you using unixODBC or iODBC as ODBC manager ?
They both have different locations where they look for an odbcinst.ini
which also depends on the system you're using them on.
To find out where they are looking for the file, it's
best (but also very low-level) to do an strace and then
search of the file name.
>> You can also enable tracing in FreeTDS:
>> # Whether to write a TDSDUMP file for diagnostic purposes
>> # (setting this to /tmp is insecure on a multi-user system)
>> dump file = /tmp/freetds.log
>> debug level = 10
> That worked at least but the trace wasn't very helpful. The file managed
> to grow to 2.5M on one test!
The ODBC log won't be a lot smaller.
BTW: Why do you need to log the ODBC usage ? Are you having trouble
with FreeTDS ?
Professional Python Services directly from the Source (#1, Jan 21 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the egenix-users