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 200
5
database.
Any idea?
Thanks in advance
--
SH1Have 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 tha
t
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 whic
h is missing. You might
be able to still do server-side traces. These aren't as easy to work with, b
ut 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 th
en 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 procedu
res, 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 t
o
> lauch it, but the "performance tools" menu is not available in my SQL Serv
er
> 2005 menu. I guess I've got SQL Server 2005 Express edition version and t
hat
> 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 ad
d
> an insert statement along with a date on a new table to trace what has bee
n
> 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