Greetings All,
I am using SSRS to build out reports for disk space, CPU, and other
metrics. Disk space and other metrics are pretty simple to put in a
tablix and make it look good but the TopCPUProcs and TopMemory Procs I
am having a problem with. The query I am using is:
_____________________________
declare @ServerName as varchar(100)

--Get UTC Time
declare @UTCtd AS datetime
set @UTCtd = getutcdate()

--Get Today's Date and Time
declare @TodayTD AS datetime

set @TodayTD = GETDATE()

--Get Time Zone Informaiton
declare @TimeDif as int
set @TimeDif = DATEDIFF(hh, getutcdate(), getdate())

select
DataHeader.ObjID as ObjID,
DataHeader.DataID as DataHeaderID,
DataHeader.MachineName,
DataHeader.Status as DataStatus,
REPLACE(DataHeader.Legend, 'Top Processes Consuming the CPU^^%', 'CPU
Utilization') as Legend,
DATEADD (HH,@TimeDif,dbo.fnSQLDateTime (Data.ModificationTime)) as
DataModTime,
Data.Value,
convert(text,Data.Detaillong) as Detaillong,
DataHeader.Interval,
Data.ModificationTime,
DATEADD(ss, DataHeader.Interval,DATEADD (HH,@TimeDif,dbo.fnSQLDateTime
(DataHeader.ModificationTime))) as NextCheck,
--The Math is (Current Date) - (DataHeader.ModificationTime) =
DataAgeMinutes
DATEDIFF(mi, @TodayTD, (DATEADD (HH,@TimeDif,dbo.fnSQLDateTime
(Data.ModificationTime)))) as DataAgeMinutes
from
DataHeader with (NOLOCK)
Left Join Data on DataHeader.DataID = Data.DataID
where
DataHeader.MachineName in (@ServerName)
and
KPName like '%TopCPUProc%'
and
DataHeader.Status <> 134217728

order by data.ModificationTime desc
_________________________________________

@ServerName is passed in SSRS to get the right server name. The issue I
am having is presenting the "DetailLong" data, it looks like it's in XML
but I can't seem to get it formated correctly in SSRS. Can that data
some how be reformated so it is SSRS friendly? Many thanks in advance
for your help.

v/r
Chris


--
abel5405
------------------------------------------------------------------------
abel5405's Profile: https://forums.netiq.com/member.php?userid=5035
View this thread: https://forums.netiq.com/showthread.php?t=53142