Thursday 20 July 2017

CPU Utilization analyze and find running query , concurrent using OS PID

To Find the OS PID which utilize more CPU Kill the session or concurrent



select sid, serial#, USERNAME, STATUS, OSUSER, PROCESS,
MACHINE, MODULE, ACTION, to_char(LOGON_TIME,'yyyy-mm-dd hh24:mi:ss')
from v$session where paddr in (select addr from v$process where spid = '&spid');


select sid,serial#,p2,program,module,machine from gv$session where sid=915;

SELECT SQL_TEXT FROM V$SQLAREA WHERE (ADDRESS, HASH_VALUE) IN
(SELECT SQL_ADDRESS, SQL_HASH_VALUE FROM V$SESSION WHERE SID=915);

select * from gv$session where SID=915;

alter system kill session '915,28268';

-------------------------------------------------------------------------------------------------------


Run This query as APPS user to find the concurrent Request ID using OS PID

select * from fnd_concurrent_requests
where 1=1 and oracle_process_id=&OS_PID
and trunc(request_date)=trunc(sysdate);

No comments:

Post a Comment