[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ISSForum] Event Collector



To purge SP DB I use the following script (everyday sqlserver job):
/*
 * DB Purge, svsoldatov 24.06.2004
 */

USE RealSecureDB


declare @today datetime   --today date
declare @deltaSD int      --how long SensorSata have to be stored
declare @deltaObs int     --how long Observances have to be stored
declare @edgeSD datetime  --oldest date in SensorData
declare @edgeObs datetime --oldest date in Obserances
select @deltaSD = -120
select @deltaObs = -150

select @today = getdate()
select @edgeSD = DATEADD ( day , @deltaSD, @today)
select @edgeObs = DATEADD ( day , @deltaObs, @today)
--select @today as 'Today', @edgeSD as 'Edge of SensorData', @edgeObs as
'Edge of Observances'
--select min(AlertDateTime) as 'Min', max(AlertDateTime)as 'Max' from
SensorData

exec iss_PurgeSD @edgeSD
exec iss_PurgeObs @edgeObs


If someone find mistakes, PLEASE, let me know how to correct them. I do not
like use DB maintenance, because I found that it doesn't work correctly in
some circumstances (may be now all problems are fixed, but I still trust my
simple script more).

Thank you all for probable reply.

---
Best regards, Sergey V. Soldatov.
Information security department.


                                                                                                                    
              "Steven Nichols"                                                                                      
              <NicholsS@xxxxxxxxxxxxx>         To:       <issforum@xxxxxxx>                                         
              Sent by:                         cc:                                                                  
              issforum-bounces@xxxxxxx         Subject:  [ISSForum] Event Collector                                 
                                                                                                                    
                                                                                                                    
              05.01.2005 21:03                                                                                      
                                                                                                                    
                                                                                                                    




Can anyone tell me how to purge the database?
The RealSecureDB.mdf is 7.6G. I can't find any faq or how to.
Thanks


========================


Steven Nichols

Senior Network Administrator
direct line: 503.352.1139
cell phone: 503.807.9624
e-mail: nicholss@xxxxxxxxxxxxx

 ----------------------------------

LDC Design Group
20085 NW Tanasbourne Drive
Hillsboro, Oregon 97124
t: 503.858.4242
f: 503.645.5500
e: hillsboro@xxxxxxxxxxxxx <mailto:revellc@xxxxxxxxxxxxx>
w: www.ldcdesign.com <http://www.ldcdesign.com/>


OR: Hillsboro, Tillamook | WA: Vancouver, Bellevue | ID: Coeur d' Alene
| CA: Sacramento | FL: Clermont


DISCLAIMER: This message is intended for the sole use of the individual
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the addressee you are hereby notified that you may not use, copy,
disclose, or distribute to anyone the message or any information
contained in the message. If you have received this message in error,
please immediately advise the sender by reply email and delete this
message.

_______________________________________________
ISSForum mailing list
ISSForum@xxxxxxx

TO UNSUBSCRIBE OR CHANGE YOUR SUBSCRIPTION, go to
https://atla-mm1.iss.net/mailman/listinfo/issforum

To contact the ISSForum Moderator, send email to mod-issforum@xxxxxxx

The ISSForum mailing list is hosted and managed by Internet Security
Systems, 6303 Barfield Road, Atlanta, Georgia, USA 30328.





_______________________________________________
ISSForum mailing list
ISSForum@xxxxxxx

TO UNSUBSCRIBE OR CHANGE YOUR SUBSCRIPTION, go to https://atla-mm1.iss.net/mailman/listinfo/issforum

To contact the ISSForum Moderator, send email to mod-issforum@xxxxxxx

The ISSForum mailing list is hosted and managed by Internet Security Systems, 6303 Barfield Road, Atlanta, Georgia, USA 30328.