Tracking Object Accessed By Users

How can we determine which procedure, function, triggers is being called by user session? 

You can use a script based on v$access view and any other. 

I used to use something like this in an unix session:

#!/bin/ksh 

SID=$1 

ORACLE_SID=$SID 

export ORACLE_SID 

ORACLE_HOME=`grep $ORACLE_SID':' /var/opt/oracle/oratab|nawk -F ":" '{print 

$2}'` 

export ORACLE_HOME 

$ORACLE_HOME/bin/sqlplus -s "/as sysdba" << EOF 

define $2=&MIOBJ 

define $3=&MITIPO 

set linesize 200 

set pagesize 200 

col sid format 99999 

col object format a30 

col username format a10 

col osuser format a10 

col owner format a12 

col "Inicio Sesion" format a30 

select 

s.sid,s.serial#,a.owner,p.spid,a.object,s.user name,s.osuser,to_char(s.logon_time,'dd-mm-yy 

hh24:mi:ss') as "Inicio Sesion" 

from v\$session s,v\$process p,v\$access a 

where s.paddr=p.addr and 

a.sid=s.sid and a.object='&MIOBJ' 

and a.type='&MITIPO' 

order by s.sid; 

$2 

$3 

exit 
 

Note:

Where $1 is DB NAME, $2 is object_name and $3 object type in these order, your DB NAME must to be in the oratab file.

Oracle Database

See Also
Rule Based Optimizer and Cost Based Optimizer

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.