Re: How to monitor sqls executed in ado connections ?
- From: "Paul Scott" <paul.scott@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 05 Jun 2008 10:16:47 +0100
On Thu, 05 Jun 2008 02:37:15 +0100, Brian Bushay TeamB <BBushay@xxxxxxxxx> wrote:
I would like to monitor for sqls executed through Ado library, Is there a way to hook into the library ( like an addin application into the library or service) or third party tools available for monitoring ?
I haven't seen anything like that. I suspects that the SQL just gets passed through to the OLEdb provider so you would need a tool that the provider supports
Or you could create your own "AdoQuery" (descendant or composite) which allows you to hook into the Open/ExecSQL calls and log each SQL statement and (most importantly for me) its execution time - and that logging will work regardless of the database you're connected to.
A composition wrapper also allows you to give each Query a hint about the operations you're requiring (ReadOnly or Update) and how you're going to access the result set (Sequential or Random; Single-pass or Multi-pass). Your one central Query implementation can then decide at /run-time/ details such as the best cursor type and location and whether the field values should be left in the query or got from a recordset or from an OleVariant (RecordSet.GetRows) or from... - all of which can have a significant effect on query performance.
....and you can also write yourself a much faster "Locate"!
(Although this approach may not be so good for those who want to build programs by dragging+dropping components onto a data module rather than creating the queries in program code)
--
Paul Scott
Information Management Systems
Macclesfield, UK.
.
- References:
- How to monitor sqls executed in ado connections ?
- From: ColdAir
- Re: How to monitor sqls executed in ado connections ?
- From: Brian
- Re: How to monitor sqls executed in ado connections ?
- From: Brian Bushay TeamB
- How to monitor sqls executed in ado connections ?
- Prev by Date: ADO and multiple threads
- Next by Date: SQL Server Compact 3.5
- Previous by thread: Re: How to monitor sqls executed in ado connections ?
- Next by thread: Sql Select Len
- Index(es):
Relevant Pages
|