Showing posts with label storedprocedures. Show all posts
Showing posts with label storedprocedures. Show all posts

Sunday, March 25, 2012

Cleaning unused stored procedure best practice?

I've recently inhereted an environment in which we have over 600 stored
procedures. The documentation is either very poor or non-existant and
am needing advice on how to determine if a stored procedure has been
used. Does SQL Server have any sort of ticker that indicates when a
stored procedure was last used?

Thanks and any additional information or experience would be greatly
appreciated.Unfortunately not. You could start by using Profiler to trace stored
procedure execution - that will give you a good idea of what is used
often, but of course it won't help to identify procs that are run once
a quarter or once a year.

Simon|||That's certainly better than anything I had. Although I will run this
for a month or two (we really don't have anything that runs longer
intervals), it will certainly give me the answer I need.

Thanks!

Friday, February 10, 2012

Check Stored Procedure execution duration

Hello,
I need to check the duration of execution of some Stored
Procedures. I dont know when these stored procedures will
run, so i execute the Profiler to catch these Stored
Procedures but i dont know if im going to get the desired
result.
Am I doing it right or may i do anything else?
Best regards.
You are on the right way, Profiler is exactly the tool you need.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:15bd401c446f7$85765e10$a501280a@.phx.gbl...
> Hello,
> I need to check the duration of execution of some Stored
> Procedures. I dont know when these stored procedures will
> run, so i execute the Profiler to catch these Stored
> Procedures but i dont know if im going to get the desired
> result.
> Am I doing it right or may i do anything else?
> Best regards.
>
|||Hi,
"You are doing right."
Use Profiler - Use the template name " SQLProfilerTSQL_duration" in
profiler. In the filter you can give the procedure names you
have to trace for duration.
Thanks
Hari
MCDBA
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:15bd401c446f7$85765e10$a501280a@.phx.gbl...
> Hello,
> I need to check the duration of execution of some Stored
> Procedures. I dont know when these stored procedures will
> run, so i execute the Profiler to catch these Stored
> Procedures but i dont know if im going to get the desired
> result.
> Am I doing it right or may i do anything else?
> Best regards.
>

Check Stored Procedure execution duration

Hello,
I need to check the duration of execution of some Stored
Procedures. I dont know when these stored procedures will
run, so i execute the Profiler to catch these Stored
Procedures but i dont know if im going to get the desired
result.
Am I doing it right or may i do anything else?
Best regards.You are on the right way, Profiler is exactly the tool you need.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:15bd401c446f7$85765e10$a501280a@.phx
.gbl...
> Hello,
> I need to check the duration of execution of some Stored
> Procedures. I dont know when these stored procedures will
> run, so i execute the Profiler to catch these Stored
> Procedures but i dont know if im going to get the desired
> result.
> Am I doing it right or may i do anything else?
> Best regards.
>|||Hi,
"You are doing right."
Use Profiler - Use the template name " SQLProfilerTSQL_duration" in
profiler. In the filter you can give the procedure names you
have to trace for duration.
Thanks
Hari
MCDBA
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:15bd401c446f7$85765e10$a501280a@.phx
.gbl...
> Hello,
> I need to check the duration of execution of some Stored
> Procedures. I dont know when these stored procedures will
> run, so i execute the Profiler to catch these Stored
> Procedures but i dont know if im going to get the desired
> result.
> Am I doing it right or may i do anything else?
> Best regards.
>