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
/
25558
< prev
next >
Wrap
Text File
|
2010-06-15
|
1KB
|
37 lines
CREATE PROCEDURE [dbo].[ISA_spUrlfStatisticsRDL]
@FromDate datetime,
@ToDate datetime,
@ReportType varchar(10)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
DECLARE @Counters TABLE
(
CounterName nvarchar(2000),
CounterValue bigint
)
DECLARE @TotalBlockedRequests bigint
DECLARE @TotalAllowedRequests bigint
DECLARE @AvgBlockedRequestsPerDay bigint
EXEC dbo.ISA_spGetCounter N'tblUrlfSummary', N'Requests', "([Action] = 1) AND ([UrlfMatched] = 1)", @FromDate, @ToDate, @ReportType,
@TotalBlockedRequests OUTPUT
EXEC dbo.ISA_spGetCounter N'tblUrlfSummary', N'Requests', "([Action] = 0) AND ([UrlfMatched] = 1)", @FromDate, @ToDate, @ReportType,
@TotalAllowedRequests OUTPUT
DECLARE @daydiff bigint
SET @daydiff = DATEDIFF(day, @FromDate, @ToDate) + 1
IF (@daydiff = 0)
SET @AvgBlockedRequestsPerDay = -1
ELSE
SET @AvgBlockedRequestsPerDay = @TotalBlockedRequests / @daydiff
INSERT INTO @Counters
VALUES(N'{[25185]}', @TotalBlockedRequests)
INSERT INTO @Counters
VALUES(N'{[25186]}', @TotalAllowedRequests)
INSERT INTO @Counters
VALUES(N'{[25187]}', @AvgBlockedRequestsPerDay)
-- return the counters table
SELECT * FROM @Counters
END