0

I have a DLL, for which I do not have the source code. It is making calls to a stored procedure in a SQL Server 2005 database. I need to know what values it is passing in as the parameters of the call.

Is there a free tool, or one that comes with SQL Server that is able to monitor and record the calls into a database?

Thanks.

Sako73
  • 9,957
  • 13
  • 57
  • 75

2 Answers2

3

You can use for this SQL Server Profiler which comes with SQL Server.

If you have an access to Microsoft SQL Server Management Studio, you find it by clicking Tools → SQL Server Profiler.

When it starts, click Connect. On Trace properties dialog, click Run. It then collects every call to the SQL Server and displays the summary at the top, and the query with its parameters at the bottom of the window.

You can also:

  • Pause or stop the profiler (icons in the toolbar),
  • Clear the current trace.

Do not forget to clear the trace before launching the action which will call the stored procedure and do not forget to pause/stop the profiling after you get the results to avoid getting too much information to analyze.


As pointed in the comments, if you are using SQL Server Express, the profiler may be missing. You may want to install a third party profiler for SQL Express instead.

Community
  • 1
  • 1
Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199
  • I have the following, but I do not see the profiler? Microsoft SQL Server Management Studio 10.50.1600.1 Microsoft Data Access Components (MDAC) 6.1.7600.16385 Microsoft MSXML 3.0 4.0 5.0 6.0 Microsoft Internet Explorer 8.0.7600.16385 Microsoft .NET Framework 2.0.50727.4952 Operating System 6.1.7600 – Sako73 Feb 16 '11 at 13:44
  • 3
    @Sako73 - What edition are you on? It doesn't come with express edition. I think there are some (free) applications about though that can be used with express. e.g. See this question http://stackoverflow.com/questions/616388/what-profiler-to-use-with-sql-express – Martin Smith Feb 16 '11 at 13:47
  • @Sako73: Look at the list of installed components. SQL Server Profiler might not be installed. – Arseni Mourzenko Feb 16 '11 at 13:47
1

Check the [Tools] menu in SQL Server Management Studio:

enter image description here

If you don't see this option, you most likely have SQL Server EXPRESS which does not come with Profiler.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459