I have a server with SQL Server 2000 Enterprise Edition
with one production database.
Is there a way to determine the number of times a stored
procedure or view as executed within a week time interval?
Thanks,
Mike
You would have to log this yourself or with a tool. Three potentially
relevant articles:
http://www.aspfaq.com/search.asp?q=lumigent
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike
|||Mike,
No, unless you have the trace files or any logic inside the proc which will
log into some table.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike
Showing posts with label proc. Show all posts
Showing posts with label proc. Show all posts
Monday, March 26, 2012
Number times Stored Proc. executed in week?
I have a server with SQL Server 2000 Enterprise Edition
with one production database.
Is there a way to determine the number of times a stored
procedure or view as executed within a week time interval?
Thanks,
MikeYou would have to log this yourself or with a tool. Three potentially
relevant articles:
http://www.aspfaq.com/search.asp?q=lumigent
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike|||Mike,
No, unless you have the trace files or any logic inside the proc which will
log into some table.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike
with one production database.
Is there a way to determine the number of times a stored
procedure or view as executed within a week time interval?
Thanks,
MikeYou would have to log this yourself or with a tool. Three potentially
relevant articles:
http://www.aspfaq.com/search.asp?q=lumigent
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike|||Mike,
No, unless you have the trace files or any logic inside the proc which will
log into some table.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike
Number times Stored Proc. executed in week?
I have a server with SQL Server 2000 Enterprise Edition
with one production database.
Is there a way to determine the number of times a stored
procedure or view as executed within a week time interval?
Thanks,
MikeYou would have to log this yourself or with a tool. Three potentially
relevant articles:
http://www.aspfaq.com/search.asp?q=lumigent
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike|||Mike,
No, unless you have the trace files or any logic inside the proc which will
log into some table.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike
with one production database.
Is there a way to determine the number of times a stored
procedure or view as executed within a week time interval?
Thanks,
MikeYou would have to log this yourself or with a tool. Three potentially
relevant articles:
http://www.aspfaq.com/search.asp?q=lumigent
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike|||Mike,
No, unless you have the trace files or any logic inside the proc which will
log into some table.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:f81401c43dfd$d38c1610$a001280a@.phx.gbl...
> I have a server with SQL Server 2000 Enterprise Edition
> with one production database.
> Is there a way to determine the number of times a stored
> procedure or view as executed within a week time interval?
> Thanks,
> Mike
Labels:
database,
determine,
editionwith,
enterprise,
executed,
microsoft,
mysql,
number,
oracle,
proc,
production,
server,
sql,
stored,
storedprocedure
Wednesday, March 21, 2012
Number of lines of code in a SP
Hi,
How to find out the total number of lines in a stored proc programmatically?
Regards
Pradeepselect
sum(len(replace(sc.text, ' ', '_')) - len(replace(replace(sc.text, ' ', '_')
, char(13), ''))) + 1
from sysobjects so
inner join syscomments sc on
so.id = sc.id
where
name = 'myStoredProc'|||I assume this was not a question or am I wrong. And why would you be
interested in the number of lines. If you change the formatting, the
number of lines might change, but the SP is till doing the same ?
Markus|||> And why would you be
> interested in the number of lines.
I can't speak for the OP, but the number procedure lines can be a rough
indicator of application complexity. These kind of metrics can be useful in
estimating development effort for major changes, such as a rewrite or
conversion.
Hope this helps.
Dan Guzman
SQL Server MVP
<m.bohse@.quest-consultants.com> wrote in message
news:1133867063.700631.79970@.g49g2000cwa.googlegroups.com...
>I assume this was not a question or am I wrong. And why would you be
> interested in the number of lines. If you change the formatting, the
> number of lines might change, but the SP is till doing the same ?
> Markus
>|||Thats right Dan. I need it for metrics purpose only.
Regards
Pradeep
"Dan Guzman" wrote:
> I can't speak for the OP, but the number procedure lines can be a rough
> indicator of application complexity. These kind of metrics can be useful
in
> estimating development effort for major changes, such as a rewrite or
> conversion.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> <m.bohse@.quest-consultants.com> wrote in message
> news:1133867063.700631.79970@.g49g2000cwa.googlegroups.com...
>
>|||Could this be easily extended to get the lengths of all stored
procedures in a db?
"daw" <murmax@.rambler.ru> wrote:
>select
> sum(len(replace(sc.text, ' ', '_')) - len(replace(replace(sc.text, ' ', '
_'), char(13), ''))) + 1
>from sysobjects so
> inner join syscomments sc on
> so.id = sc.id
>where
> name = 'myStoredProc'
>|||On Sat, 10 Dec 2005 14:36:24 GMT, John Baima wrote:
>Could this be easily extended to get the lengths of all stored
>procedures in a db?
Hi John,
Length in lines, you mean?
Try
select
name,
sum(len(replace(sc.text, ' ', '_')) - len(replace(replace(sc.text, '
', '_'), char(13), ''))) + 1
from sysobjects so
inner join syscomments sc on
so.id = sc.id
group by
name
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
How to find out the total number of lines in a stored proc programmatically?
Regards
Pradeepselect
sum(len(replace(sc.text, ' ', '_')) - len(replace(replace(sc.text, ' ', '_')
, char(13), ''))) + 1
from sysobjects so
inner join syscomments sc on
so.id = sc.id
where
name = 'myStoredProc'|||I assume this was not a question or am I wrong. And why would you be
interested in the number of lines. If you change the formatting, the
number of lines might change, but the SP is till doing the same ?
Markus|||> And why would you be
> interested in the number of lines.
I can't speak for the OP, but the number procedure lines can be a rough
indicator of application complexity. These kind of metrics can be useful in
estimating development effort for major changes, such as a rewrite or
conversion.
Hope this helps.
Dan Guzman
SQL Server MVP
<m.bohse@.quest-consultants.com> wrote in message
news:1133867063.700631.79970@.g49g2000cwa.googlegroups.com...
>I assume this was not a question or am I wrong. And why would you be
> interested in the number of lines. If you change the formatting, the
> number of lines might change, but the SP is till doing the same ?
> Markus
>|||Thats right Dan. I need it for metrics purpose only.
Regards
Pradeep
"Dan Guzman" wrote:
> I can't speak for the OP, but the number procedure lines can be a rough
> indicator of application complexity. These kind of metrics can be useful
in
> estimating development effort for major changes, such as a rewrite or
> conversion.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> <m.bohse@.quest-consultants.com> wrote in message
> news:1133867063.700631.79970@.g49g2000cwa.googlegroups.com...
>
>|||Could this be easily extended to get the lengths of all stored
procedures in a db?
"daw" <murmax@.rambler.ru> wrote:
>select
> sum(len(replace(sc.text, ' ', '_')) - len(replace(replace(sc.text, ' ', '
_'), char(13), ''))) + 1
>from sysobjects so
> inner join syscomments sc on
> so.id = sc.id
>where
> name = 'myStoredProc'
>|||On Sat, 10 Dec 2005 14:36:24 GMT, John Baima wrote:
>Could this be easily extended to get the lengths of all stored
>procedures in a db?
Hi John,
Length in lines, you mean?
Try
select
name,
sum(len(replace(sc.text, ' ', '_')) - len(replace(replace(sc.text, '
', '_'), char(13), ''))) + 1
from sysobjects so
inner join syscomments sc on
so.id = sc.id
group by
name
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Subscribe to:
Posts (Atom)