Hi,

Instead of truncate the whole DB, you may try to purge a specific range of
events.

Open a command prompt from the machine running MSDE.
1. Type "osql -E" and press enter;
2. Type "use issed" and press enter;
3. Type "exec iss_purgeevents 'START_DATE START_TIME','END_DATE
END_TIME',100" and press enter;
E.g. exec iss_purgeevents '1/1/2002 00:00:00','12/31/2002 00:00:00',100
NOTE: The date and time will need to be modified so that the command
will only clear a specific date range. The command above will clear
anything entered in the database between January 1, 2002 at midnight,
and December 31, 2002 at midnight.
4. Type go and press enter;
The specified event range has now been cleared from the ISSED database.

Regards

Kin
[EMAIL PROTECTED]




                                                                                       
                                                
                      Michael Liu                                                      
                                                
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]              
                                                
                      .hk>                     cc:                                     
                                                
                      Sent by:                 Subject:  [ISSForum] SQL maintenance 
for ISS table                                      
                      issforum-admin@is                                                
                                                
                      s.net                                                            
                                                
                                                                                       
                                                
                                                                                       
                                                
                      02/15/2003 10:10                                                 
                                                
                      AM                                                               
                                                
                                                                                       
                                                
                                                                                       
                                                




Hi,

I am using MS SQL as database for my ISS RealSecure network sensors and
server sensors event
log.
In order to control the database size, I need to truncate the ISS tables
(events, eventresponse
etc) every month to clear the logged data.
However, I also need to keep the last week data in the table for reporting
purpose.
Is there any good way to keep the last week data after truncating the
tables? How can I
temporary select & store the last week data into some temporary tables and
insert the last week
data back to the ISS tables after truncation?

Following are the tables that I run monthly for clearing the logged data.
---- SQL script start --------------------------------
truncate table events
truncate table eventresponse
truncate table eventparams
truncate table eventupdates
truncate table eventrawdata
truncate table eventsrejected
truncate table eventresponserejected
truncate table eventparamsrejected
truncate table eventupdatesrejected
---- SQL script end --------------------------------

Thanks for helping in advance.

Michael Liu

_______________________________________________
ISSForum mailing list
[EMAIL PROTECTED]

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




_______________________________________________
ISSForum mailing list
[EMAIL PROTECTED]

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

Reply via email to