select sid, serial#, username, program, machine, status from v$session where username = 'username' AND STATUS = 'ACTIVE'; username 为当前的数据库用户