Lock DDL
Da wiki.gienne.cloud.
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 AND A.Object_id = (SELECT Object_id FROM Dba_objects WHERE Owner = 'CIROUSER' AND Object_name = 'CIRO_EVOLUTIVE_KPI_PF_ICT'); OWNER OBJECT_NAME OBJECT_TYPE SID ------------------------------ -------------------------------------------------------------------------------------------------------------------------------- ------------------- ---------- SERIAL# STATUS OSUSER MACHINE ---------- -------- ------------------------------ ---------------------------------------------------------------- CIROUSER LOAD_EVOLUTIVE_KPI_PF_ICT TABLE 156 64685 INACTIVE Valerio che usa toad WORKGROUP\DESKTO1V20O select s.sid,p.spid from v$process p, v$session s where s.paddr = p.addr and s.sid=156 and s.serial#=64685; SQL> select s.sid,p.spid from v$process p, v$session s where s.paddr = p.addr and s.sid=156 and s.serial#=64685; SID SPID ---------- ------------------------ 156 3096748
The SID and SERIAL# values of the Oracle session to be killed can then be substituted and the alter system kill session command issued.
SQL> ALTER SYSTEM KILL SESSION 'sid,serial#';