how to verify if Audit Trail is capturing the latest [message #683142] |
Tue, 08 December 2020 08:06 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
I checked the parameters and see this values.
SQL> show parameter audit_trail;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_trail string DB, EXTENDED
however, when I checked the dba_audit_trail view it looks like the rows in there are too old and is way back from 2019 (timestamp column). how do I let the audit trail to records the latest?
thank you,
warren
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: how to verify if Audit Trail is capturing the latest [message #683442 is a reply to message #683436] |
Thu, 14 January 2021 02:03 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
wtolentino wrote on Wed, 13 January 2021 19:44thanks John i read the link. for starters i just want to see all those that was given grants (roles, select, delete, insert, and update) like "grant select on … to …".
If you want to audit when users are granted a role:
AUDIT GRANT ANY ROLE;
and so on.
|
|
|
Re: how to verify if Audit Trail is capturing the latest [message #683476 is a reply to message #683442] |
Wed, 20 January 2021 11:08 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
thanks John I execute the command "AUDIT GRANT ANY ROLE" and checked what statement audits are in place by using the "sys.dba_stmt_audit_opts".
select audit_option, success, failure from sys.dba_stmt_audit_opts;
AUDIT_OPTION SUCCESS FAILURE
---------------------------------------- ---------- ----------
ALTER SYSTEM BY ACCESS BY ACCESS
SYSTEM AUDIT BY ACCESS BY ACCESS
CREATE SESSION BY ACCESS BY ACCESS
CREATE USER BY ACCESS BY ACCESS
BECOME USER BY ACCESS BY ACCESS
ALTER USER BY ACCESS BY ACCESS
DROP USER BY ACCESS BY ACCESS
ROLE BY ACCESS BY ACCESS
DIRECTORY BY ACCESS BY ACCESS
CREATE ANY TABLE BY ACCESS BY ACCESS
ALTER ANY TABLE BY ACCESS BY ACCESS
DROP ANY TABLE BY ACCESS BY ACCESS
CREATE PUBLIC DATABASE LINK BY ACCESS BY ACCESS
GRANT ANY ROLE BY ACCESS BY ACCESS
ALTER DATABASE BY ACCESS BY ACCESS
CREATE ANY PROCEDURE BY ACCESS BY ACCESS
ALTER ANY PROCEDURE BY ACCESS BY ACCESS
DROP ANY PROCEDURE BY ACCESS BY ACCESS
ALTER PROFILE BY ACCESS BY ACCESS
DROP PROFILE BY ACCESS BY ACCESS
GRANT ANY PRIVILEGE BY ACCESS BY ACCESS
CREATE ANY LIBRARY BY ACCESS BY ACCESS
EXEMPT ACCESS POLICY BY ACCESS BY ACCESS
GRANT ANY OBJECT PRIVILEGE BY ACCESS BY ACCESS
CREATE ANY JOB BY ACCESS BY ACCESS
CREATE EXTERNAL JOB BY ACCESS BY ACCESS
PLUGGABLE DATABASE BY ACCESS BY ACCESS
then I issued this simple grant
grant APP_EXECUTE_ROLE_00 to appcodeowner;
when I query the dba_audit_trail by
select * from dba_audit_trail order by timestamp desc;
I do not see the most recent grant.
I checked again by this query:
SQL> select max(timestamp) latest_timestamp,
2 min(timestamp) prior_timestamp
3 from dba_audit_trail;
LATEST_TI PRIOR_TIM
--------- ---------
19-DEC-19 23-JUL-10
SQL>
I think I am missing something.
|
|
|
|
Re: how to verify if Audit Trail is capturing the latest [message #683478 is a reply to message #683477] |
Wed, 20 January 2021 13:02 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
tried that by disconnect and connecting again. still not goes to the audit_trail.
SQL> select to_char(sysdate,'dd-Mon-yyyy hh:mi:ss am') dt from dual;
DT
-----------------------
20-Jan-2021 01:53:48 pm
SQL> grant APP_EXECUTE_ROLE_00 to appcodeowner;
Grant succeeded.
SQL> select max(timestamp) latest_timestamp,
2 min(timestamp) prior_timestamp
3 from dba_audit_trail;
LATEST_TI PRIOR_TIM
--------- ---------
19-DEC-19 23-JUL-10
SQL>
[Updated on: Wed, 20 January 2021 13:05] Report message to a moderator
|
|
|
Re: how to verify if Audit Trail is capturing the latest [message #683479 is a reply to message #683478] |
Wed, 20 January 2021 13:35 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
It would help if you showed the whole process: logon, enable the audit, logoff, logon, make the grant, query the audit trail. All in one SQL*Plus session, and do not do it as SYS.
Apart from that, have you relinked Oracle to disable traditional audit? You'll see that with
select value from v$option where parameter='Unified Auditing';
|
|
|
|
Re: how to verify if Audit Trail is capturing the latest [message #683482 is a reply to message #683481] |
Thu, 21 January 2021 09:42 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Quote:SQL> select value from v$option where parameter='Unified Auditing';
VALUE
----------------------------------------------------------------
TRUE This shows that you have relinked Oracle to disable all traditional audit: you have only Unified Audit. So this whole topic has been a waste of time.
|
|
|
|