4849c63543311f6e65f051b2d405f972d1430254
[freeradius.git] / man / man8 / radsqlrelay.8
1 .TH RADSQLRELAY 8 "19 June 2005" "" "FreeRADIUS helper program"
2
3 .SH NAME
4 radsqlrelay - relay SQL queries to a central database server
5
6 .SH SYNOPSIS
7 .B radsqlrelay
8 .RB [ \-d
9 .IR sql_driver ]
10 .RB [ \-b
11 .IR database ]
12 .RB [ \-f
13 .IR file ]
14 .RB [ \-h
15 .IR host ]
16 .RB [ \-u
17 .IR user ]
18 .RB [ \-p
19 .IR password ]
20 .RB [ \-1 ]
21 \fIfile_path\fP
22
23 .SH DESCRIPTION
24 \fBradsqlrelay\fP tails a SQL \fIlogfile\fP and forwards the queries
25 to a database server. Used to replicate accounting records to one
26 (central) database, even if the database has extended downtime.
27 .PP
28 The SQL logfile is created by the \fBrlm_sql_log\fP module. The module
29 must be configured in the \fBradiusd\fP server before you can use
30 \fBradsqlrelay\fP.
31
32 .SH OPTIONS
33 .IP "\-d \fIsql_driver\fP"
34 Driver to use: mysql, pg, oracle.
35 .IP "\-b \fIdatabase\fP"
36 Name of the database to use.
37 .IP "\-f \fIfile\fP"
38 Read password from file, instead of command line.
39 .IP "\-h \fIhost\fP"
40 Connect to host.
41 .IP "\-u \fIuser\fP"
42 User for login.
43 .IP "\-p \fIpassword\fP"
44 Password to use when connecting to server.
45 .IP "\-1"
46 One-shot mode: push the file to database and exit.
47 .IP "file_path"
48 The pathname of the SQL logfile to use.
49
50 .SH NOTES
51 .SS Oracle driver
52 The command "radsqlrelay -d oracle -b db.domain.tld sql-relay" reads the
53 database description stored in $TNS_ADMIN/tnsnames.ora:
54 .PP
55 .DS
56 db.domain.tld =
57   (DESCRIPTION =
58     (ADDRESS_LIST =
59       (ADDRESS = (PROTOCOL = TCP)(HOST = db.domain.tld)(PORT = 1521))
60     )
61     (CONNECT_DATA =
62       (SERVICE_NAME = <DB SID>)
63     )
64   )
65 .DE
66
67 .SH SEE ALSO
68 .BR rlm_sql_log (5)
69
70 .SH AUTHOR
71 Nicolas Baradakis <nicolas.baradakis@cegetel.net>