Microsoft SQL Server Articles

Links, articles, scripts, tips, and other technical sources for managing SQL Server. DBALinks is dedicated to SQL Server and database administration.

ABOUT SQL SERVER

 

 

Articles | Categories | Search | Syndication

Analyse Performance Counters

Analyse Performance Counters
151 Views :: 0 Reviews :: :: Housekeeping Scripts
 


SET NOCOUNT ON

declare @n int
set @n = 1

while @n <=27
begin
 select 'select ''' + ObjectName + '--' + CounterName + ''' as CounterName,
 b.CounterValue,
 b.CounterDateTime
from CounterDetails a inner join CounterData b
 on a.counterID = b.counterID
where a.counterID = ' + convert(nvarchar,CounterID) + '
 and CounterDateTime between ''2009-01-07 08:30:03.824'' and ''2009-01-07 08:50:03.824''
GO' from CounterDetails where CounterID = @n
 set @n = @n + 1
end

 

Rating
Reviews
Currently, there are no reviews. Be the first to post one!
Click here to post a review