[RADIATOR] Reducing the size of a variable

Wallner Martin Martin.Wallner at etel.at
Wed Feb 11 02:16:10 CST 2009


Hi Gilbert, 

I'm also chiming in here that it would be better to make a nice varchar out of the acct-session-id field, it's not an integer one, and I saw a lot of NAS sending a LOT more than 30 characters as an ID-String... 

regards
Martin Wallner

-----Ursprüngliche Nachricht-----
Von: radiator-bounces at open.com.au [mailto:radiator-bounces at open.com.au] Im Auftrag von Claudio Lapidus
Gesendet: Dienstag, 10. Februar 2009 22:15
An: Gilbert T. Gutierrez, Jr.; radiator at open.com.au (radiator at open.com.au)
Betreff: Re: [RADIATOR] Reducing the size of a variable

Hello Gilbert,

Have you checked your table creation statement inside MSSQL? I'm by no means expert in that particular DB, but I'm absolutely sure it can handle strings MUCH longer than 10. You may want to define the field as VARCHAR(253), which is the absolute longest string you can get in RADIUS.

Please bear in mind that Acct-Session-Id is arbitrary text that uniquely identifies a particular session. If you truncate it, you may end up mixing together data from different sessions.

hope this helps,
cl.


On Tue, Feb 10, 2009 at 3:41 PM, Gilbert T. Gutierrez, Jr.
<Gilbert.G at phoenixinternet.net> wrote:
> I am getting the following errorTue Feb 10 10:02:48 2009: ERR: do 
> failed for 'insert into Calls 
> (AcctDelayTime,AcctSessionId,AcctStatusType,CallDate,NASIdentifier,NAS
> Port,U
> serName) values (50,'1/0/0/1.69_0000040B',1,'Feb 10, 2009
> 10:02','x.x.x.x',268501061,'familyinn')': [Microsoft][ODBC SQL Server 
> Driver][SQL Server]String or binary data would be truncated. 
> (SQL-22001) [state was 22001 now 01000]
>
>
> The system is having problems with the AcctSessionID field.  The MSSQL 
> database only allows for a string of 10 characters.  How can I 
> truncate the string before Radiator pushes it to the database?  Below 
> is my Realm Definition.
>
> <Realm DEFAULT>
>        <AuthBy EMERALD>
>                DBSource        dbi:ODBC:Platypus
>                DBUsername      xxxx
>                DBAuth          xxxx
>                AddATDefaults
>
>                AccountingTable Calls
>                AcctColumnDef   UserName,User-Name
>                AcctColumnDef   CallDate,Timestamp,integer-date
>                AcctColumnDef   AcctStatusType,Acct-Status-Type,integer
>                AcctColumnDef   AcctDelayTime,Acct-Delay-Time,integer
>                AcctColumnDef   AcctInputOctets,Acct-Input-Octets,integer
>                AcctColumnDef   AcctOutputOctets,Acct-Output-Octets,integer
>                AcctColumnDef   AcctSessionId,Acct-Session-Id
>                AcctColumnDef   AcctSessionTime,Acct-Session-Time,integer
>                AcctColumnDef
> AcctTerminateCause,Acct-Terminate-Cause,integer
>                AcctColumnDef   NASIdentifier,NAS-Identifier
>                AcctColumnDef   NASIdentifier,NAS-IP-Address
>                AcctColumnDef   NASPort,NAS-Port,integer
>                AcctColumnDef   CallerID,Calling-Station-ID
>        </AuthBy>
>        <Log EMERALD>
>                DBSource        dbi:ODBC:Platypus
>                DBUsername      platypus
>                DBAuth          big0mess
>        </Log>
> </Realm>
>
>
> Thank you,
> Gilbert T. Gutierrez, Jr.
>
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator
>

_______________________________________________
radiator mailing list
radiator at open.com.au
http://www.open.com.au/mailman/listinfo/radiator



More information about the radiator mailing list