Skip to main content
Participant
February 22, 2010
Question

database log

  • February 22, 2010
  • 1 reply
  • 541 views

Hi CFers

I wanted to record all database calls from Coldfusion 8 (IIS) to MSSQL 2008. I enabled database log on the data source page. But I find that there are too much unnecessary details in the database log. The file grows too quickly and CFIDE cannot even show the file.

Is there a way to control the database log so that it only writes "sql statements" to the log?

I'm not sure about the mechanics of the jdbc log, but it seems JDBC Spy is used for logging.

There is a Log4jdbc which has an option of logging "sql only". Is there a way to configure the JDBC spy to do the same?

Or, is there a way to tell Coldfusion to use log4jdbc?

Thanks.

This topic has been closed for replies.

1 reply

Inspiring
February 23, 2010

You might try using the SQL Profiler tool that is included in Microsoft SQL Server.  This will allow you to monitor activity on your database server.

Introducing SQL Server Profiler (MS documentation)

http://msdn.microsoft.com/en-us/library/ms181091.aspx

Getting ColdFusion SQL Statements from SQL Server Trace (Blog entry)

http://www.petefreitag.com/item/674.cfm
benik9Author
Participant
March 1, 2010

Hi Bob,

Thanks. I agree it is one solution.

I just hoped it could be done from the jdbc driver's side and it seems "possible" but not sure.

Maybe I will try switching to odbc and manipulating the odbc driver settings.

Ben Kim