Basic operations of lock table in Oracle

Time:2019-12-1

Query lock table


select object_name,machine,s.sid,s.serial# 
from v$locked_object l,dba_objects o ,v$session s
where l.object_id = o.object_id and l.session_id=s.sid ;

Kill the watch(killing in the process)


alter system kill session '543,9206';

 

If you can’t kill it, you can check this to get the SPID(give the obtained SPID to the authorized network administrator, and he will kill you. This belongs to external killing. After killing this pl / SQL, you need to log in again.)


select a.spid,b.sid,b.serial#,b.username 
from v$process a,v$session b 
where a.addr=b.paddr 
and b.status='KILLED';

Query the Sid’s SPID to verify whether the above query is correct


select b.spid,a.osuser,b.program 
from v$session a,v$process b 
where a.paddr=b.addr 
and a.sid=543 

These are all the related knowledge points in this introduction. Thank you for your learning and support for developepaer.

Recommended Today

First / last goal index API interface example

Share the football special index data, first / last goal loss API interface examples, see the online documents for detailsThe interface returns JSON data, which can be parsed using fastjson. package com.huaying.demo.shenlu; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.annotation.JSONField; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.List; public class GoalOrderOdds { public static void […]