본문 바로가기
→ 데이터베이스/ORACLE 관리

[ORACLE] DB 세션 확인하기

by 벅스쭌 2011. 8. 1.
반응형
SELECT  
         s.status "Status", s.serial# "Serial#", s.TYPE "Type",
         s.username "DB User", s.osuser "Client User", s.server "Server",
         s.machine "Machine", s.module "Module", s.client_info "Client Info",
         s.terminal "Terminal", s.program "Program", p.program "O.S. Program",
         s.logon_time "Connect Time", lockwait "Lock Wait",
         si.physical_reads "Physical Reads", si.block_gets "Block Gets",
         si.consistent_gets "Consistent Gets",
         si.block_changes "Block Changes",
         si.consistent_changes "Consistent Changes", s.process "Process",
         p.spid, p.pid, si.sid, s.audsid, s.sql_address "Address",
         s.sql_hash_value "Sql Hash", s.action
    FROM v$session s, v$process p, sys.v_$sess_io si
   WHERE s.paddr = p.addr(+)
     AND si.sid(+) = s.sid
     AND (s.username IS NOT NULL)
     AND (NVL (s.osuser, 'x') <> 'SYSTEM')
     AND (s.TYPE <> 'BACKGROUND')
ORDER BY 1

자료 정보 : JAKARTAPROJECT
http://www.jakartaproject.com/article/dbtip/111112215093400
반응형