bhermer
asked on
Using SQL profiler to view SQL generated by a third party App
We have a program (compiled VB) that queries/updates a MSDE RelA database written by a former employee. We dont have source code, just a compiled exe.
We now have need to update this program and need to understand the SQL queries being used by this program. We have SQL profiler and I thought I could use this to actually view the commands outputted by the exe to the SQL database, but all I seem to get is system events, no text.
I used these instructions to setup SQL profiler
Start Profiler
File>>New Trace
Select your server and authentication credentials
Click the Events tab in teh trace properties dialog
Remove Security Audit and Sessions
Add everything from "Stored Procedures" and "TSQL"
Click the Filters Tab, scroll down to Text Data, expand, expand like and enter %UPDATE%
Click Run, then start your application, script whatever.
Click the red stop button when done.
Please help.
We now have need to update this program and need to understand the SQL queries being used by this program. We have SQL profiler and I thought I could use this to actually view the commands outputted by the exe to the SQL database, but all I seem to get is system events, no text.
I used these instructions to setup SQL profiler
Start Profiler
File>>New Trace
Select your server and authentication credentials
Click the Events tab in teh trace properties dialog
Remove Security Audit and Sessions
Add everything from "Stored Procedures" and "TSQL"
Click the Filters Tab, scroll down to Text Data, expand, expand like and enter %UPDATE%
Click Run, then start your application, script whatever.
Click the red stop button when done.
Please help.
Remove "%update%" Text data Filter.
Instead of above filter you can use NTUserName Filter.You have to give machine no (not IP Address) on this Filter.
Instead of above filter you can use NTUserName Filter.You have to give machine no (not IP Address) on this Filter.
ASKER
ok, so all I have now is in the Events tab, 'Stored Procedures' & 'TSQL'
All i have in the trace window (and this could be me missing something really obvious) is a list of statements like the following
EventClass SPID
SP:Starting 52
SQL:StmtStarting 52
Maybe it is just my limited understanding of this program as I have never used it before, is there a way to drill into this information? How about the report it saves, do I need to view this in a special program as it isnt textual?
All i have in the trace window (and this could be me missing something really obvious) is a list of statements like the following
EventClass SPID
SP:Starting 52
SQL:StmtStarting 52
Maybe it is just my limited understanding of this program as I have never used it before, is there a way to drill into this information? How about the report it saves, do I need to view this in a special program as it isnt textual?
ASKER
btw I do have access to the DB and there is no stored procedures, so I am presuming the bloke was creating SQL at runtime based on form input and executing against the DB using recordsets
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>is there a way to drill into this information?
No - what you seee in the results rows is what you get.
>How about the report it saves, do I need to view this in a special program as it isnt textual?
No. In the trace pane at the bottom, you get all the info it gives. You can opt to save this to a file or database table too.
No - what you seee in the results rows is what you get.
>How about the report it saves, do I need to view this in a special program as it isnt textual?
No. In the trace pane at the bottom, you get all the info it gives. You can opt to save this to a file or database table too.
ASKER
Fantastic, that got it, Thankyou.
Excellent. You're welcome.
And I'd take the %update% filter off - to see if you can capture any sql - maybe it's using all stored procedure calls, and not embedded sql....