HP-UX AAA Server A.07.01 Administrator's Guide
Null Source and Target Mapping
You can also specify SQL action mappings without the source or target mapping. In
this case, no data will be input to the SQL statement and/or the SQL statement execution
will not return any data. An example of an SQL action containing only SQL statements
is an expired session cleanup operation as shown in Example 18-6:
Example 18-6 SQL Action with Null Source and Target Mappings
SQLAction CleanupExpiredSessions {
TimedEvent 120 ## Invoke the action every 120 seconds.
{
output
DBR(DBretCode) FUNC(ACKonZero)
SQLStatement db_oci {
DELETE FROM RAD_SESS_TABLE
WHERE (current_timestamp -
sess_start_time) > '+000000001 00:00:00'
}
}
}
The SQL action CleanupExpiredSessions executes an SQL statement every 120
seconds that deletes all the rows from the session table RAD_SESS_TABLE containing
information for expired sessions. In this example, a session is considered expired if its
starting time, sess_start_time indicates that its older than 24 hours.
Time Synchronization
If multiple AAA Server access a common database using SQL Access, time
synchronization is critical. Features such as accounting and session management rely
on time stamps stored in the database tables. This can best be provided by utilizing the
database timestamps in the SQL actions in place of the local AAA Server timestamps.
234 SQL Access