Oracle Database lock Table query and unlock process, oracle au I unlock
Oracle Database lock Table query and unlock Process
In Oracle Database Operations, we sometimes use lock table queries and unlock and kill processes. How do we implement these operations? This article mainly introduces this part.
The lock Table query Code has the following forms:
Select count (*) from v $ locked_object;
Select * from v $ locked_object;
View which table is locked
1. select B. owner, B. object_name, a. session_id, a. locked_mode
2. from v $ locked_object a, dba_objects B
3. where B. object_id = a. object_id;
Check which session is caused
1. select B. username, B. sid, B. serial #, logon_time
2. from v $ locked_object a, v $ session B
3. where a. session_id = B. sid order by B. logon_time;
Kill the corresponding process
Execute the command: alter system kill session '192, 41 ';
Where 1025 is sid and 41 is serial #.
Here is an introduction to the Oracle lock Table query and kill unlocking process. I hope this introduction will be helpful to you!