Running on Oracle Database 12c Enterprise Edition Release 18.104.22.168.0 - 64bit Production. Attempting to test auditing with the following steps:
Created a new user, MYUSER.
CREATE TABLE mytest ( id NUMBER, val varchar2(10), CONSTRAINT mytest_pk PRIMARY KEY (id) ); GRANT SELECT, INSERT, UPDATE, DELETE ON mytest TO myuser;
Executed as SYS:
CREATE AUDIT POLICY myaudit ACTIONS DELETE ON myuser.mytest, INSERT ON myuser.mytest, UPDATE ON myuser.mytest WHEN 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') = ''MYUSER''' EVALUATE PER SESSION; AUDIT POLICY myaudit;
Put some data in the test table:
insert into mytest values(1,'test1');
Query the audit table:
select * from unified_audit_trail order by event_timestamp desc
There are no records of audit for the INSERT. All I see DDL audits
WHat am I missing here?