Re: Radius / SQL question for Calls Table

Josh Hillman ( (no email) )
Wed, 26 Aug 1998 18:37:33 -0400

> From: Postman Account <>
> Do you have to shut down RadiusNT to delete old calls table
> information from the SQL database? (...for the previous month)

If you have enough RAM allocated to SQL Server to keep it from bogging down
the machine for an extended period of time, you do not need to do anything
with RadiusNT.
Go into SQL Enterprise Manager and click on Server, then SQL Server, then
Configure. Click on Configuration and scroll down until you see "Memory"
and adjust the "Current" value to a decent amount of RAM (this number is in
2k units, so specifying 50000 is actually 100MB). The amount of RAM you
allocate to SQL MUST be available in order for SQL Server to start, so if
you don't have much available at any given time, be careful what you choose
here. Also, you can adjust "tempdb in ram" to make things run a bit
smoother. Be ware--this is measured in MB, NOT 2k units, so allocating
"2044" is 2GB, not 4MB!

> Also, is there a command to automate the deletion process... such
> as a variable... or statement... to delete the previous month's call
> opposed to having to specifiy the previous month by name.

I typically keep 2 to 3 months worth of Calls data (excluding Start
records). Typically once a month, I manually run "DELETE FROM Calls WHERE
CallDate < '6/1/98'"

On a nightly basis (at 12:30am), I have SQL's Scheduled Task manager run
the following CmdExec command:
isql -n -E -Sservername -i\\servername\sql-script-path\Calls-Cleanup.sql

The "Calls-Cleanup.sql" script is below:

/* Delete START and null records from Calls table older than one day */

WHERE (AcctStatusType = 1 OR UserName = 'null')
AND DateDiff(Day, CallDate, GetDate()) > 1

Josh Hillman