Link to home
Start Free TrialLog in
Avatar of Francisco
FranciscoFlag for Japan

asked on

DB2 ODBC connection Tracelevel

Hello,

I am really not familiar with UDB, but recently am having issue with client application written in VB that will connect to UDB database.... So need somebody's help!

Actually that VB app will just through SQL to UDB dataserver to retrieve data (just select statement) and then write that into flat text file.

Normally this task finish quickly like in few seconds, but once a two-three weeks, suddenly ODBC timeout happens and it fails.
At that time, if I try to use different PC, no issues can be seen.... Also no special errors are available on dataserver side it seems...


Assuming this is PC side whatever the issue, but cannot point out what is exactly wrong. So tried to turn on trace option in ODBC property dialog on Client XP PC and tried to see errors in that, but seems that, it is not writing anything into log even if there is some event (such as logon to dataserver, execute select statement etc...)..


So assuming there will be some options to generate ODBC logs more or having something odbctrace.dll thing that can be used for this kind of debugging...

If somebody have good tool/way of debugging for this case, would you please let me know?

Thanks Regards,
Sleeping Luke

Avatar of sachinwadhwa
sachinwadhwa
Flag of United Kingdom of Great Britain and Northern Ireland image

look for db2diag.log file on both sides (server & client).

Avatar of ghp7000
ghp7000

probably a lock timeout issue, when you run the sql statement, another user is holding non compatible locks for your statement. Try running the statement with the UR qualifier if its safe for you to read rows that might be changing
db2 select something from table WITH UR
when you say 'it fails', what exactly do you mean, how do you know it has failed? The connection abends? The connection terminates normally with no data written? What happens exactly?
Avatar of Francisco

ASKER

sachinwadhwa-san,
Thank you very much for your comment, I can see that log on my PC but not on the PC which was encountered problem, how I can enable logging on that PC? is it from ODBC tracing...? may be not...


ghp7000-san,
Thank you very much for your comment, actually we are just using application written with visual basic 6, and that application shows error dialog when it stucked (there is error trap though it does not show useful info for now.)

And it is not writting but just running select statement to read info from table, though not small one, so during the time when it reads data from database, it stucked and seems timed out... (application suddenly started thinking something - waiting for callback from dataserver - and timed out)


for the UR thing, shall I just put "with UR" after the SQL?
Sorry but what does it do?

Thanks Regards,
SleepingLuke
ASKER CERTIFIED SOLUTION
Avatar of ghp7000
ghp7000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you very much, problem sorted at last with using with UR !!!