views:

175

answers:

2

I have an application that takes a long time to open odbc connections (like 20 sec) also takes forever using arcmap and arcsde

but when I try the connection on the odbc data source administrator, it tests it really fast

Does anyone have any idea of what my be causing this?

btw the application works fine in another computer with another database

thanks.

+1  A: 

In ODBC administrator you can enable tracing. Then compare trace file from both slow and fast machine. If there is "fast" open from that machine using ODBC administrator and "slow" from your app then try other ways to open such connection. Try use it from other tool such as QueryTool (free trial), or create simple script in Python with win32 extension. In Python (I recommend Active Python which has win32 included) you can open ODBC with:

import odbc
import time

t_start = time.time()
conn = odbc.odbc('db_alias/user/passwd')
t_stop = time.time()
print('open: %.3f [ms]' % (t_stop-t_start))
cursor = conn.cursor() 
cursor.execute("SELECT FIRST 1 DBINFO('version','full') FROM systables;")
for row in cursor.fetchall():
    print('[%s]' % (row[0]))

(note Informix specific version select)

Michał Niklas
I can't seem to trace using the odbc administrator, its not saving the log file :(
sergiogx
You should compare trace from your application on both fast and slow machine. Using Python code I provided you can check if opening ODBC connection it is different from opening in your application.
Michał Niklas
thanks, found out that was a mix of problems. The log backup script wasn't working and that it was a network problem between the second app server and the db server. The python script made it easy to test (still can't trace odbc with .net tho). thanks.
sergiogx
+1  A: 

Hi

OpenLink Software provide an Informix ADO.Net Provider. This is a Multi-Tier solution with the processing performed on the server side with only the required results returned to the client and thus would provide an interesting contract to the Native and ODBC Bridge Providers you have tried so far ...

hwilliams