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 / 25081 < prev    next >
Text File  |  2010-06-15  |  1KB  |  31 lines

  1. CREATE PROCEDURE [ISA_spObjectTypeSummary]
  2. AS
  3. BEGIN
  4.     SET NOCOUNT ON;
  5.     IF OBJECT_ID ('tblObjectTypeSummary', 'u') IS NOT NULL
  6.         DROP TABLE [tblObjectTypeSummary]
  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
  12.             [mimetype] AS ObjectName,
  13.             SUM([bytesrecvd]) AS BytesIn,
  14.             SUM([bytessent]) AS BytesOut,
  15.             SUM([bytesrecvd]) + SUM([bytessent]) AS TotalBytes,
  16.             COUNT(*) AS Requests,
  17.             @FromDate AS Date
  18.         INTO [tblObjectTypeSummary]
  19.         FROM WEB_LOGS
  20.         WHERE
  21.             ([InternalServiceInfo] & 2) = 0 AND
  22.             ([Action] != 8) AND
  23.             ([resultcode] != 13301) AND
  24.             ([Action] != 10) AND
  25.             ([objectsource] != 6)
  26.         GROUP BY
  27.             [mimetype]
  28.     END
  29.     INSERT INTO [tblSummaryTables] ([TableName]) VALUES ('tblObjectTypeSummary')
  30. END
  31.