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
/
25216
< prev
next >
Wrap
Text File
|
2010-06-15
|
1KB
|
40 lines
CREATE PROCEDURE [dbo].[ISA_spBranchCacheSummary]
AS
BEGIN
SET NOCOUNT ON;
IF OBJECT_ID ('tblBranchCacheSummary', 'u') IS NOT NULL
DROP TABLE [tblBranchCacheSummary]
DECLARE @FromDate datetime
SET @FromDate = (SELECT [FromDate] FROM [tblSummaryParams])
DECLARE @ToDate datetime
SET @ToDate = (SELECT [ToDate] FROM [tblSummaryParams])
CREATE TABLE #RowSummaryData
(
[TMGCacheOutKB] [bigint] NULL,
[TMGCacheInKB] [bigint] NULL,
[HostedCacheOutKB] [bigint] NULL,
[HostedCacheInKB] [bigint] NULL
)
IF OBJECT_ID ('CachePerfCounters..counters', 'U') IS NOT NULL
BEGIN
INSERT INTO #RowSummaryData
SELECT
[TmgCacheRetrieved] AS [TMGCacheOutKB],
[TmgCacheStored] AS [TMGCacheInKB],
[HostedCacheRetrieved] AS [HostedCacheOutKB],
[HostedCacheStored] AS [HostedCacheInKB]
FROM CachePerfCounters..counters
WHERE ([Date] >= @FromDate AND [Date] <= @ToDate)
END
SELECT
@FromDate AS [Date],
SUM([TMGCacheOutKB]) AS [TMGCacheOutKB],
SUM([TMGCacheInKB]) AS [TMGCacheInKB],
SUM([HostedCacheOutKB]) AS [HostedCacheOutKB],
SUM([HostedCacheInKB]) AS [HostedCacheInKB]
INTO [tblBranchCacheSummary]
FROM #RowSummaryData
-- register this summary to be committed to the RS
INSERT INTO [tblSummaryTables] ([TableName]) VALUES ('tblBranchCacheSummary')
END