odd disconnecting from database

odd disconnecting from database

Post by lpeeter » Thu, 08 Jan 2004 20:34:20


Hi there,

I have the following problem:

I have created an application that preforms several queries against an
MS SQL Server database within one transaction. I have created
procedures to start and commit/rollback the transaction and to open
and close the database connection. When I start the application, the
execution time of the complete transaction is much longer than I would
have expected (execution time is long, since there are a lot of
queries within the transaction). When I turn on the trace within MS
SQL, I find that every now and then there's a connect when the
connection is already open and that it disconnects and reconnects
(strangly enough, the transaction is maintained). I noticed that this
discconnecting and connecting thing takes up to more than half of the
execution time. However, according to Delphi, the application does not
trigger the procedures for connecting and disconnecting.
I am using a TDatabase component to connect to the database and a
TQuery component to create and execute the several queries, so I use
the BDE.

I also use this application against an Oracle database and the
transaction take just the same (long) time to complete, however I have
not yet been able to trace within Oracle, as my Oracle server has
crashed.

Does somebody have a clue as what might cause the (dis)connection?

kind regards,

Larry Peeters.
 
 
 

odd disconnecting from database

Post by ryanoffor » Fri, 09 Jan 2004 17:52:22

Try running the SQL monitor that comes with Delphi. It may give you
some clues as to what is happening.