SQL query with unixodbc and freetds

Alan DeKok aland at deployingradius.com
Tue Dec 12 14:56:31 CET 2017


On Dec 9, 2017, at 10:22 AM, Vieri via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> I'm not sure how to do that in mods-available/sql.

  It's not clear... I've never really used the unixodbc driver.

> sql {
> driver = "rlm_sql_unixodbc"
> dialect = "mssql" # I suppose.

  Yes.  But that matters only if you're using the stock schema and queries.

> # I shouldn't set neither "server" nor "port", just the DSN.
> # However, I suspect I actually can specify the DSN in "server", and simply ignore the "port".

  It's probably better to use the port.

> # Somehow I need to set the following line. Why?
> radius_db = "myDB"

   It's needed for Oracle.  Nothing else uses it.

> # Can I simply comment out all the rest of the defaults since I'm not going to use any of these anyway? 

   Yes.

> in radiusd.conf:
> instantiate {
> sql
> }

  Yes.

> I don't really need to load the schema at mods-config/sql/main/mssql/schema.sql, do I?

  If you're not using it, no.

> Anyway, if I run radiud -X I get:
...

  It works.

> Before moving on and trying to run an SQL query, I'd like to know if I've done something silly here, or if I've overlooked something that could bite me later.

  Nope.  If the SQL module loads and says it's happy, then it's happy.

  Alan DeKok.




More information about the Freeradius-Users mailing list