当前位置:网站首页>Oracle lock table query and unlocking method
Oracle lock table query and unlocking method
2022-06-26 11:54:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
We usually use it here PL/SQL, Always accidentally lock the watch , So today I sorted out a simple method to unlock and query the lock table ;
One 、 First PL/SQL Use the administrator's account (system/admin etc. ) Sign in , The administrator's account and password are based on personal settings , Connection is a general choice Normal, You can also choose SYSDBA;
Two 、 relevant SQL sentence :
-- The following are related tables
SELECT*FROMv$lock;
SELECT*FROMv$sqlarea;
SELECT*FROMv$session;
SELECT*FROMv$process;
SELECT*FROMv$locked_object;
SELECT*FROMall_objects;
SELECT*FROMv$session_wait;– View locked table information
select sess.sid,sess.serial#, lo.oracle_username,lo.os_user_name, ao.object_name,lo.locked_mode from v$locked_object lo,dba_objects ao,v$session sess where ao.object_id=lo.object_id and lo.session_id=sess.sid;– Kill the lock table process
alter system kill session '68,51';-- Respectively SID and SERIAL# Number – View the table that caused the lock in the database SQL sentence
SELECT A.USERNAME,
A.MACHINE,
A.PROGRAM,
A.SID,
A.SERIAL#,
A.STATUS,
C.PIECE,
C.SQL_TEXT
FROM V$SESSION A, V$SQLTEXT C
WHERE A.SID IN (SELECT DISTINCT T2.SID
FROM V$LOCKED_OBJECT T1, V$SESSION T2
WHERE T1.SESSION_ID = T2.SID)
AND A.SQL_ADDRESS = C.ADDRESS(+)
ORDER BY C.PIECE;Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/133999.html Link to the original text :https://javaforall.cn
边栏推荐
- Common problems and Thoughts on member operation management
- 女性科学家的流失
- 统计遗传学:第一章,基因组基础概念
- 11、 Box styles and user interface
- SolidWorks rendering tips how not to display edges -- display style settings
- PC QQ hall upload update modify VersionInfo
- Flannel's host GW and calico
- The transformation of enterprise customers' digital assets needs to suit the case
- MQTT断开重连
- 18:第三章:开发通行证服务:1:短信登录&注册流程,简介;(这儿使用短信验证码)
猜你喜欢

深度理解STM32的串口实验(寄存器)【保姆级教程】

Omni channel member link - tmall member link 3: preparation of member operation content

高并发下如何防重?

MQTT断开重连

量化初级 -- akshare获得股票代码,最简策略

Machine Learning Clustering - Experimental Report

redux相关用法

Pratique de l'attaque et de la défense du réseau HUST | 6 Expérience de sécurité du microprogramme de l'équipement IOT | expérience 2 technologie d'atténuation des attaques de l'équipement IOT basée s

Machine learning LDA - Experimental Report

Implementing MySQL master-slave replication in docker
随机推荐
LeetCode 710 黑名单中的随机数[随机数] HERODING的LeetCode之路
24 database interview questions that must be mastered!
Build document editor based on slate
中国十大证券app排名 开户安全吗
Easyx----- C language implementation 2048
Statistical genetics: Chapter 1, basic concepts of genome
AD - 将修改后的 PCB 封装更新到当前 PCB 中
国际美妆业巨头押注中国
How can we reach members more effectively?
The best CMDB system
How do consumer goods enterprises formulate membership interests?
11、 Box styles and user interface
Random numbers in leetcode 710 blacklist [random numbers] the leetcode path of heroding
请指教同花顺是什么软件?在线开户安全么?
Re recognized! Know that Chuangyu has been selected as one of the first member units of the "business security promotion plan"
证券账户可以开通 开户安全吗
Notice on printing and Distributing Measures for supporting strategic emerging industries and future industrial cluster development in Futian District, Shenzhen
Several problems encountered in setting up the environment in the past two days
MOS管基本原理,单片机重要知识点
Machine learning deep neural network -- Experimental Report