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: How to find osuser and machine name connected to database

Re: How to find osuser and machine name connected to database

From: Ron Rogers <RROGERS_at_galottery.org>
Date: Tue, 22 Aug 2000 10:13:39 -0400
Message-Id: <10597.115213@fatcity.com>


I don't know is this will work when using a form but it does with a VB = application.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D COLUMN SU FORMAT A8 HEADING 'ORACLE|USER ID' JUSTIFY LEFT COLUMN OSU FORMAT A8 HEADING 'SYSTEM|USER ID' JUSTIFY LEFT COLUMN STAT FORMAT A8 HEADING 'SESSION|STATUS' JUSTIFY LEFT COLUMN SSID FORMAT 999999 HEADING 'ORACLE|SESSION|ID' JUSTIFY RIGHT COLUMN SSER FORMAT 999999 HEADING 'ORACLE|SERIAL|NO' JUSTIFY RIGHT COLUMN SPID FORMAT A9 HEADING 'ORACLE|SESSION|ID' JUSTIFY RIGHT COLUMN TXT FORMAT A28 HEADING 'CURRENT STATEMENT' JUSTIFY CENTER WORD COLUMN LOGTIME FORMAT A10 HEADING 'LOGIN|TIME' JUSTIFY RIGHT SELECT=20
S.USERNAME SU,
S.OSUSER OSU,
to_char(S.LOGON_TIME,'MM-DD-YYYY HH:MI:SS') LOGTIME,

S.STATUS STAT,
S.SID SSID,
S.SERIAL# SSER,

LPAD(P.SPID,9) SPID,
SUBSTR(SA.SQL_TEXT,1,540) TXT
FROM V$PROCESS P,
V$SESSION S,
V$SQLAREA SA
WHERE P.ADDR=3DS.PADDR
AND S.USERNAME IS NOT NULL
AND S.SQL_ADDRESS=3DSA.ADDRESS (+)
AND S.SQL_HASH_VALUE=3DSA.HASH_VALUE (+)
ORDER BY 1,3,6 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I have this query in a script that I run when connected to sqlplus. Hope this helps,
Ron Rogers
DBA OCP
ATl.GA

>>> abhivapure_at_YAHOO.COM 08/22/00 05:59AM >>>
Hi folks,

        I want to know the operating system username and machine name of the user who is connected to database.

I tried v$session view, But In case of user connected through forms 4.5 I am getting the os_user as 'OraUser'
and machine =3D NULL .
I also tried to find it from the Listener.log on the server, but same problem.

can anybody help me out.

Thanks in advance.



Do You Yahoo!?
Yahoo! Mail * Free email you can access from anywhere! http://mail.yahoo.com/=20
--=20
Author: Abhijit Bhivapure
  INET: abhivapure_at_yahoo.com=20
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 Tue Aug 22 2000 - 09:13:39 CDT

Original text of this message

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