Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Identify which user accesses an Oracle table.

Re: Identify which user accesses an Oracle table.

From: joel garry <joel-garry_at_home.com>
Date: 22 Jun 2006 14:42:48 -0700
Message-ID: <1151012568.629072.68490@m73g2000cwd.googlegroups.com>

Michael B wrote:
> Our ERP system (Glovia) is linked to Oracle. On certain actions, I
> need to be able to track which user made an entry to a table. My plan
> is to implement a trigger, which puts the username in a field of the
> table of interest. To get the username, I tried
>
> select sys_context('USERENV', 'OS_USER')
> from dual;
>
> which works when a user accesses the table from SQL Plus, but returns
> "daemon" when the table is accessed from Glovia. Is there anyway to
> identify the user that is accessing the table through Glovia?

Don't know anything about Glovia, but I've seen some other systems that put useful things in process, machine, program or terminal from v$session and v$process instead of the more obvious osuser. In some cases, there are inquiry programs for the erp system's daemons, so you can do things like: on login find out the processid from Oracle's viewpoint, then generate a script to poke at the erp system.

Assuming the system isn't set up to simply have different oracle users for different people, of course.

jg

-- 
@home.com is bogus.
http://andrewhitchcock.org/companystats/
Received on Thu Jun 22 2006 - 16:42:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US