Suggestions for query on calls table??

Mike Miller ( )
Fri, 24 Jul 1998 11:54:57 -0400

We are running RadiusNT 2.2 with ODBC & SQL 6.5. One of our old NAS's that
we plan on getting rid of in the near future (this is not critical)
occasionally reports an invalid AcctSessionTime to Radius. In particular,
the NAS is a USRobotics Netserver 16I running V.90 code (not sure exactly
what version number at the moment). The Netserver will from time to time
report a negative number for a users AcctSessionTime in the accounting stop
record. This negative number gets inserted into our calls table by Radius.
I plan on writing a trigger on the calls table to block these negative
values from getting entered, but I still need to cleanup the ones already
in our calls table since it is causing our reports to be incorrect. I
tried running a simple query with iSQLw:

SET AcctSessionTime=0
WHERE AcctSessionTime<0

We keep two months accounting data (consolidated nightly) in a 500MB SQL
database. The above query does not work because it takes a long time to
process during which time the calls table gets locked and causes Radius to
freeze since it can not record the accounting requests. Is there a better
query to write to accomplish this task of altering negative AcctSessionTime
records to set them to 0? Also, out of curiosity, has anyone else ever had
a Netserver start doing this? Ours started after the V.90 code load.
While it is only about 3 records per month that are corrupt, it still makes
for troublesome reporting.


==================================================== /\ Mike A. Miller == /--\ \/ Abraxis Networks ==/ \ B R A /\ I S == / == N E T W O R K S