Hello, is it possible to call only a simple "Stored Procedure" (SP) on the MySQL-Server to do the Accounting Job, like the sql-log module (rlm_sql_log(5)), but do not log in file, instead of this, call the SP: I can't find more Information for such configuration. Thanx for help, Tim
is it possible to call only a simple "Stored Procedure" (SP) on the MySQL-Server to do the Accounting Job, like the sql-log module (rlm_sql_log(5)), but do not log in file, instead of this, call the SP:
I can't find more Information for such configuration.
unlang supports only SELECT statements. Call your procedure from a perl script. Ivan Kalik Kalik Informatika ISP
unlang supports only SELECT statements. Call your procedure from a perl script.
1) can I access to all accounting releated information from the perl module like in the sql-module? Are any examples out there? # Start = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \ # NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \ # AcctSessionTime, AcctTerminateCause) VALUES \ # ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \ # '%{Framed-IP-Address}', '%S', '0', '0', '');" # Stop = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \ # NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \ # AcctSessionTime, AcctTerminateCause) VALUES \ # ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \ # '%{Framed-IP-Address}', '0', '%S', '%{Acct-Session-Time}', \ # '%{Acct-Terminate-Cause}');" # Alive = "INSERT INTO ${acct_table} (AcctSessionId, UserName, \ # NASIPAddress, FramedIPAddress, AcctStartTime, AcctStopTime, \ # AcctSessionTime, AcctTerminateCause) VALUES \ # ('%{Acct-Session-Id}', '%{User-Name}', '%{NAS-IP-Address}', \ # '%{Framed-IP-Address}', '0', '0', '%{Acct-Session-Time}','');" 2) If I user the perl module, so I must log on the database each time the module is invoked? Thanks for help! Tim
1) can I access to all accounting releated information from the perl module like in the sql-module?
You said that you want to call a stored procedure. Yes, your database does have access to all the information stored in it.
Are any examples out there?
$query = "CALL your_procedure"; If you need a tutorial about using MySQL with perl - ask your frien Google.
2) If I user the perl module, so I must log on the database each time the module is invoked?
Yes. You can't "borrow" persistant sql handles from rlm_sql. Ivan Kalik Kalik Informatika ISP
2009/2/27 <tnt@kalik.net>:
1) can I access to all accounting releated information from the perl module like in the sql-module?
You said that you want to call a stored procedure. Yes, your database does have access to all the information stored in it.
Are any examples out there?
$query = "CALL your_procedure";
If you need a tutorial about using MySQL with perl - ask your frien Google.
2) If I user the perl module, so I must log on the database each time the module is invoked?
Yes. You can't "borrow" persistant sql handles from rlm_sql.
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Tim Stone -
tnt@kalik.net