HP-UX AAA Server A.08.01 administrator's guide (T1428-90072, May 2010)

Table Of Contents
Example 22-7 SQL Action with Null Source and Target Mappings
SQLAction CleanupExpiredSessions {
TimedEvent 120 ## Invoke the action every 120 seconds.
{
output
DBR(-1:*) RET(ERROR)
DBR(0:0) RET(ACK)
DBR(*:*) RET(NAK)
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.
Implementing SQL Access 371