Tuesday, 6 October 2015

Before killing an active session---precheck

Before killing an active session---precheck.





SELECT O.OBJECT_NAME, S.SID, S.SERIAL#, P.SPID, S.PROGRAM,SQ.SQL_FULLTEXT, S.LOGON_TIME FROM V$LOCKED_OBJECT L, DBA_OBJECTS O, V$SESSION S, V$PROCESS P, V$SQL SQ WHERE L.OBJECT_ID = O.OBJECT_ID AND L.SESSION_ID = S.SID AND S.PADDR = P.ADDR AND S.SQL_ADDRESS = SQ.ADDRESS;
select   c.owner,  c.object_name,  c.object_type,  b.sid,  b.serial,
   b.status, b.osuser, b.machine
from
   v$locked_object a , v$session b, dba_objects c
where
   b.sid = a.session_id
and a.object_id = c.object_id;

SELECT 'ALTER SYSTEM KILL SESSION ' ||''''||SID||','||SERIAL#||'''' ||' ;' FROM v$session WHERE USERNAME NOT IN ('SYS') and username is not null and status='ACTIVE';

             


SELECT * FROM V$SESSION WHERE STATUS = 'ACTIVE';

select username, sid, serial from v$session where username='XXXXXX';

select addr,pid,spid,username,pga_used_mem from v$process where addr = 'XXXX';
 




No comments:

Post a Comment

The purge process did not run because the Oprid configured to start the Process Scheduler did not have the required permissions to run the purge process.

  Purge process - Required permissions The PeopleSoft Oprid used to start the Process Scheduler, as defined in the Scheduler's psprcs.cf...