Re: [RadiusNT] Fw: ODBC ERROR

Dale E. Reed Jr. ( (no email) )
Sat, 19 Jun 1999 11:12:23 -0700

> rdudek wrote:
>
> I have a problem with Emerald on SQL 7.0 it does not clear
> the on line users with the following error.
>
> SQL Statement: INSERT INTO Calls
> (CallDate,UserName,NASIdentifier,NASPort,NASPortType,AcctStatusType,AcctDelayTime,AcctSessionId,AcctSessionTime,AcctInputOctets,AcctOutputOctets,NASPortDNIS,FramedAddress)
> VALUES
> (GetDate(),'rst1marg','209.112.15.3',20104,0,2,0,'289202448',729,86636,604852,'0301','209.112.15.141')
>
> ODBC Error:23000:2627:
>
> *[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY
> KEY constra
>
> int 'pk_Calls'. Cannot insert duplicate key in object 'Calls'.
>
> Sending Accounting Ack of id 118 to d1700f03 (as2-cam.thenew.net)
>
> Resp Time: 20 Auth: 33/0 -> 33 Acct: 47/0/12 -> 59

This really isn't an SQL 7 issue, its a more generic problem that
occurs with all falvors of databases used with RadiusNT. The problem
is that RadisuNT has already received this accounting packet, and it
will only store each accounting packet once. Now if this is not
a duplicate accounting record, then you may need to look at why it
matches another record. I know that some USR models are notorious
for re-using the AcctSessionID for different sessions, which can
cause this problem as well.

One thing you might be able to do is add the username into the
primary key to give a larger key to try and cut down on the
duplicates.

-- 

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