When operators use AutoAdjust, audit information is logged to the
database. In order to produce reports related to AutoAdjust activity,
a database view to query the audit records is provided with AutoAdjust. Figure 1 shows an example of the database view.
Figure 1. Database View AUTOADJUST_AUDIT
-----------------------------------------------------------
-- Database View to support reporting of Audit Log records
-----------------------------------------------------------
CREATE VIEW AUTOADJUST_AUDIT AS
SELECT A.CREATED AS Created,
A.COMPONENT AS Component,
A.SOURCE AS Source,
A.AUDIT_ACTION AS Action,
(SELECT VALUE from audit_details d where a.id = d.audit_id and name = 'Original') as Original,
(SELECT VALUE from audit_details d where a.id = d.audit_id and name = 'Modified') as Modified,
(SELECT VALUE from audit_details d where a.id = d.audit_id and name = 'Deleted') as Deleted,
(SELECT VALUE from audit_details d where a.id = d.audit_id and name = 'Added') as Added,
(SELECT VALUE from audit_details d where a.id = d.audit_id and name = 'Primary Key') as PrimaryKey
from audit_info a where a.component like 'autoadjust%';
When the AutoAdjust database tables are loaded into the database,
a database view named AUTOADJUST_AUDIT is loaded. Querying AUTOADJUST_AUDIT
returns records with the data as shown in Table 1.
Table 1. AutoAdjust Records
Column
Description
Created
Timestamp when the audit entry was created.
Component
The AutoAdjust component name. All component
names for AutoAdjust begin with the string ‘autoadjust’. Component
names include autoadjustui, which is the web-based user interface
component.
Source
For user interface initiated actions, this is
the logged in user ID responsible for initiating the action. For application
initiated actions, this is an IP address.
Action
This is the name of an audited action. Actions
include the following:
Perform adjustment action
Unlock action adjustment
Action update action
Adjustment type add action
Adjustment type update action
Adjustment type delete action
Properties update action
Module
The name of the subcomponent that produced the
action.
Primary Key
The primary key related to the particular action.
Original
A list of original field values for the action.
Modified
A list of field values modified by the action.
Deleted
A list of field values deleted by the action.
Added
A list of field values newly added by the action.
Example Query
Results similar to those shown in Figure 2 are received by querying all
columns in the AUTOADJUST_AUDIT view.
Note: The data in
the created column is truncated so the data fits better on the page.
Figure 2. AUTOADJUST_AUDIT
Example Query
In this example, operator izhadmin updated value 31 from value
30 on the properties update action page.