oracle 현재 세 션
1369 단어 Oacle 현재 사용자
-- Oracle sql
SELECT b.sid oracleID,
b.username " Oracle ",
b.serial#,
spid " ID",
paddr,
sql_text " SQL",
b.machine
FROM v$process a, v$session b, v$sqlarea c
WHERE a.addr = b.paddr
AND b.sql_hash_value = c.hash_value;
-- sql
SELECT OSUSER " ",
PROGRAM " ",
USERNAME " ",
SCHEMANAME,
B.Cpu_Time " cpu ",
STATUS,
B.SQL_TEXT " sql"
FROM V$SESSION A
LEFT JOIN V$SQL B ON A.SQL_ADDRESS = B.ADDRESS
AND A.SQL_HASH_VALUE = B.HASH_VALUE
ORDER BY b.cpu_time DESC;
-- oracle
select l.session_id sid,
s.serial#,
l.locked_mode " ",
l.oracle_username " ",
l.os_user_name " ",
s.machine " ",
s.terminal " ",
o.object_name " ",
s.logon_time " "
from v$locked_object l, all_objects o, v$session s
where l.object_id = o.object_id
and l.session_id = s.sid
order by sid, s.serial#;
--kill
alter system kill session 'sid, s.serial#‘;
————————————————
: CSDN 「jlds123」 , CC 4.0 BY-SA , 。
:https://blog.csdn.net/jlds123/article/details/6572559