Re: Radius / SQL question for Calls Table

Dale E. Reed Jr. ( (no email) )
Thu, 27 Aug 1998 17:29:52 -0700

Josh Hillman wrote:
>
> > Also, is there a command to automate the deletion process... such
> > as a variable... or statement... to delete the previous month's call
> data?
> > ...as 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 */
>
> DELETE FROM Calls
> WHERE (AcctStatusType = 1 OR UserName = 'null')
> AND DateDiff(Day, CallDate, GetDate()) > 1
> GO

You can just have SQL Executive execute that TSQL directly
rather than calling isql to do it. SHould be faster, less overhead and
is modifyable from any EM.

-- Dale E. Reed Jr.  (daler@iea-software.com)_________________________________________________________________       IEA Software, Inc.      |  RadiusNT, Emerald, and NT FAQs Internet Solutions for Today  |   http://www.iea-software.com