Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 221
JosephStyons Avatar asked Sep 21 '08 15:09

JosephStyons


3 Answers

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

like image 100
Kev Avatar answered Sep 28 '22 16:09

Kev


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.

like image 24
Vinko Vrsalovic Avatar answered Sep 28 '22 15:09

Vinko Vrsalovic


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

like image 36
Nick Craver Avatar answered Sep 28 '22 16:09

Nick Craver