Re: [Emerald] Can't trim calls

Dale E. Reed Jr. ( (no email) )
Wed, 11 Aug 1999 11:24:58 -0700

"David V. Brenner" wrote:
>
> We have a big problem here. For weeks now, we have been waiting for the
> right opportunity to delete calls we have in the database from May and June.
> So, last night, at about midnight, I decide to issue the SQL command to
> simply remove the records. We don't need them for billing purposes and the
> database is simply getting too big.

"Simply" is a relative word here. When you delete a large amount of
records in one single command, SQL has to log the whole thing. Hence
the reason you filled your transaction log.

> Unfortunately, after the deletion process goes on for a couple of hours, the
> transaction log (which I have now resized to 200 megs) fills up and the
> process stops - leaving all of the records that I wanted delete in place.

Yep. What you want to do is run a whoel bunch of small delete commands
the remove a small number of records at a time. For Example, let say
you have Records from May to Present day. Start from May 1 and work
your way up:

Delete From Calls
Where CallDate < '5/2/99'

Depending on how many records that deletes, add a couple days or a
week and re-run it.

> Of course, once this happens, no one can log in and our phones start
> ringing. Even worse, no matter how many times I truncate the transaction
> log, it still reports that it has 0.00 megabytes free space.

You need to do a checkdb on your database, and then re-calc the
size of it and the numbers will be corrected.

> How in the world is anyone supposed to remove call records or do a call
> consolidation when it causes this much chaos?
>
> What can I do to solve this problem? I have 415,000 call records that I
> needed deleted. Hell, while I'm at it, I might as well get rid of July as
> well, since even six weeks worth of calls seems unmanageable.

Thats only relevant to your server. We have customers that routinely
have
between 10 and 20 MILLION call records in their calls table. They
process
about 4 million a month and keep about 5 months of calls.

-- 

Dale E. Reed Jr. Emerald and RadiusNT__________________________________________IEA Software, Inc. www.iea-software.com

For more information about this list (including removal) go to:http://www.iea-software.com/support/maillists/liststart