-- 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. -- Lock Table query CodeSelect count (*) from V $ locked_object; select * from V $ locked_object; -- view which table is locked SQL code select B. owner, B. object_name,. session_id,. locked_mode from V $ locked_object A, dba_objects B where B. object_id =. object_id; -- view which session caused SQL code select B. username, B. sid, B. serial #, logon_time from V $ locked_object A, V $ session B where. session_id = B. sid order by B. logon_time; execute the command: Alter system kill session '1970, 41'; where 1025 is Sid and 41 is serial #. reference: http://www.2cto.com/database/201203/124084.html
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service