Sunday, February 19, 2012

How can I trace all Stored Procedure calls?

Hi. I was wondering if there would be any way to activate a spy or a log
that would list all the SQL calls adressed towards a specific SQL Server 2005
database.
Any idea?
Thanks in advance
SH1
Have you looked at SQL Server Profiler? You could create a server-side
trace...
Aaron Bertrand
SQL Server MVP
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
> Hi. I was wondering if there would be any way to activate a spy or a log
> that would list all the SQL calls adressed towards a specific SQL Server
> 2005
> database.
> Any idea?
> Thanks in advance
> --
> SH1
|||Never heard about this. Looks like it would do the job. I searched how to
lauch it, but the "performance tools" menu is not available in my SQL Server
2005 menu. I guess I've got SQL Server 2005 Express edition version and that
this feature is not provided with it. I will take a look to it.
I guess I will have to alter all the stored I have into the database to add
an insert statement along with a date on a new table to trace what has been
called. Not great for stored procedures updates!
Thank you for your help Aaron
SH1
"Aaron Bertrand [SQL Server MVP]" wrote:

> Have you looked at SQL Server Profiler? You could create a server-side
> trace...
> --
> Aaron Bertrand
> SQL Server MVP
>
>
> "SH1" <SH1@.discussions.microsoft.com> wrote in message
> news:354EEB97-63AA-4D08-9C7B-76DBA7AB5217@.microsoft.com...
>
>
|||I haven't worked with Express, but perhaps it is only the Profiler tool which is missing. You might
be able to still do server-side traces. These aren't as easy to work with, but for a long running
trace, you'd want it to be a server side trace in the end anyhow. So, in the end, what you are
missing is the ability to use the Profiler tool to configure a trace, and then have that tool to
script out the procedure calls to kick off this trace as a server-side trace.
Having said above, if it is possible to log from inside the relevant procedures, I'd probably go for
that instead of a server-side trace.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"SH1" <SH1@.discussions.microsoft.com> wrote in message
news:D9D50EAF-CE3E-4D3D-8FF1-A795BFA8590B@.microsoft.com...[vbcol=seagreen]
> Never heard about this. Looks like it would do the job. I searched how to
> lauch it, but the "performance tools" menu is not available in my SQL Server
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and that
> this feature is not provided with it. I will take a look to it.
> I guess I will have to alter all the stored I have into the database to add
> an insert statement along with a date on a new table to trace what has been
> called. Not great for stored procedures updates!
> Thank you for your help Aaron
> --
> SH1
>
> "Aaron Bertrand [SQL Server MVP]" wrote:

No comments:

Post a Comment