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

What is the use of Oracle Kill Lock?

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the use of Oracle Kill Lock". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the use of Oracle Kill Lock"?

1. Find a session with lock blocking:

Select sid,serial#,program,machine,username,event,blocking_instance,blocking_session from gv$session where wait_class' Idle'

Instance where the blocking_instance lock source is located

Blocking_session lock source SID

two。 Locate the lock source according to blocking_session:

Select sid,serial#,program,machine,username,event,blocking_instance,blocking_session,paddr,sql_id,prev_sql_id from gv$session where inst_id=1 and sid=157

The ID of the SQL statement being executed by Sql_id

The ID of the last SQL statement executed by prev_sql_id

Sometimes the last executed SQL statement is not necessarily the one that causes blocking.

3. View sql_text based on sql_id or prev_sql_id:

Select sql_text from v$sql where sql_id='61d2zmyjyc3km'

4. End the lock source session:

Alter system kill session '472, 23983, and 1' immediate.

Thank you for your reading, the above is the content of "what is the use of Oracle Kill Lock". After the study of this article, I believe you have a deeper understanding of what is the use of Oracle Kill Lock, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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