|
This post was updated on .
I found these:
SELECT count(*) from V$PROCESS;
SELECT sess.process, sess.status, sess.username, sess.schemaname, sql.sql_text
FROM v$session sess,
v$sql sql
WHERE sql.sql_id(+) = sess.sql_id
AND sess.type = 'USER';
And to find what a process does:
select sid,serial#,username,sql_id,schemaname,osuser,process,machine,port,program,type,paddr
from v$session
where PADDR = (select ADDR from V$PROCESS where SPID = 'YOURPID')
or:
SELECT instance_number, max(value) AS max_sessions, begin_interval_time AS time
FROM dba_hist_sysmetric_summary
WHERE metric_name = 'Session Count'
AND begin_interval_time >= '<your_date_time>'
AND begin_interval_time < '<your_date_time + 1 day>' -- Include the full day
GROUP BY instance_number, begin_interval_time
ORDER BY max_sessions DESC;
How can I the date/time in them?
Regards.
|