Re: Oracle Lock Problem(B
Date: Sat, 28 Mar 2009 06:42:29 -0700 (PDT)
On Mar 27, 11:04 am, Ming$BGl(B <l..._at_tech-trans.com> wrote:
> How can I find the SQL statement that make the table lock?
Ming, you should always provide the full Oracle version on a post. On 10g you can do a recursive query on v$session to produce a hierarchy of wait listed sessions. On prior versions this is not possible and you have to write the query using other v$ views. Oracle provides a script to do this with all versions from at least 7.0 called utltlock located in the $ORACLE_HOME/rdbms/admin directory (UNIX/Linux path may vary on Windows).
More to your issue, DDF gave you a query that might be of help and which should work on all recent versions of Oracle. My preference is to use queries that grap the SQL for just the one session of interest. If David's query does not give you what you need to make progress on the issue then post back with a more detailed request of exactly what information you have and what information you are trying to find.
HTH -- Mark D Powell -- Received on Sat Mar 28 2009 - 08:42:29 CDT