 |
|
Oracle Tips by Burleson |
General Oracle Auditing
Client
Identifier
A user
can set the value of a predefined application context attribute
called client_identifier as shown below.
exec dbms_session.set_identifier (‘ARUP’);
This sets an application context attribute
named client_identifier to the value ‘ARUP’. This is unique to a
session and stays in the memory attached to that session as long as
the session is active. This has nothing to do with any other
attribute of the session – the username, the client IP address, the
terminal, or any other details. The same user from another session
can set another value of client_identifier to identify the session.
The session can check what the current value of
the client_identifier is by issuing:
select sys_context(‘USERENV’,’CLIENT_IDENTIFIER’)
from dual
/
The result comes back as:
SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER')
--------------------------------------------
ARUP
From another session, if we query the data
dictionary view v$session for this session, we can see the
client_identifier of that session as following:
select client_identifier
from v$session
SEE CODE
DEPOT FOR FULL SCRIPT
/
We get:
CLIENT_IDENTIFIER
-----------------------------------------------
ARUP
The usefulness of client_identifier does not
stop here. Its importance extends into auditing as well. In the aud$
table, there is a column labeled CLIENTID, which stores this context
attribute. In order to understand how it works, let’s see an
example.
First, we enable auditing on SELECT on table
CLAIMS using the following query:
audit select on claim_schema.claims by access;
Then connecting as user APPUSER, we will select
from the table CLAIMS.
select * from claim_schema.claims;
The above text is
an excerpt from
the bestselling book:
Oracle
Privacy Security Auditing.
It's only $39.95 and has an
download of working security scripts:
This is the only authoritative
book on Oracle Security, Oracle Privacy, and Oracle Auditing written
by two of the world’s leading Oracle Security experts.
This indispensable book is only $39.95 and has an
download of working security scripts:
http://rampant-books.com/book_2003_2_audit.htm
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|