I'll confess that I know more about Oracle than free-radius at this time (I
am just now setting up free-radius) however, I suspect that to_date is not
being evaluated by FreeRadius, only by Oracle. However, the format provided
to 'to_date' must match the format provided by the FreeRadius '%S' variable.
A time of '0' will not be a valid time for any Oracle related date(and time)
functions. Assuming you just don't want to store the AcctStopTime, just
modify the query to write a NULL - if the column allows nulls. If it
doesn't allow NULL values and you don't want to change the column
definition, you can just hardcode an epoch value using to_date:
to_date('01-JAN-1970', 'DD-MON-YYYY')
>From what I see in your message below, you have figured out the correct
query (or insert actually) to make it function properly.
Hope this helps. If not, I'll just defer to Alan.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Mieczyslaw
Maciejewski (EPO)
Sent: Friday, October 11, 2002 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Oracle accounting
I was not precise, I meant:
"please comment if using to_date in "insert into radacct" will be OK for
freeradius"
Another problem will arise with AcctStopTime equal to 0 during starting
accounting, it will not work with "to_date"
-----Original Message-----
From: Tim D. McCracken [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 7:27 PM
To: [EMAIL PROTECTED]
Subject: RE: Oracle accounting
'to_date' is an Oracle function for converting dates from strings in a
non-oracle
standard format. It is well documented in any Oracle reference manuals.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Mieczyslaw
Maciejewski (EPO)
Sent: Friday, October 11, 2002 9:37 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Oracle accounting
Thx
Could you comment using "to_date" in "INSERT into radacct.... "
instruction, please.
MM
-----Original Message-----
From: Mieczyslaw Maciejewski (EPO)
[mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 4:16 PM
To: '[EMAIL PROTECTED]'
Subject: Oracle accounting
Solaris 8, freeradius 0.71.
I just edited sql.conf (for oracle accounting only purposes).
What I noticed: it doesn't work
When I changed SQL instruction from (I publish here only a fragment):
accounting_start_query = "INSERT into radacct (AcctStartTime) values('%S')"
Into instruction:
accounting_start_query = "INSERT into radacct (AcctStartTime )
values(to_date('%S', 'YYYY-MM-DD HH24:MI:SS'))"
then the data began to be written in table. For tests I use radius client
NTRadPing 1.2 for Windows. The client generates accounting requests.
I don't know if I made some mistake during ./configure?
I guess that %S means 'system time'. I didn't find explanation of %S in SQL
nor Unix shell documentation. Could you comment it, please?
Thanks
MM
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html