Need help with script to find users last login/logout from $AUD
Oracle Version: 10.2.0.4
I am trying to create a sql script which returns the last login/logout activity of each user from the audit log file.
I have the following script which seems correct but returns 0 records: (yes auditing is turned on and I am auditing on create session success: by access and failure: by access)
COLUMN username FORMAT A10
COLUMN owner FORMAT A10
COLUMN obj_name FORMAT A10
COLUMN extended_timestamp FORMAT A35
SELECT username,
extended_timestamp,
owner,
obj_name,
action_name
FROM dba_audit_trail outer
where
extended_timestamp =
(
select max(extended_timestamp)
from dba_audit_trail inner
where inner.owner = outer.owner
I am trying to create a sql script which returns the last login/logout activity of each user from the audit log file.
I have the following script which seems correct but returns 0 records: (yes auditing is turned on and I am auditing on create session success: by access and failure: by access)
COLUMN username FORMAT A10
COLUMN owner FORMAT A10
COLUMN obj_name FORMAT A10
COLUMN extended_timestamp FORMAT A35
SELECT username,
extended_timestamp,
owner,
obj_name,
action_name
FROM dba_audit_trail outer
where
extended_timestamp =
(
select max(extended_timestamp)
from dba_audit_trail inner
where inner.owner = outer.owner
0