Re: DX Lock problem



On Fri, 29 Jun 2007 07:55:28 -0700, Charles Hooper wrote:

On Jun 29, 6:37 am, sorc...@xxxxxxxxx wrote:
On Jun 28, 6:13 pm, Charles Hooper <hooperc2...@xxxxxxxxx> wrote:
On Jun 28, 10:48 am, sorc...@xxxxxxxxx wrote:

Google search:
oracle dx lock
or
oracle dx lock commit rollback

Finds this page:
http://www.jlcomp.demon.co.uk/faq/find_dist.html

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.

Charles,

that was clear to me... what is not clear is that I can't see the point
of acquiring an exclusive lock on an object (whatever the object is, I
smell it might be an undo segment) in exclusive mode and serializing
all other session.
The symptom is evident in production: once in a while we see this
exclusive mode lock of type DX, the database slows down and every
single query (select i mean) not necessarly issued from an xa
connection against, for example, the gv$global_transaction is there
forever.
I am pretty sure is a bug... but I need to reproduce it somehow.

Yes, the distributed_lock_timeout is exactly 9000, as Mladen suggested
me, but i can't even force commit or rollback of that in doubt
transaction because I can't select from dba_pending_trans.

g

I will have to defer this question to someone who uses distributed
transactions more frequently than I. I recall seeing similar DX locks
when I experimented with queries in remote databases. Sessions would
occasionally hang for no apparent reason. It seems like ghost sessions
would also remain connected to the database, long after the calling
session was terminated. At the time I located the above article that
indicated a COMMIT or ROLLBACK was needed following a SELECT to clear
the lock, and it seemed to make perfect sense.

You might want to check the first two links on this search page:
http://groups.google.com/groups?um=1&tab=wg&hl=en&q=oracle%20dx%20lock%
20lewis

Mladen, thanks for the parameter hint.

Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.


The paper I used when this has happened to me is the ML note 338880.1.
Here is an excerpt:
" The Oracle distributed_lock_timeout limits how long distributed
transactions will wait for a lock. This parameter was deprecated in 8i
in favor of the '_distributed_lock_timeout' parameter (note the
underscore), but was reinstated in 9i and above. This parameter should
always be the largest, otherwise Oracle will time out first, and it's own
mechanisms will attempt automatic recovery. The TPM then loses control
of the transaction, and the transaction may go in-doubt and require
manual intervention. ORA-1591 'lock held by in-doubt transaction' and
other errors can result".

--
http://www.mladen-gogala.com
.



Relevant Pages

  • Re: controlling lock order in transactions
    ... > and the trigger issued a rollback your commit or rollback would error. ... > Andrew J. Kelly SQL MVP ... >> taken) for the duration of the transaction. ... >> find in the clients sp that could be causing the dead lock is the join on ...
    (microsoft.public.sqlserver.programming)
  • Re: Lock-free databases
    ... > lock, latch, enqueue, or other name is a lock for the purpose of this ... Database concurrency control. ... be it Oracle or SQL Server ...
    (comp.databases.theory)
  • Re: Informix beats Oracle
    ... What's the difference between that and this new feature? ... similar to the Oracle implementation, and was not available in other products. ... Using this, you won't block when trying to read a row that has a lock. ... I'm "tired" of explaining the locking issues to developers that were trained only in Oracle... ...
    (comp.databases.informix)
  • Re: Locking question when using Select clause with For Update and Skip locked
    ... This is working fine in SQL Server and multiple session can get the ... But in Oracle the first session only return 1 row but locks all the ... It looks like both the session got the ROW-X lock but one session is ...
    (comp.databases.oracle.server)
  • Re: DX Lock problem
    ... oracle dx lock commit rollback ...
    (comp.databases.oracle.server)