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

Table Of Contents
Multi-Row Support For SQL Access
Currently, SQL Access handles only one row returned by an SQL query. If an SQL
query returns multiple rows of the database, only the first row is processed and the
remaining ones are ignored. However, to support client functionality, SQL Access
must handle multiple rows returned by an SQL query. For example, an SQL query
checking the database for expired sessions can return multiple rows, and disconnect
requests may have to be sent every second to all rows in the database. Currently, one
query is required per row, resulting in poor performance. Therefore, SQL Access is
enhanced to support multiple rows.
By default, the multi-row support is not enabled. To enable the multi-row feature for
an SQL Action, add the following line:
QueryType multi_row
Multi-row functionality can be used only in conjunction with another AATV, which is
designed to handle the multiple rows returned by an SQL query. The CLIENT AATV,
used to implement the client functionality at the HP-UX AAA Server, is an example of
such an AATV. Specifically, this AATV should handle two internal attributes which
are used for implementing multi-row functionality. The following table lists these
internal attributes:
Table 22-15 Internal Attributes for Implementing Multi-Row Functionality
DescriptionTypeAttribute
Contains information
required to retrieve the
Integer
SQL-Statement-Handle-Info
SQL statement handle for
a multi-row SQL action
Contains the status of the
SQL statement handle.
Integer
SQL-Statement-Handle-Status
Allowed values are 0 (for
EXPIRED) and 1 (for
ACTIVE)
The SQL Access AATV, after executing a multi-row SQL query, will save the SQL
statement handle and add the internal attribute SQL-Statement-Handle-Info to
the request. This internal attribute will contain the information required to retrieve the
SQL statement handle. The second AATV should pass this internal attribute
SQL-Statement-Handle-Info unchanged to the SQL Access AATV while
retrieving the next row. To stop processing the rows in a multi-row query and ignore
the remaining rows, the AATV must use the internal attribute
SQL-Statement-Handle-Status. If the AATV passes in this attribute with value
set to 0, the SQL Access AATV will free the SQL statement handle and ignore the
remaining rows.
For more details on a specific implementation of the multi-row functionality using the
CLIENT AATV, see Chapter 19 (page 291) and Chapter 20 (page 297).
Multi-Row Support For SQL Access 385