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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: very interesting problem with V$SESSION and web applications.

RE: very interesting problem with V$SESSION and web applications.

From: <Paul.Parker_at_bmwna.com>
Date: Fri, 05 Apr 2002 13:53:34 -0800
Message-ID: <F001.0043D97D.20020405135334@fatcity.com>


Assuming that the application "knows" the real username, let the first thing that the app does is call dbms_application_info.set_client_info passing the real username as a parameter. This sets v$session.client_info to the real username.  

T10-PARTS> select client_info from v$session   2 where sid = (select sid from v$mystat where rownum = 1) ;  

CLIENT_INFO


 

T10-PARTS> execute dbms_application_info.set_client_info('REAL_USER_NAME');  

PL/SQL procedure successfully completed.  

T10-PARTS> select client_info from v$session   2 where sid = (select sid from v$mystat where rownum = 1) ;  

CLIENT_INFO



REAL_USER_NAME   T10-PARTS> select userenv('CLIENT_INFO') from dual;  

USERENV('CLIENT_INFO')



REAL_USER_NAME   T10-PARTS> select sys_context('userenv', 'client_info') from dual;  

SYS_CONTEXT('USERENV','CLIENT_INFO')




REAL_USER_NAME     Hope this helps  

Paul

 -----Original Message-----
Sent: Friday, April 05, 2002 4:16 PM
To: Multiple recipients of list ORACLE-L

Dear Gurus , I have a comic question . ? We have a db and ias and portal . users log in by using portal login page . The problem is : because application server connects to db , in v$session the machines are all the application server machine . Although the users are db users , when you login from portal , the usernames are portal30 and portal30_sso ..  

So how will I know which user is which session ? V$session gives no help ...  

May be comic :) But can not find an answer .. Investigating portal for writing into v$session as the real username ..But no other thing comes into my mind ....  

Any idea please ...          

Bunyamin K. Karadeniz
Oracle DBA / Developer
Civilian IT Department
Havelsan A.S. Eskisehir yolu
7.km Ankara Turkey
Phone: +90 312 2873565 / 1217
Mobile : +90 535 3357729  

The degree of normality in a database
is inversely proportional to that of its DBA.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Paul.Parker_at_bmwna.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 Apr 05 2002 - 15:53:34 CST

Original text of this message

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