I considered this option, I don't really like it. I really wanted to integrate the logging of the counts of these queries in the application. So my request log (asp.net application by the way). Would be: <requestlog.log> Page: /foo/bar.aspx Took: 100ms # Transactions: 2 # Queries that hit the database: XXX Page: /foo/bar2.aspx Took: 300ms # Transactions: 1 # Queries that hit the database: XXX
If you kind of get my drift. Thanks anyway Guido On Nov 20, 12:54 pm, jerry porter <[EMAIL PROTECTED]> wrote: > Why not try using log4net and turn on the "sql logging" attribute. > > Here is one example: > > Might be too bit verbose, but might satisfy your need. > > http://davesquared.blogspot.com/2008/01/viewing-sql-generated-by-nhib... > > Jerry Porter > > > > ----- Original Message ---- > From: gatapia <[EMAIL PROTECTED]> > To: nhusers <[email protected]> > Sent: Wednesday, November 19, 2008 8:34:15 PM > Subject: [nhusers] Intercepting hits to the database > > Hi All, > > I was just wondering if I can intercept hits to the database? > > Basically I want to log how many times an asp.net request hits the > database. > > I had a quick look at the source code and it looks like > Batcher.LogCommand does exactly what I want but it is not > intercepteable (no hooks). I've also looked at IInterceptor but I > think this is at a higher level and does not differentiate between > cache hits and DB hits. > > I really just want to listen to queries not updates/inserts/deletes as > these are not really optimiseable in this application. > > Any help is appreciated. > > Thanks > > Guido Tapia- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
