View locked data [Z]

Source: Internet
Author: User

SELECT Lock_info. OWNER | |'.'|| Lock_info. Obj_name as Obj_name--object name (already locked), Lock_info. Subobj_name as Subobj_name--child object name (already locked), Sess_info. Machine as Machine--machine name, Lock_info. session_id as session_id--session session_id, Sess_info. serial# as serial#--session serial#, Lock_info. Ora_username as Ora_username--Oracle System User name, Lock_info. Os_username as Os_username--operating system user name, Lock_info. Process as Process--process number, lock_info. obj_id as obj_id--Object ID, lock_info. Obj_type as Obj_type--object type, Sess_info. Logon_time as Logon_time--login time, Sess_info. Program as Program--program name, Sess_info. Status as Status--session state, Sess_info. Lockwait as Lockwait--wait for the lock, Sess_info. Action as Action--action, Sess_info. Client_info as Client_info--Customer information from (SELECT obj. Owner as owner, obj. object_name as Obj_name, OBJ. Subobject_name as Subobj_name, obj. object_id as obj_id, OBJ. Object_type as Obj_type, Lock_obj. session_id as session_id, Lock_obj. Oracle_username as Ora_username, Lock_obj. Os_user_name as Os_username, Lock_obj. Process as process from (SELECT*From all_objects WHERE object_id in (SELECT object_id from v$locked_object)) obj , V$locked_object lock_obj WHERE obj.object_id=lock_obj.object_id)              Lock_info, (SELECT SID, serial#, lockwait, STATUS, program  , ACTION, Client_info, Logon_time, machine from v$session) sess_info WHERE Lock_info. session_id= Sess_info. SID;

To view locked data

View locked data [Z]

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.