PL/SQL: Process for deleting a lock table

Source: Internet
Author: User

Step 1: Use the following SQL statement to view the process list and identify the locked table

SELECT dob. OBJECT_NAME Table_Name, lo. SESSION_ID | ',' | vss. SERIAL # delete number,

Lo. locked_mode, lo. SESSION_ID, vss. SERIAL #, vss. action Action, vss. oSUSEr OSUSER, vss. LOGON_TIME,

Vss. process AP_PID, VPS. SPID DB_PID, vss .*

From v $ locked_object lo, dba_objects dob, v $ session vss, V $ PROCESS VPS

Where lo. OBJECT_ID = dob. OBJECT_ID

And lo. SESSION_ID = vss. SID

And vss. paddr = VPS. addr

Order by 2, 3, DOB. object_name

Or

SELECT/* + rule */lpad ('', decode (l. xidusn, 0, 3, 0) | l. Oracle_username User_name,
O. owner, o. object_name, o. object_type, s. sid, s. serial #
FROM v $ locked_object l, dba_objects o, v $ session s
WHERE l. object_id = o. object_id
AND l. session_id = s. sid
Order by o. object_id, xidusn DESC


-- Query the locked table

Step 2: delete a process. If the result of the previous "delete number" is "286,218 4", run the following SQL


ALTER system kill session '2017 4'

After Oracle 10g is installed, restart the system. If PLSQL is used for connection, no listening is reported.

ORA-03114 PLSQL process compilation disconnection Error

Simple configuration of PLSQL connection to Oracle

Detailed description on Performance Improvement of PLSQL batch Forall operations

Use Oracle SQLDeveloper to connect to the database and create a user

Oracle PL/SQL Developer import and export data

Install the Oracle 11g and Oracle SQL Developer clients in 64-bit Windows 7

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.