Tuesday, September 25, 2018

active_inactive_session_terminal_waise

prompt Displays the number of sessions for each client machine.

SELECT machine,

NVL(active_count, 0) AS active,

NVL(inactive_count, 0) AS inactive,

NVL(killed_count, 0) AS killed

FROM (SELECT machine, status, count(*) AS quantity

FROM v$session

GROUP BY machine, status)

PIVOT (SUM(quantity) AS count FOR (status) IN ('ACTIVE' AS active, 'INACTIVE' AS inactive, 'KILLED' AS killed))

ORDER BY machine;

 

No comments:

Post a Comment

[ERROR]: The value of s_patch_service_name is not set correctly in atleast one of the context files.

[ERROR]: The value of s_patch_service_name is not set correctly in atleast one of the context files. I got the issue below wh...