Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
 

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

 

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks