Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Updated LCK.SQL file. Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • usnsql.sql Displays information about UNDO segments with sql statements Oracle
  • Removing first line Linux/Unix
  • find_pk.sql /* Find Primary Key */ Oracle
  • Nice notes on wait events Oracle
  • v$backup.status information Oracle
  • Goldengate document from Porus Oracle
  • Convert multiple rows to single column Oracle
  • UNderstand and eliminate Latch contention. Oracle
  • chk_space_SID.ksh Linux/Unix
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • Looping for remote servers and find its database from oratab file. Linux/Unix
  • sesswait.sql Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle

lck.sql

Posted on 19-Aug-2005 By Admin No Comments on lck.sql

select c.sid, c.serial#, c.username, a.object_id, b.object_name, c.program, c.status, d.name, c.osuser,

e.sql_text, DBMS_ROWID.ROWID_CREATE(1, c.ROW_WAIT_OBJ#, c.ROW_WAIT_FILE#, c.ROW_WAIT_BLOCK#, c.ROW_WAIT_ROW# ) locked_rowid

from v$Locked_object a, All_objects b, v$session c, audit_actions d, v$sqlarea e

where a.object_id=b.object_id

and a.session_id =c.sid(+)

and c.command=d.action

and c.row_wait_obj# != -1

and c.sql_id=e.sql_id;

Oracle, SQL scripts

Post navigation

Previous Post: The most important Tuning Notes
Next Post: Important Script Method for tuning

Related Posts

  • JSON/XML Types in Oracle Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • Monitor Long Running Job Oracle
  • Physical Standby switchover with session active Oracle
  • refre.sql Oracle
  • Wait.sql Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • Find nth max and min. Oracle
  • Find total file sizes Linux/Unix
  • Implementation of key based authentications Linux/Unix
  • Export Import with QUERY Oracle
  • eplan.sql Oracle
  • switchlogfile.sh Linux/Unix
  • Good links for x$ tables in oracle. Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme