Featured

    Featured Posts

How to check current active sessions in a Oracle Database ?



=================================================================================
Below query can be used to view currently connected sessions in a Oracle DB.
It is useful in situations where your DB is slow to response and you need to find out what sessions are exactly causing it.

SELECT USERNAME,SID,SERIAL#,TERMINAL,LOGON_TIME,STATUS,(SELECT DISTINCT SQL_TEXT
FROM SYS.V_$SQL_SHARED_MEMORY WHERE HASH_VALUE=SQL_HASH_VALUE)
FROM V$SESSION
WHERE STATUS='ACTIVE' AND
USERNAME IS NOT NULL



************************************************************************
Facebook like and share

Related Posts You might be Interested:

Do you like this post? Please share this article.

HTML Link Code:

1 comments:

excellent work brother.

Reply

Post a Comment

https://marthadba.blogspot.in/

Copyright © MARTHADBA|About Us |Disclaimer | Contact Us |Sitemap |Designed By CodeNirvana