Check the client connection info in oracle
Following commands give you the detail of client connection:
Check Session connect info:
select * from V$session_connect_info;
Check number of session active and inactive
select * from v$sessions;
Check session with module
column username format a15 word_wrapped
column module format a15 word_wrapped
column action format a15 word_wrapped
column client_info format a30 word_wrapped
select username||'('||sid||','||serial#||')' username,
module,
action,
client_info
from v$session
where module||action||client_info is not null;
Check user session status
select
substr(a.spid,1,9) pid,
substr(b.sid,1,5) sid,
substr(b.serial#,1,5) ser#,
substr(b.machine,1,6) box,
substr(b.username,1,5) username,
-- b.server,
substr(b.osuser,1,8) os_user,
substr(b.program,1,30) program,
substr(b.status,1,10) status
from v$session b, v$process a
where
b.paddr = a.addr
and type='USER'
order by spid;
Find SQL query running from session by client
set pagesize 100 linesize 132
col username format a10
col sql_text format a60
SELECT USERname,terminal,SID,a.module,
SERIAL#,SQL_TEXT
FROM V$SESSION a, V$SQL b
WHERE a.SQL_ADDRESS = b.ADDRESS and UPPER(program) LIKE '%W3%'
--AND a.STATUS = 'ACTIVE'
--AND SQL_TEXT not like '%USERname%'
AND username IS NOT NULL;