-----Original Message-----
From: Karl-Heinz Reindl [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2003 11:27 PM
To: [EMAIL PROTECTED]

Hi All,

> I am working with ids and we had got trouble now with database 
> disk full. we started processes issed etc. and got different 
> failure messages.after solving this we started process "purgeevents"
> for a specified date and started. this exe-file is now running since 
> 20 hours.

I've run into the same issue and an a couple of times have posted some
transact SQL commands I used to use to clear our database out via a
nightly SQL Server Agent job. While using RealSecure for SQL Slammer
detection, even my nightly job wasn't working well so I looked into a
quicker process.

Since we rarely make use of the data in tables other than the events
table, I used this on the db we were feeding slammer detections to:

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

CREATE PROCEDURE [dbo].[RS_DataPurge] AS

DECLARE @deleteto DATETIME
-- slammer detections are forcing us to severly limit the online storage
to save space
SET @deleteto = DATEADD(Day, -1, GetUTCDate())

TRUNCATE TABLE eventrawdata 

TRUNCATE TABLE eventupdates

TRUNCATE TABLE eventparams

TRUNCATE TABLE eventresponse

DELETE FROM events WHERE eventdate < @deleteto

TRUNCATE TABLE eventupdatesrejected

TRUNCATE TABLE eventparamsrejected

TRUNCATE TABLE eventresponserejected

DELETE FROM eventsrejected where eventdate < @deleteto
GO

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

And ran that every day via DTS. TRUNCATE TABLE is drastic, it deletes
everything but it does so very fast. In a pinch, it can buy you space
very quickly. It's not as drastic as iss_truncateevents since that
truncates everything. My version at least leaves you with the core of
the info in events.

Once you recover, you may want to schedule a daily run of the
iss_PurgeEvents stored procedure via SQL Server Agent.

Mike Lyman
CISSP
Microsoft Corporate Security
Incident Response
PGP KEYID 0xD7BBADAD

_______________________________________________
ISSForum mailing list
[EMAIL PROTECTED]

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

Reply via email to