[RADIATOR] Reducing the size of a variable
Claudio Lapidus
clapidus at gmail.com
Tue Feb 10 15:15:16 CST 2009
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,NASPort,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
>
More information about the radiator
mailing list