Re: [Emerald] SQL Server crash after scheduled task 'UpdateCalls_ServerID'

Josh Hillman ( (no email) )
Wed, 3 Feb 1999 10:34:13 -0500

From: Axel Drogoin <>
>There are about 172000 entries (3 Months) in the Calls table. Is this too

I typically store no more than 3 months of Calls data and that accumulates
to 300,000 stop records (start records and usernames of null are wiped out
nightly). The only time I've ever encountered a problem was the day before
yesterday when wiping out all Calls data from 11/1/98 - 12/1/98. My logs
filled up, so I had to truncate the logs and finish the job in a second step
(should have done 2 week's worth at a time).

>- Can i install a task that runs monthly and automtically deletes all
>entries in the calls table older than xxx months?

Here's a TSQL task that runs nightly at 4:30am to keep the Calls table
trimmed. It wipes out all Start records and all records containing a null
username that are older than 3 days.
WHERE (AcctStatusType = 1 OR UserName = 'null')
AND DateDiff(Day, CallDate, GetDate()) > 3

You can do something similar to wipe out old records (I haven't done it
yet). Maybe create a task that runs once a week to remove all records older
than so many weeks/days/months/whatever. This way, it'd be removing a few
thousand records at a time, once per week rather than wiping out tens of
thousands at once, periodically.
When the Calls table is busy doing this stuff, there are often delays with
accounting records. If it lasts too long, the records may not be retrieved
becaues the NAS will have given up after some period of time.

Josh Hillman

For more information about this list, including removal,
please see