Home » RDBMS Server » Security » audit database access
audit database access [message #221073] Fri, 23 February 2007 12:08 Go to next message
fabiozea
Messages: 4
Registered: December 2006
Location: Montreal
Junior Member
Hello,
Does anybody know if there is any difference between the following audit options:
- audit create session
- audit connect
thanks
Re: audit database access [message #221684 is a reply to message #221073] Wed, 28 February 2007 01:12 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
No Difference.
<= 9i.
create session = connect role
connect role having some other privs including create session.

>= 10g
create session = connect role
connect role having only CREATE SESSION privs.

SQL> select count(*) from dba_audit_trail;

  COUNT(*)
----------
         0

SQL> audit session by scott;

Audit succeeded.
#on another terminal connect with scott user.
SQL>  select username, action_name from dba_audit_trail;

USERNAME                       ACTION_NAME
------------------------------ ----------------------------
SCOTT                          LOGON
#on another terminal connect with scott user.
SQL> /

USERNAME                       ACTION_NAME
------------------------------ ----------------------------
SCOTT                          LOGON
SCOTT                          LOGON
#on another terminal connect with scott user.
SQL> /

USERNAME                       ACTION_NAME
------------------------------ ----------------------------
SCOTT                          LOGON
SCOTT                          LOGON
SCOTT                          LOGON
#on another terminal connect with scott user.plus disconnect
SQL> /

USERNAME                       ACTION_NAME
------------------------------ ----------------------------
SCOTT                          LOGON
SCOTT                          LOGOFF
SCOTT                          LOGON
SCOTT                          LOGON

SQL> Delete from SYS.AUD$;

4 rows deleted.

SQL> audit connect by scott;

Audit succeeded.

SQL>  select username, action_name from dba_audit_trail;

USERNAME                       ACTION_NAME
------------------------------ ----------------------------
SCOTT                          LOGON

SQL> /

USERNAME                       ACTION_NAME
------------------------------ ----------------------------
SCOTT                          LOGON
SCOTT                          LOGON

SQL> /

USERNAME                       ACTION_NAME
------------------------------ ----------------------------
SCOTT                          LOGON
SCOTT                          LOGOFF
SCOTT                          LOGON

SQL>


NOTE : audit_trail = true.
regards
Taj
Previous Topic: unable to connect using sys password
Next Topic: Using Oracle Proxy User feature
Goto Forum:
  


Current Time: Wed Dec 04 13:50:40 CST 2024