home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
gimli.bioss.sari.ac.uk
/
gimli.bioss.sari.ac.uk.zip
/
gimli.bioss.sari.ac.uk
/
pub
/
misc
/
McAfee8.7.Zip
/
ePOPolicyMigration.exe
/
CABFILE
/
1
/
Timestamps_Update_Script.sql
< prev
next >
Wrap
Text File
|
2007-02-28
|
1KB
|
46 lines
if exists (select * from tempdb..sysobjects where name like '#vsepolicytime%')
drop table #vsepolicytime
go
begin
-- Update the timestamps so that the agents know there are new policies
declare @Currenttime int
select @Currenttime = @@dbts
update policy set TheTimestamp = @Currenttime
where ProductCode = 'VIRUSCAN8600'
select parentid as autoid, parenttype, max(thetimestamp)as maxtime
into #vsepolicytime
from policy
where ProductCode = 'VIRUSCAN8600'
group by parentid, parenttype
update leafnode
set policytimestamp = #vsepolicytime.maxtime + 1
from #vsepolicytime
where leafnode.autoid = #vsepolicytime.autoid
and #vsepolicytime.parenttype = leafnode.type
update branchnode
set policytimestamp = #vsepolicytime.maxtime + 1
from #vsepolicytime
where branchnode.autoid = #vsepolicytime.autoid
and #vsepolicytime.parenttype = branchnode.type
update policysettings set TheTimestamp = @Currenttime
from policy
where policysettings.parentid = policy.autoid
and policy.ProductCode = 'VIRUSCAN8600'
end
go
if exists (select * from tempdb..sysobjects where name like '#vsepolicytime%')
drop table #vsepolicytime
go