SQL command |
Post Reply
|
| Author | |
ssullivan
Newbie
Joined: 02 February 2006 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Topic: SQL commandPosted: 02 February 2006 at 3:43pm |
|
In my SpamFilter I have it set to delete and email older than 14 days from the quarantine db, but there appears to be messages all the way back to 2004 in the database. Which table in SQL will need to be deleted to reduce this size?
Shane |
|
![]() |
|
LogSat
Admin Group
Joined: 25 January 2005 Location: United States Status: Offline Points: 4106 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 February 2006 at 5:02pm |
|
Shane,
If SpamFilter was moved to a different server it is possible that some emails will remain in the quarantine database. This is because SpamFilter supports multiple SpamFilter servers connecting to the same database. To do this, each server keeps track of the emails it quarantined. If you move SpamFilter to a new server, the old entries will be orphaned. You can issue SQL commands to manually delete older emails. First mark old emails for deletion with the following: UPDATE tblQuarantine SET &nb sp; Expire = 1 WHERE (MsgDate < '2/1/2006') The date syntax will depend on your DB platform. For Microsoft SQL for example it's: UPDATE tblQuarantine SET &nb sp; Expire = 1 WHERE (MsgDate < CONVERT(DATETIME, '2001-01-01 00:00:00', 102)) Once the older emails have been tagged for deletion, issue the following command to delete them: DELETE tblMsgs FROM tblMsgs INNER JOIN tblQuarantine ON tblMsgs.MsgID = tblQuarantine.MsgID WHERE tblQuarantine.Expire <> 0 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.271 seconds.


Topic Options
Post Options
Thanks(0)


