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
/
25031
< prev
next >
Wrap
Text File
|
2010-06-15
|
2KB
|
50 lines
CREATE PROCEDURE [dbo].[ISA_spCommitSummaries]
AS
BEGIN
SET NOCOUNT ON;
DECLARE @RemoteRegTblName varchar(300)
SET @RemoteRegTblName = '[Temp_' + @@SERVERNAME + '_tblSummaryTables]'
EXECUTE ISA_spUrlfTelemtrySummary
-- empty registry table
DECLARE @strSQL varchar(500)
SET @strSQL = 'RS_SRV.ISA_RS_Db.dbo.ISA_spFlushCommitedInit ' + @RemoteRegTblName
PRINT 'Executing: ' + @strSQL
EXECUTE(@strSQL)
-- loop through all registered tabled entries
DECLARE @SummaryTblName varchar(100)
IF EXISTS (SELECT [TableName] FROM tblSummaryTables)
BEGIN
DECLARE tbl_cursor CURSOR FOR
SELECT [TableName] FROM tblSummaryTables
DECLARE @remoteTbl varchar(500)
OPEN tbl_cursor
FETCH NEXT FROM tbl_cursor INTO @SummaryTblName
WHILE (@@FETCH_STATUS = 0)
BEGIN
SET @remoteTbl = '[Temp_' + @@SERVERNAME + @SummaryTblName + ']'
EXECUTE ISA_spCommitSingleSummary
@tblName = @SummaryTblName,
@RemoteTblName = @remoteTbl,
@RemoteRegistryTblName = @RemoteRegTblName
FETCH NEXT FROM tbl_cursor INTO @SummaryTblName
END
CLOSE tbl_cursor
DEALLOCATE tbl_cursor
END
-- now flush our temp tables
SET @strSQL = 'RS_SRV.ISA_RS_Db.dbo.ISA_spFlushServerCommitedTables ' + @RemoteRegTblName
PRINT 'Executing: ' + @strSQL
EXECUTE(@strSQL)
PRINT 'Successfully commited summaries'
END