add

About Me

My photo
Oracle Apps - Techno Functional consultant

Wednesday, June 22

Kill the Job and Session Query

select * from all_objects where object_name ='VIEW_LICENSE_TS_MAIN_IB_NEW_MV';

select * from all_objects where object_id = 1443040;

select * from v$locked_object where object_id=1443040;

SELECT * --SID, TYPE, ID1, ID2
FROM V$LOCK
where type ='JI'; -- JI stands for MView is running

select * from dba_jobs_running
--where rownum =1
where job=57609
AND SID =268;

select sid, serial#, command, taddr from v$session where sid=268 and serial# =20279;

alter system kill session '268,20279';

select * from v$locked_object where object_id=1612369;

select used_ublk from v$transaction where ADDR=;

BEGIN
DBMS_JOB.REMOVE(57609);
COMMIT;
END;

No comments: