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 storedprocedure. Show all posts
Showing posts with label storedprocedure. 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
Labels:
database,
determine,
editionwith,
enterprise,
executed,
microsoft,
mysql,
number,
oracle,
proc,
production,
server,
sql,
stored,
storedprocedure
Monday, February 20, 2012
NULL output when trying to script objects with SQL-DMO
The following statement SHOULD generate a script of the specified stored
procedure. Instead, it returns NULL. Please tell me what I'm doign wrong:
DECLARE @.oServer int
DECLARE @.method varchar(300)
DECLARE @.TSQL varchar(4000)
DECLARE @.ScriptType int
EXEC sp_OACreate 'SQLDMO.SQLServer', @.oServer OUT
EXEC sp_OASetProperty @.oServer, 'loginsecure', 'true'
EXEC sp_OAMethod @.oServer, 'Connect', NULL, 'US1SQLDEV'
SET @.ScriptType = 1|4|32|64|256|262144
SET @.method = 'Databases("Compass").' +
'StoredProcedures("p_rpt_Distance").Script' +
'(' + CAST (@.ScriptType AS VARCHAR) + ')'
EXEC sp_OAMethod @.oServer, @.method ,
@.TSQL OUTPUT
SELECT @.TSQL
EXEC sp_OADestroy @.oServercongratulations, you've found the slowest possible way to do this ;)
if your sql is going to be <=4000 chars, you should just go against
syscomments. otherwise, your variable won't be big enough, anyway.
if you're dead-set on using the object junk, check the script type.
you've got the script type of 64 (To File only) set, but no file name to
output to.
CadeBryant wrote:
> The following statement SHOULD generate a script of the specified stored
> procedure. Instead, it returns NULL. Please tell me what I'm doign wrong
:
> DECLARE @.oServer int
> DECLARE @.method varchar(300)
> DECLARE @.TSQL varchar(4000)
> DECLARE @.ScriptType int
> EXEC sp_OACreate 'SQLDMO.SQLServer', @.oServer OUT
> EXEC sp_OASetProperty @.oServer, 'loginsecure', 'true'
> EXEC sp_OAMethod @.oServer, 'Connect', NULL, 'US1SQLDEV'
> SET @.ScriptType = 1|4|32|64|256|262144
> SET @.method = 'Databases("Compass").' +
> 'StoredProcedures("p_rpt_Distance").Script' +
> '(' + CAST (@.ScriptType AS VARCHAR) + ')'
> EXEC sp_OAMethod @.oServer, @.method ,
> @.TSQL OUTPUT
> SELECT @.TSQL
> EXEC sp_OADestroy @.oServer
procedure. Instead, it returns NULL. Please tell me what I'm doign wrong:
DECLARE @.oServer int
DECLARE @.method varchar(300)
DECLARE @.TSQL varchar(4000)
DECLARE @.ScriptType int
EXEC sp_OACreate 'SQLDMO.SQLServer', @.oServer OUT
EXEC sp_OASetProperty @.oServer, 'loginsecure', 'true'
EXEC sp_OAMethod @.oServer, 'Connect', NULL, 'US1SQLDEV'
SET @.ScriptType = 1|4|32|64|256|262144
SET @.method = 'Databases("Compass").' +
'StoredProcedures("p_rpt_Distance").Script' +
'(' + CAST (@.ScriptType AS VARCHAR) + ')'
EXEC sp_OAMethod @.oServer, @.method ,
@.TSQL OUTPUT
SELECT @.TSQL
EXEC sp_OADestroy @.oServercongratulations, you've found the slowest possible way to do this ;)
if your sql is going to be <=4000 chars, you should just go against
syscomments. otherwise, your variable won't be big enough, anyway.
if you're dead-set on using the object junk, check the script type.
you've got the script type of 64 (To File only) set, but no file name to
output to.
CadeBryant wrote:
> The following statement SHOULD generate a script of the specified stored
> procedure. Instead, it returns NULL. Please tell me what I'm doign wrong
:
> DECLARE @.oServer int
> DECLARE @.method varchar(300)
> DECLARE @.TSQL varchar(4000)
> DECLARE @.ScriptType int
> EXEC sp_OACreate 'SQLDMO.SQLServer', @.oServer OUT
> EXEC sp_OASetProperty @.oServer, 'loginsecure', 'true'
> EXEC sp_OAMethod @.oServer, 'Connect', NULL, 'US1SQLDEV'
> SET @.ScriptType = 1|4|32|64|256|262144
> SET @.method = 'Databases("Compass").' +
> 'StoredProcedures("p_rpt_Distance").Script' +
> '(' + CAST (@.ScriptType AS VARCHAR) + ')'
> EXEC sp_OAMethod @.oServer, @.method ,
> @.TSQL OUTPUT
> SELECT @.TSQL
> EXEC sp_OADestroy @.oServer
Subscribe to:
Posts (Atom)