Database Administration (MOSC)

MOSC Banner

Oracle V$SESSION to take a trace of inactive sessions

edited Aug 18, 2020 5:01AM in Database Administration (MOSC) 4 commentsAnswered

We have used Oracle V$SESSION to take a trace of inactive sessions between

Client server and Oracle DB. V$SESSION Querry is below

 

 

SELECT

to_char(sysdate,'MM-DD HH24:MI:SS') ||','|| USER# ||',' || USERNAME ||',' || STATUS ||',' || SCHEMANAME ||',' || OSUSER ||',' || PROCESS ||',' || MACHINE ||',' || PORT ||',' || TERMINAL ||',' || PROGRAM ||',' || TYPE ||',' || PREV_EXEC_START ||',' || LOGON_TIME ||',' || LAST_CALL_ET ||',' || BLOCKING_SESSION_STATUS ||',' || BLOCKING_INSTANCE ||',' || BLOCKING_SESSION ||',' || FINAL_BLOCKING_SESSION_STATUS ||',' || FINAL_BLOCKING_INSTANCE ||',' || FINAL_BLOCKING_SESSION ||',' || EVENT ||',' || WAIT_TIME ||',' || SECONDS_IN_WAIT ||',' || STATE ||',' || WAIT_TIME_MICRO ||',' || TIME_REMAINING_MICRO 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center