开发者

Oracle Database, What is an easy way to find all active db sessions (for all users) log in time (since when) using sql or em?

开发者 https://www.devze.com 2023-02-10 02:01 出处:网络
Oracle DBAs,What is an easy way to find all active db sessions (for all users) log in time (since 开发者_StackOverflow社区when)? I checked the sys view v$session and v$active_session_history, could no

Oracle DBAs, What is an easy way to find all active db sessions (for all users) log in time (since 开发者_StackOverflow社区when)? I checked the sys view v$session and v$active_session_history, could not get that infor I want. I also checked on em client and em, seems no pages are showing it.


What, exactly, do you mean by "active"? If you mean Oracle's definition of active-- that the session is executing a SQL statement at this exact instant in time, I would think

SELECT username, status, logon_time
  FROM v$session
 WHERE status = 'ACTIVE'

If you have a different definition of "active" or if you are trying to determine the front-end user name in a three-tier application, can you explain your requirements a bit more?

0

精彩评论

暂无评论...
验证码 换一张
取 消