Reader small image

You're reading from  Oracle 11g Anti-hacker's Cookbook

Product typeBook
Published inOct 2012
Reading LevelBeginner
PublisherPackt
ISBN-139781849685269
Edition1st Edition
Languages
Right arrow
Author (1)
Adrian Neagu
Adrian Neagu
author image
Adrian Neagu

Adrian Neagu has over ten years of experience as a database administrator, mainly with DB2 and Oracle databases. He is an Oracle Certified Master 10g, Oracle Certified Professional 9i, 10g, and 11g, IBM DB2 Certified Administrator version 8.1.2 and 9, IBM DB2 9 Advanced Certified Administrator 9, and Sun Certified System Administrator Solaris 10. He is an expert in many areas of database administration such as performance tuning, high availability, replication, backup, and recovery. In his spare time, he likes to cook, take photos, and to catch big pikes with huge jerkbaits and bulldawgs.
Read more about Adrian Neagu

Right arrow

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...

  1. Connect as user SYSTEM, and start to audit sessions for user HR, DRAPHEAL, and SMAVRIS as follows:

    SQL> conn system
    Enter password:
    Connected.
    SQL> audit session by HR, DRAPHEAL, SMAVRIS;
    
    Audit succeeded.
    
    SQL>
    
  2. Next connect as user HR and wait for 10 seconds, then disconnect.

  3. Connect also as user DRAPHEAL and SMAVRIS and wait for 10 seconds or more, then disconnect.

  4. One source of information for audit trails related to the session can be found by querying the DBA_AUDIT_SESSION dictionary view. Check the generated audit records by OS_USERNAME, USERNAME, USERHOST, TERMINAL, TIMESTAMP, ACTION_NAME, and LOGOFF_TIME as follows:

How it works...

The...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Oracle 11g Anti-hacker's Cookbook
Published in: Oct 2012Publisher: PacktISBN-13: 9781849685269

Author (1)

author image
Adrian Neagu

Adrian Neagu has over ten years of experience as a database administrator, mainly with DB2 and Oracle databases. He is an Oracle Certified Master 10g, Oracle Certified Professional 9i, 10g, and 11g, IBM DB2 Certified Administrator version 8.1.2 and 9, IBM DB2 9 Advanced Certified Administrator 9, and Sun Certified System Administrator Solaris 10. He is an expert in many areas of database administration such as performance tuning, high availability, replication, backup, and recovery. In his spare time, he likes to cook, take photos, and to catch big pikes with huge jerkbaits and bulldawgs.
Read more about Adrian Neagu