In this recipe, you will configure auditing of information contained in an application context.
To complete this recipe, you'll need an existing (or predefined) application context and a user who has the audit_admin
role (for example, jack
).
Connect to the database as a user who has the
audit_admin
role (for example,jack
):$ sqlplus jack
Configure application context auditing:
SQL> AUDIT CONTEXT NAMESPACE USERENV ATTRIBUTES SESSION_USER, SERVICE_NAME; Audit succeeded. SQL> AUDIT CONTEXT NAMESPACE USERENV ATTRIBUTES HOST BY jill; Audit succeeded.
View for which application contexts audit data is going to be captured:
SQL> set linesize 180 SQL> column namespace format A30 SQL> column attribute format A30 SQL> column user_name format A30 SQL> select * from audit_unified_contexts;
Connect user
jill
as follows:SQL> connect jill
View audit records:
SQL> SELECT APPLICATION_CONTEXTS FROM...