(RADIATOR) Problem with accounting DateFormat

Bon sy bon at bunny.cs.qc.edu
Thu Mar 4 19:57:32 CST 2004


Try this:

insert into accounting
(bytesin,bytesout,frameipaddress,nasport,sessiontime,stoptime,username)
values (20000,30000,'192.168.1.13',6,27, sysdate ,'test')

Bon


On Fri, 5 Mar 2004, Tim Russ wrote:

> Hugh,
> 
> I'm running version 3.8 of Radiator.
> 
> Using AcctColumnDef stoptime, %F, formatted also generates an Oracle error
> (see below) as the date format is not compatible (the default Oracle format
> is DD-MON-YYYY HH24:MI:SS).
> 
> Fri Mar  5 13:57:04 2004: ERR: do failed for 'insert into accounting
> (bytesin,bytesout,frameipaddress,nasport,sessiontime,stoptime,username)
> values (20000,30000,'192.168.1.13',6,27,'Mar  5, 2004 13:57:04','test')':
> ORA-01858: a non-numeric character was found where a numeric was expected
> (DBD: oexec error)
> 
> Cheers,
> THR
> 
> 
> -----Original Message-----
> From: Hugh Irvine [mailto:hugh at open.com.au]
> Sent: Friday, 5 March 2004 12:47 p.m.
> To: Tim Russ
> Cc: 'radiator at open.com.au'
> Subject: Re: (RADIATOR) Problem with accounting DateFormat
> 
> 
> 
> Hello Tim -
> 
> What version of Radiator are you running? The latest is Radiator 3.8.
> 
> There are two different sets of special characters, and "%v" is not 
> used for DateFormat's.
> 
> See section 6.2 in the Radiator 3.8 reference manual ("doc/ref.html").
> 
> The simplest thing to do is this (without any DateFormat):
> 
> 	AcctColumnDef stoptime, %F, formatted
> 
> regards
> 
> Hugh
> 
> 
> On 5 Mar 2004, at 10:28, Tim Russ wrote:
> 
> > I have Radiator running as a service on a Windows 2000 Server,
> > authenticating and (occasionally) logging to an Oracle database.
> >
> > <AuthBy SQL>
> > 	DBSource dbi:Oracle:DB_SID
> > 	DBUsername db_user
> > 	DBAuth db_pass
> > 	
> > 	AuthSelect select password from accounts where username=%0 and
> > enabled=1
> > 	
> > 	AccountingTable accounting
> > 	
> > 	HandleAcctStatusTypes Stop
> > 	
> > 	DateFormat %d-%v-%Y %H:%M:%S
> > 		
> > 	AcctColumnDef username,User-Name
> > 	AcctColumnDef nasport,NAS-Port,integer
> > 	AcctColumnDef stoptime,Timestamp,integer-date
> > 	AcctColumnDef sessiontime,Acct-Session-Time,integer
> > 	AcctColumnDef frameipaddress,%{Framed-IP-Address},formatted
> > 	AcctColumnDef bytesin,Acct-Input-Octets,integer
> > 	AcctColumnDef bytesout,Acct-Output-Octets,integer
> > 	AcctColumnDef terminatecause,Acct-Terminate-Cause
> > </AuthBy>	
> >
> > Using RADPWTST (perl c:\perl\bin\radpwtst -s localhost -user test 
> > -password
> > password -session_time 27 -framed_ip_address 192.168.1.13 -nostart 
> > -nas_port
> > 6) I end up with the following in the logfile.
> >
> > Fri Mar  5 11:47:34 2004: ERR: do failed for 'insert into accounting
> > (bytesin,bytesout,frameipaddress,nasport,sessiontime,stoptime,username)
> > values (20000,30000,'192.168.1.13',6,27,'05-%v-2004 11:47:33','test')':
> > ORA-01843: not a valid month (DBD: oexec error)
> >
> > Why is the '%v" not substituting for the abbreviated month?
> >
> > I tried switching to use 'AcctColumnDef
> > stoptime,Timestamp,formatted-date,to_date('%d-%m-%Y 
> > %H:%M:%S','DD-MM-YYYY
> > HH24:MI:SS')' instead, but now I get the following in the logfile.
> >
> > Fri Mar  5 12:17:59 2004: ERR: Could not load Date::Format for
> > formatted-date: Can't locate Date/Format.pm in @INC (@INC contains: .
> > C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/Radius/AuthSQL.pm 
> > line
> > 308.
> > Fri Mar  5 12:17:59 2004: DEBUG: do query is: 'insert into accounting
> > (bytesin,bytesout,frameipaddress,nasport,sessiontime,username) values
> > (20000,30000,'192.168.1.13',6,27,'test')':
> >
> > I can't (with PPM) find Date::Format anywhere.
> >
> > I have tried using %F, but that is not substituted for a formatted 
> > date as
> > per the documentation either.
> >
> > By commenting out the AcctColumnDef stoptime... line I have had rows
> > inserted into my accounting table, so I know that much is working, 
> > it's just
> > the dates I'm having problems with.
> >
> > Any clues?
> >
> > Tim Russ
> > Customer Service Manager
> > E-Mail: tim.russ at vmsl.co.nz
> > DDI: (+64) 6 377 7835
> > Mobile: (+64) 21 390 263
> > Vending Management Services Ltd
> > http://www.vmsl.co.nz
> >
> > CAUTION: This message may contain privileged and confidential 
> > information
> > intended only for the use of the addressee named above. If you are not 
> > the
> > intended recipient of this message, you are hereby notified that any 
> > use,
> > dissemination, distribution, or reproduction of this message is 
> > prohibited.
> > If you have received this message in error, please notify Vending 
> > Management
> > Services Limited immediately.  Any views expressed in this message are 
> > those
> > of the individual sender and may not necessarily reflect the views of
> > Vending Management Services Limited.
> >
> > --
> > Archive at http://www.open.com.au/archives/radiator/
> > Announcements on radiator-announce at open.com.au
> > To unsubscribe, email 'majordomo at open.com.au' with
> > 'unsubscribe radiator' in the body of the message.
> >
> >
> 
> NB: have you included a copy of your configuration file (no secrets),
> together with a trace 4 debug showing what is happening?
> 
> -- 
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. Available on *NIX, *BSD, Windows, MacOS X.
> -
> Nets: internetwork inventory and management - graphical, extensible,
> flexible with hardware, software, platform and database independence.
> -
> CATool: Private Certificate Authority for Unix and Unix-like systems.
> 
> --
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.
> 

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list