RADSQLRELAY(8)

โœจ NAME โœจ

radsqlrelay โ€” bestie, this is the lil helper that relays SQL queries to a central database server ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

radsqlrelay [-?] [-d sql_driver] [-b database] [-f file] [-h host] [-u user] [-P port] [-p password] [-1] [-x] file_path

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so here's the vibe: radsqlrelay tails a SQL logfile and forwards the queries over to a database server. That's it, that's the job ๐Ÿซถ

What is it for tho? Replicating accounting records to one (central) database โ€” even if that database has been down for a long extended downtime. like, the main character database took a nap and your records still made it, periodt.

The SQL logfile gets created by the rlm_sql module with the rlm_sql_null driver logging to disk. And no cap โ€” the module must be configured in the radiusd server before you can even use radsqlrelay. So set that up first bestie, it's giving prerequisite ๐Ÿ’€


โœจ OPTIONS โœจ

  • -? โ€” prints the usage help info. your lil "what do I do" button ๐ŸŽ€
  • -d sql_driver โ€” the driver to use. The choices are mysql, pg, oracle. pick your fighter โœจ
  • -b database โ€” the name of the database to use.
  • -f file โ€” read the password from file instead of from the command line. sneaky, secure, iconic ๐Ÿ’…
  • -h host โ€” connect to host.
  • -u user โ€” the user for login.
  • -P port โ€” port number to use for the connection.
  • -p password โ€” the password to use when connecting to the server.
  • -1 โ€” one-shot mode: push the file to the database and exit. no lingering, just go ๐Ÿ’จ
  • -x โ€” turn on debugging. for when you need to see everything ๐Ÿ”
  • file_path โ€” the pathname of the SQL logfile to use. this is the whole point bestie ๐ŸŒŸ

๐Ÿ“ NOTES ๐Ÿ“

๐Ÿ”ฎ Oracle driver ๐Ÿ”ฎ

the command

radsqlrelay -d oracle -b db.domain.tld sql-relay

reads the database description stored in $TNS_ADMIN/tnsnames.ora:

db.domain.tld =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = db.domain.tld)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = <DB SID>)
    )
  )

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Nicolas Baradakis <nicolas.baradakis@cegetel.net>


and that's the whole page bestie ๐Ÿ’– this was written all the way back on 19 June 2005, and it's from the RADSQLRELAY(8) / FreeRADIUS helper program corner of the manual. stan a classic ๐ŸŽ€โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from