select username , count(*), machine from v$session where username is not null group by username, machine order by username;
select sid, machine, LAST_CALL_ET, PROGRAM, prev_exec_start, logon_time, status from v$session where username='username' AND STATUS='INACTIVE' ORDER BY LAST_CALL_ET DESC;
SELECT * FROM V$locked_object;
转载于:https://www.cnblogs.com/Lv2014/p/7088669.html