Below is the queries that can help in identifying the connections that are distributed among RAC nodes.
SELECT inst_id, count(*) "Database Sessions" FROM gv$session
WHERE type = 'USER' GROUP BY inst_id;
WHERE type = 'USER' GROUP BY inst_id;
If you need to check the output with the log-in time then you can use below query.
SELECT inst_id, TO_CHAR(logon_time, 'DD-MON-YYYY HH24') "Connection Time(In Hours)", count(*) "Database Sessions"
FROM gv$session
WHERE type = 'USER'
GROUP BY inst_id, TO_CHAR(logon_time, 'DD-MON-YYYY HH24')
ORDER BY inst_id, TO_CHAR(logon_time, 'DD-MON-YYYY HH24');
No comments:
Post a Comment