Auditing sessions
When the audit is performed, it is important to be able to identify the originating host, username, and logon and logoff time for sessions. In this recipe we will enable an audit on sessions created by users HR
, DRAPHEAL
, and SMAVRIS
.
Getting ready
All steps from this recipe will be performed on the HACKDB
database.
How to do it...
- Connect as user
SYSTEM
, and start to audit sessions for userHR
,DRAPHEAL
, andSMAVRIS
as follows:SQL> conn system Enter password: Connected. SQL> audit session by HR, DRAPHEAL, SMAVRIS; Audit succeeded. SQL>
- Next connect as user
HR
and wait for 10 seconds, then disconnect. - Connect also as user
DRAPHEAL
andSMAVRIS
and wait for 10 seconds or more, then disconnect. - One source of information for audit trails ...
Get Oracle 11g Anti-hacker's Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.