Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Auditing : Recording application events : Application design considerations : Examining active audit policies
 
Examining active audit policies
To examine active audit policies in the AppServer session, you must ensure that the database connection ID for a given audit-enabled database has the Audit Data Reporter or Audit Administrator privilege set for it. You can then access the active audit policies in the following ways:
*Directly access audit policy tables in each connected and audit-enabled OpenEdge RDBMS
*Access appropriate query procedures supported by the OpenEdge Audit Policy Maintenance APIs
The Audit Policy Maintenance APIs represent a set of ABL persistent and non-persistent procedures that allow you to query audit policies or perform audit policy maintenance tasks, depending on your audit privileges.
For purposes of querying active audit policies, you can use the following procedures from these APIs:
*get-policies-merge internal procedure of the generic utility API (_aud-utils.p persistent procedure). This procedure returns data about active policies only. However, you must use other procedures in the API to load a ProDataSet with audit policy data from audit-enabled databases before you can access the active policy information.
*_get-policies.p non-persistent procedure. This procedure loads all of the audit policies in a given audit-enabled database into a ProDataSet. You can then query the ProDataSet for active audit policy data. If you want to query more than one database, you must invoke the procedure for each one.
These procedures are all located in the following OpenEdge installation location:
OpenEdge_install_dir\src\auditing\
For more information on using the Audit Policy Maintenance APIs and the audit policy tables, see Customaudit configuration tools. For more information on the Audit Policy Maintenance APIs themselves, see AuditPolicy Maintenance APIs.
Once you have identified auditable application events, as specified in active audit policies, you can invoke the AUDIT-CONTROL:LOG-AUDIT-EVENT( ) method for an appropriate application event in response to a client call to your own application event API.