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 / 25116 < prev    next >
Text File  |  2010-06-15  |  871b  |  27 lines

  1. CREATE PROCEDURE [ISA_spCacheSummary]
  2. AS
  3. BEGIN
  4.     SET NOCOUNT ON;
  5.     IF OBJECT_ID ('tblCacheSummary', 'u') IS NOT NULL
  6.         DROP TABLE [tblCacheSummary]
  7.     DECLARE @FromDate datetime
  8.     SET @FromDate = (SELECT [FromDate] FROM [tblSummaryParams])
  9.     IF OBJECT_ID ('WEB_LOGS', 'view') IS NOT NULL
  10.     BEGIN
  11.         SELECT [objectsource] AS Response
  12.               ,COUNT(*) as Requests
  13.               ,Sum([bytesrecvd]) as TotalBytes
  14.               ,@FromDate AS Date
  15.         INTO [tblCacheSummary]
  16.         FROM WEB_LOGS
  17.         WHERE
  18.             ([Action] != 8) AND
  19.             ([resultcode] != 13301) AND
  20.             ([Action] != 10) AND
  21.             ([objectsource] != 6) AND
  22.             ([InternalServiceInfo] & 2) = 0
  23.         GROUP BY [objectsource]
  24.     END
  25.     INSERT INTO [tblSummaryTables] ([TableName]) VALUES ('tblCacheSummary')
  26. END
  27.