SELECT a.inst_id,sid,username,event,sql_id,a.PROGRAM FROM gv$session a WHERE a.STATUS='ACTIVE' AND username IS NOT NULL; 或者 SELECT sid,username,event,sql_id,a.PROGRAM FROM v$session a WHERE a.STATUS='ACTIVE' AND username IS NOT NULL; 注: 1.gv$session:…