home *** CD-ROM | disk | FTP | other *** search
/ moodle.waes.ac.uk / moodle.waes.ac.uk.zip / moodle.waes.ac.uk / TMG / SP1-TMG-KB981324-AMD64-ENU.msp / PCW_CAB_SHFx2 / F2143_msfpcui.dll / BINARY / 25518 < prev    next >
Text File  |  2010-06-15  |  2KB  |  47 lines

  1. CREATE PROCEDURE [dbo].[ISA_spMalwareStatisticsRDL]
  2.     @FromDate datetime,
  3.     @ToDate datetime,
  4.     @ReportType varchar(10)
  5. AS
  6. BEGIN
  7.     -- SET NOCOUNT ON added to prevent extra result sets from
  8.     -- interfering with SELECT statements.
  9.     SET NOCOUNT ON;
  10.     DECLARE @Counters TABLE
  11.     (
  12.         CounterName nvarchar(2000),
  13.         CounterValue bigint
  14.     )
  15.     DECLARE @FilesScannedByMalwareInspection bigint
  16.     DECLARE @FilesBlockedByMalwareInspection bigint
  17.     DECLARE @FilesCleanedByMalwareInspection bigint
  18.     DECLARE @FilesContainingMalware bigint
  19.     DECLARE @AverageDurationMalwareInspection bigint
  20.     EXEC dbo.ISA_spGetCounter N'tblSiteSummary', N'Requests', "[MalwareInspectionDuration] > 0 ", @FromDate, @ToDate, @ReportType,
  21.         @FilesScannedByMalwareInspection OUTPUT
  22.     EXEC dbo.ISA_spGetCounter N'tblMalwareSummary', N'Incidents', "[MalwareInspectionAction] = 3 ", @FromDate, @ToDate, @ReportType,
  23.         @FilesBlockedByMalwareInspection OUTPUT
  24.     EXEC dbo.ISA_spGetCounter N'tblMalwareSummary', N'Incidents', "[MalwareInspectionAction] = 2 ", @FromDate, @ToDate, @ReportType,
  25.         @FilesCleanedByMalwareInspection OUTPUT
  26.     EXEC dbo.ISA_spGetCounter N'tblMalwareSummary', N'Incidents', NULL, @FromDate, @ToDate, @ReportType,
  27.         @FilesContainingMalware OUTPUT
  28.     EXEC dbo.ISA_spGetCounter N'tblSiteSummary', N'MalwareInspectionDuration', "[MalwareInspectionDuration] > 0 ", @FromDate, @ToDate, @ReportType,
  29.         @AverageDurationMalwareInspection OUTPUT
  30.     IF (@FilesScannedByMalwareInspection > 0)
  31.        SET @AverageDurationMalwareInspection = @AverageDurationMalwareInspection / @FilesScannedByMalwareInspection
  32.     ELSE
  33.        SET @AverageDurationMalwareInspection = 0
  34.     INSERT INTO @Counters
  35.     VALUES(N'{[25153]}', @FilesScannedByMalwareInspection)
  36.     INSERT INTO @Counters
  37.     VALUES(N'{[25155]}', @FilesBlockedByMalwareInspection)
  38.     INSERT INTO @Counters
  39.     VALUES(N'{[25156]}', @FilesCleanedByMalwareInspection)
  40.     INSERT INTO @Counters
  41.     VALUES(N'{[25154]}', @FilesContainingMalware)
  42.     INSERT INTO @Counters
  43.     VALUES(N'{[25157]}', @AverageDurationMalwareInspection)
  44.     -- return the counters table
  45.     SELECT * FROM @Counters
  46. END
  47.