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

Database queries the sql of locked and unlocked tables

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

Share

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

When the program was running, the page suddenly jammed and the background did not report an error. After troubleshooting, the database table was locked. The following sql is to query the locked table and the corresponding unlocked sql.

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

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

Alter system kill session '300, 37803'

SELECT s.sid, s.serial#, s.username, s.schemaname, s.osuser, s.process, s.machine

S.terminal, s.logon_time, l.type

FROM v$session s, v$lock l

WHERE s.sid = l.sid

AND s.username IS NOT NULL

ORDER BY sid

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