You could also use a JDBC wrapper and write out to a log file. FusionReactor will do this for you but its not that hard to write a simple proxy and use that as the jar file, if you have access to the entire ColdFusion environment.
Adam Haskell On Wed, Mar 26, 2008 at 11:43 AM, Sam Larbi <[EMAIL PROTECTED]> wrote: > Instead of using CF and incurring the extra overhead in your applications, > you could have a profiler looking at the DB side of things log all queries > from a specific user (whoever CF uses as the user). > > Sam > > > > On Wed, Mar 26, 2008 at 9:01 AM, bart <[EMAIL PROTECTED]> wrote: > > > > > In CFMX 8 you have the cfquery returns the sql, so you can log the > > statement like: > > > > <cflog text="#query_name.sql#" file="sqllog"> > > > > For prior versions I think the only way is to store the sql in a > > variable and use the variable both in cfquery and cflog, like: > > > > <cfquery name="test" datasource="sql"> > > <cfsavecontent variable="statement"> > > Insert into table (columns) (values) > > </cfsavecontent> > > #PreserveSingleQuotes(statement)# > > </cfquery> > > <cflog text="#statement#" file="sqllog"> > > > > > > On Mar 25, 7:28 pm, Xen <[EMAIL PROTECTED]> wrote: > > > Is there any way to log a cfquery statement? I need to do something > > > like... > > > > > > <cfquery name="test" datasource="sql"> > > > Insert into table (columns) (values) > > > </cfquery> > > > > > > Is it possible to log the query statement? > > > > > > Thanks for any help. I'm using cf7 and sql2000. > > > > > > -Ben > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" 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/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
