• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

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.
0
bhermer
Asked:
bhermer
  • 4
  • 3
1 Solution
 
twoboatsCommented:
You have added the text data to the Data Columns output?

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....
0
 
itkmanojCommented:
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.
0
 
bhermerAuthor Commented:
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?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
bhermerAuthor Commented:
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
0
 
twoboatsCommented:
On the Data Columns tab, add in Text Data - this is the column you need to see the sql statements.
0
 
twoboatsCommented:
>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.
0
 
bhermerAuthor Commented:
Fantastic, that got it, Thankyou.

0
 
twoboatsCommented:
Excellent. You're welcome.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now