Recent Articles

SQL Ninja Hacking Tool
There is a certain amount of respect earned when someone makes a hacking tool that not only does what it is supposed to do, but does it elegantly as well.

OSS Customer Categorization
I've been thinking about this statement from Sun/MySQL's Marten Mickos: "There's a difference between organizations that have more time than money and organizations that have more money than time."

Open Community And Closed Source Vendors
InfoWorld blogger Sean McCown at Database Underground wrote about a key difference between SQL Server & Oracle: "The answer is simple information.

SolidDB For MySQL Development
As Matt reported last week, IBM announced that it was bowing out of the solidDB for MySQL project. "Those of you who know Solid's history know that Solid has long been a leader in the area of in-memory...

INFORMATION_SCHEMA Support In MySQL, PostgreSQL
I've known about the INFORMATION_SCHEMA views (or system tables) in SQL Server for a while, but I just leared recently that they are actually part of the SQL-92...

Sun, MySQL Merger - Open Source Sinergy?
While Sun Microsystems was buying MySQL for $1 billion, Rome was guesting the international conference "Boosting innovation and growth by fostering Open Source Software trust and quality", organized by the...


06.17.08

Tracking ColdFusion Problems With SQL Server Trace

By Pete Freitag

Running a SQL Trace in the SQL Server Profiler can be a great way to track down performance problems in your ColdFusion application.

However if you have tried to run one, you probably didn't see the actualy SQL queries your ColdFusion application was sending, only things like this:

RPC:Completed exec sp_execute 1,2,4

The reason for this is that ColdFusion's JDBC Driver for SQL Server passes SQL statements through the sp_execute stored procedure, so you are only seeing the stored procedure call. You need to enable an event that is not enabled by default, the SP:StmtCompleted event.

SQL Server ColdFusion Trace Setup


When you start your trace click on the Event Selection tab, and then check Show all events then find SP:StmtCompleted under the Stored Procedures node.

The above was tested on SQL Server 2005, you may have a different UI on previous versions.

Now when you run your trace you should see your SQL Statements in the TextData column where EventClass is SP:StmpCompleted

Originally published at PeteFreitag.com.

Comments


About the Author:
Pete Freitag (http://www.petefreitag.com/) is a software engineer, and web developer located in central new york. Pete specializes in the HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete published the ColdFusion MX Developers Cookbook with SAMs Publishing.

Pete owns a Firm called Foundeo (http://foundeo.com/) that specializes in Web Consulting, and Products for Web Developers.
SQLproNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
SQLproNews.com WirelessProNews.com
CProgrammingTrends.com SysAdminNews.com


About SQLproNews
SQLproNews is a collection of up to date tutorials and insightful articles designed to help SQL users of any skill level implement successful SQL systems and practices. SQL Strategies and Tactics for Business




-- SQLProNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2008 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

advertising info | news headlines | free newsletters | comments/feedback | submit article


SQL Strategies and Tactics for Business SQLproNews News Archives About Us Feedback SQLproNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact