Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: RE: Can we find SQL user
('binary' encoding is not supported, stored as-is)
It looks like you have read Bruce's answer a little too fast. You might also like to RTFM the SQL Reference book, section 'functions', entry SYS_CONTEXT - although if you also want the SQL text, as Mladen said you must any way join V$SESSION and V$SQLAREA - or V$SQLTEXT if your statements are more than 999 characters long. Concerning Bruce's question about an application server, quite obviously if you have a tier sitting in the middle you are done - unless, that is, you use that wonderful package, DBMS_APPLICATION_INFO, to fill up (typically) CLIENT_INFO in which case you are back to SYS_CONTEXT/V$SESSION.
>----- Original Message -----
>From: sam d <sam_orafan_at_yahoo.com>
>To: Multiple recipients of list ORACLE-L
><ORACLE-L_at_fatcity.com>
>Sent: Thu, 06 Jun 2002 23:13:21
>
>We can definitely find the user ,
>but considering my scenario 'all the people are
>logged
>in with the same oracle user' ,
>I want to know:From what machine the SQL statement
>was
>fired.
>
>thx
>Sam
>> name--- "Reardon, Bruce (CALBBAY)"
><Bruce.Reardon_at_comalco.riotinto.com.au> wrote:
>> Have a look at v$session
>> In particular the osuser, terminal and machine
>> fields - these may help
>> Also look at the listener log file - this may
>help
>>
>> Or do you have an application server sitting in
>the
>> middle?
>>
>> HTH,
>> Bruce Reardon
>>
>> -----Original Message-----
>> From: sam d [mailto:sam_orafan_at_yahoo.com]
>> Sent: Friday, 7 June 2002 15:18
>>
>> Hi List,
>> Suppose I have m1,m2,m3 machines,
>> all the users sitting on these machines are using
>
>> oracle 'user1' to connect to the server.
>>
>> As all the people are logged in with the same
>user
>> name ,Can we find which user(or machine) has
>issued
>> which SQL statement.
>>
>> Thanks
>> Sam
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stephane Faroul INET: sfaroult_at_oriolecorp.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Jun 07 2002 - 03:53:19 CDT
![]() |
![]() |