Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How oracle views locked tables and how to unlock them

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how oracle looks at locked tables and how to unlock them. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

The following are related tables

SELECT * FROM vicious lockout select * FROM vaulted sqlarea select * FROM vault session select select * FROM v$process; SELECT * FROM lockedlockedlockedlockedlockedlockedlockedlockedwords select * FROM all_objects;SELECT * FROM v$session_wait

-- View locked tables

Select b.owner.ownerreb. Objectkeeper namefilamenta.sessionroomidrecorda.lockedwriting mode from v$locked_object a dbathing objects b where b.object_id = a.object_id

-- check that user and that process is deadlocked

Select b.username.b.sidrecoveryb.serialpaperpaperlogonedtime from v$locked_object arecoveryvaccountsession b where a.session_id = b.sid order by b.logon_time

-- View the progress of the connection

SELECT sid, serial#, username, osuser FROM v$session

-3. Find out the sid, serial#,os_user_name, machine_name, terminal, type,mode of the lock table

SELECT s.sid, s. Serializations, s.username, s.schemaname, s.osuser, s.process, s. MachineMagnes.terminal, s.logon_time, l.typeFROM v$session s, v$lock lWHERE s.sid = l.sidAND s.username IS NOT NULLORDER BY sid

This statement will find the locks generated by all the DML statements in the database, and you can also find

Any DML statement actually produces two locks, a table lock and a row lock.

-- kill the process sid,serial#

Alter system kill session'210,11562'; cannot be connected here with a space, or it will make an error, such as (alter system kill session'210,11562';).

Thank you for reading! About oracle how to view locked tables and unlock methods to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report