I'm trying to create an audit policy whenever a user attempts to logon and could not connect successfully because of incorrect password. I tried this command and I am getting an error:
create audit policy connect_spiuser_policy actions logon
when 'SYS_CONTEXT(''USERENV'',''SESSION_USER'')=''SPIUSER'''
whenever not successful;
SQL> create audit policy connect_spiuser_policy actions logon
2 when 'SYS_CONTEXT(''USERENV'',''SESSION_USER'')=''SPIUSER'''
3 whenever not successful;
whenever not successful
*
ERROR at line 3:
ORA-00905: missing keyword
Please advise. Thank you.