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

Table Of Contents
Example 22-9 FSM with Accounting Log via SQL Access
#####################################
## Start Accounting via SQL Access ##
AcctLog:
*.*.ACCT_START SQLAccess ReplyHold xstring="ActionID=InsertAcct"
*.*.ACCT_STOP SQLAccess ReplyHold xstring="ActionID=StopAcct"
*.*.ACCT_ALIVE SQLAccess ReplyHold xstring="ActionID=UpdateAcct"
*.*.ACCT_MSTART SQLAccess ReplyHold xstring="ActionID=StopAllAccts"
*.*.ACCT_MSTOP SQLAccess ReplyHold xstring="ActionID=StopAllAccts"
*.*.ACCT_CANCEL SQLAccess ReplyHold xstring="ActionID=StopAcct"
*.*.ACCT_ON SQLAccess ReplyHold xstring="ActionID=StopAllAccts"
*.*.ACCT_OFF SQLAccess ReplyHold xstring="ActionID=StopAllAccts"
## End Accounting via SQL Access ##
#####################################
Stored Procedures
Most databases support stored procedures. Stored procedures are a set of SQL
statements that are stored on the database server and executed when necessary, instead
of issuing individual SQL statements.
Stored procedures are particularly useful, but not restricted to, the following:
Executing multi-statement transactions: Stored procedures simplify the SQL access
configuration when multiple SQL statements forming a transaction need to be
executed. For example, the sample configuration includes a stored procedure that
deletes a session row from the session table, while returning the database column
containing the IP address.
Utilizing database schemas that contain child tables: Since SQL Access does not
support output of multiple database rows, stored procedures can be used to provide
a "normalized" view of the database parent and child tables to the AAA Server.
Enhancing database security: Stored procedures can be written so that each
execution is logged in the database server. Furthermore, common operations on
the database table can be performed using stored procedures. This prevents
applications and users from directly accessing the database tables.
Stored procedures are executed in an SQL action as specified in the SQL statement
using standard SQL syntax.
NOTE: Use the IN and OUT parameters for stored procedures. INOUT for stored
procedures is not supported.
Use DBP for mapping to stored procedure input (target) and output (source) parameters.
The following example shows the definition of a stored procedure for OCI to remove
session entries, and its usage in the SQL action definition:
Implementing SQL Access 373