|
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. |
|
See Also
Have a Oracle Question
Oracle Books
Oracle Application
Oracle Home
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|