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

Oracle unlock process

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

Share

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

I. Problems encountered:

1. When modifying the table structure, Oracle prompts: "Resources are busy, NOWAIT needs to be formulated..."--Here, I modify the field length, increasing it from 200 to 1000.

2. When operating a table, there is a "stuck" situation, and other items except Oracle should be able to be used normally.

II. Causes of the problem:

The transaction is not committed after the operation on the table, and the client is directly closed, causing the transaction to be suspended, resulting in a stuck situation when accessing the table later.

III. Solution:

1. The locked process (usually a pending transaction, represented as a process in the program):

select t1.sid, t1.serial#, t1.username, t1.logon_time from v$session t1 , v$locked_object t2 where t1.sid = t2.session_id order by t1.logon_time;

Unlock (kill process) according to SID and SERIAL#:

alter system kill session 'sid,serial#';

For example:

alter system kill session 612,17584';

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