3.18. <SessionDatabase SQL> Previous topic Parent topic Child topic Next topic

This optional clause specifies an external SQL Session Database for radiusd.
SessionDatabase SQL has a number of customisable SQL statements (AddQuery, DeleteQuery, UpdateQuery, ReplaceQuery, ClearNasQuery and CountQuery). These statements are used to add, remove, maintain and count the entries in the SQL Session Database. The default statements will work with the example RADONLINE table in the example SQL schemas in the goodies directory. If you wish, you can use more or fewer columns in your SQL Session Database, and you can change the names of the columns or the table. If you do use a different table schema, you will probably have to change statements to match your schema.
Radiator 4.22 added new SQL statements AddSessionQuery, GetSessionQuery, UpdateSessionQuery and DeleteSessionQuery. See goodies/hotspost.sql for a sample database schema used by goodies/hotspot-fidelio.cfg.
You can configure the SQL database(s) that SessionDatabase SQL uses by defining one or more DBSource, DBUsername and DBAuth lines. For more information about SQL configuration and failure behaviour, see Section 3.8.
SessionDatabase SQL is tolerant of database failures. If your database server goes down, Radiator will try to reconnect to a database as described above, starting again at the first database you specified. Whichever database Radiator connects to, it will stay connected to it until that database becomes unreachable, at which time it will again search for a database, starting at the first again. If on the other hand, Radiator is not able to connect to any SQL server, it will stop enforcing Simultaneous-Use limits until one of its databases comes back on line.
SessionDatabase SQL understands also the same parameters as SessionDatabase xxxxxx. For more information, see Section 3.17. It supports also all the common SQL configuration parameters. For more information about the SQL configuration parameters, see Section 3.8.