跟踪用于Linux的Informix Client的ODBC调用 [英] Tracing ODBC calls for Informix Client for Linux

查看:105
本文介绍了跟踪用于Linux的Informix Client的ODBC调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从在Linux上运行的程序跟踪ODBC函数调用.该程序动态链接ODBC管理器,然后连接到数据库并获取一些数据.

I tried to trace ODBC function calls from my program working on Linux. This program dynamically links ODBC manager and then connect to database and fetch some data.

我可以通过添加到odbcinst.ini来跟踪带有unixODBC的ODBC调用:

I can trace ODBC calls with unixODBC by adding to odbcinst.ini:

[ODBC]
Trace=yes
TraceFile=/tmp/sql.log

IBM记录了此方法:

This method is documented by IBM: Collecting data for an ODBC Problem

但是,当我将管理器从unixODBC更改为Informix自己的管理器(libifdmr.so)时,不会创建跟踪文件.有人从Linux上的Informix管理器(和驱动程序)成功获取了ODBC跟踪吗?

But when I change manager from unixODBC to Informix's own manager (libifdmr.so), the trace file is not created. Anybody successfully obtained ODBC trace from Informix manager (and driver) on Linux?

客户端版本:CSDK 3.50UC3

Client version: CSDK 3.50UC3

我希望这不是错误,并且我的配置有问题.

I hope that it is not a bug and something is wrong with my config.

对于unixODBC:我不能在多线程应用程序中使用unixODBC.当断开与连接以外的其他线程的连接时,我使用连接池,并且我的应用程序出现故障.在多线程应用程序中它也要慢得多.

As for unixODBC: I cannot use unixODBC in multithreaded app. I use connection pool and my app segfaulted when disconnection was from another thread than connection. It is also much slower in multithreaded app.

推荐答案

我在odbc.ini中获得了包含这些设置的ODBC跟踪:

I got ODBC trace with those settings in my odbc.ini:

[ODBC]
TRACE=1
TRACEFILE=/tmp/odbc_trace.txt
TRACEDLL=idmrs09a.so

我从《 IBM Informix ODBC驱动程序程序员手册》 3.50版复制了它们. 因此,当这些设置位于odbc.ini而不是odbcinst.ini中时,其他IBM文档似乎无效,并且您必须设置TRACEDLL(在为ODBC问题收集数据"文档中未提及).

I copied them from IBM Informix ODBC Driver Programmer’s Manual Version 3.50. So other IBM documents seems not valid while those settings are in odbc.ini instead of odbcinst.ini and you must set TRACEDLL which was not mentioned in "Collecting data for an ODBC Problem" document.

更新: 看来IBM更改了文档:有关于TRACEDLL的信息,但是odbcinst.ini仍然存在.

UPDATE: It seems IBM changed documentation: there is info on TRACEDLL, but odbcinst.ini remained.

这篇关于跟踪用于Linux的Informix Client的ODBC调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆