JosephStyons
JosephStyons

Reputation: 58685

Is there a tool to monitor the SQL statements being executed by an .EXE?

I'd like to be able to hook into a 3rd party application to see what SQL Statements are being executed. Specifically, it is a VB6 application running on SQL Server 2005.

For example, when the application fills out a grid, I'd like to be able to see exactly what query produced that data.

Upvotes: 5

Views: 931

Answers (4)

Knox
Knox

Reputation: 2919

Reviewing it on the server as other answers indicate is most likely the best way to go. However, if that's not available, you can also turn on ODBC logging which may be helpful.

Upvotes: 0

Nick Craver
Nick Craver

Reputation: 630389

You can view it server side by connecting to the SQL server with the SQL Server Profiler included in the tools. Here's a usage run down of it from Microsoft

Upvotes: 1

Vinko Vrsalovic
Vinko Vrsalovic

Reputation: 340221

If the application does not write a log or something, the only way to watch them is on the database side. SQL Profiler is the proper tool for the task on MSSQL 2005.

Upvotes: 1

Kev
Kev

Reputation: 119806

If you have the appropriate rights (sysadmin or ALTER TRACE permission) on the DB you could watch using SQL Profiler.

Upvotes: 12

Related Questions