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
/
25218
< prev
next >
Wrap
Text File
|
2010-06-15
|
977b
|
29 lines
CREATE PROCEDURE [dbo].[ISA_spBranchCacheSummaryMonthly]
@CurrentMonthFirstDay datetime,
@CurrentMonthLastDay datetime,
@LastDailyToKeep datetime,
@LastMonthlyToKeep datetime
AS
BEGIN
SET NOCOUNT ON;
-- move dailies to monthlies
INSERT INTO dbo.tblBranchCacheSummary_Monthly
SELECT
@CurrentMonthFirstDay AS [Date],
SUM([TMGCacheOutKB]) AS [TMGCacheOutKB],
SUM([TMGCacheInKB]) AS [TMGCacheInKB],
SUM([HostedCacheOutKB]) AS [HostedCacheOutKB],
SUM([HostedCacheInKB]) AS [HostedCacheInKB]
FROM dbo.tblBranchCacheSummary_Daily
WHERE (Date >= @CurrentMonthFirstDay) AND (Date <= @CurrentMonthLastDay)
-- cleanup dailies
DELETE FROM [ISA_RS_Db].[dbo].[tblBranchCacheSummary_Daily]
WHERE (Date < @LastDailyToKeep)
-- cleanup monthlies
DELETE FROM [ISA_RS_Db].[dbo].[tblBranchCacheSummary_Monthly]
WHERE (Date < @LastMonthlyToKeep)
END