Skip to content

lock

New Features 23c, Overview (in extracts):

In this blog I want to introduce some of the new features of the Oracle 23c developer edition. It will be only a selection of some of the main features. It is not the intention to give you a thorough picture of all the features in this blog. I have tested some of the essential ones (in my opinion) on… 

Oracle Lock Free Reservations

The Oracle 23c new feature Lock Free Reservations allows to break with the traditional locking mechanism. Now multiple concurrent sessions can update the same row without be blocked !!! Let’s see how it works. In the traditional locking mechanism, when a first session modifies a row, oracle will hold 2 locks : If a second session tries to update the… 

A few words about the good to know MAX_IDLE_BLOCKER_TIME

The increasing popularity of tools like SQL Developer and Toad, sometimes comes hand in hand with an increase of stuck sessions.This is especially seen in cases where: User A does a change (neither committed nor rolled back). Then, switches to another task, or even leaves for lunch. Then, User B updates the same row and stays there, stuck for hours.… 

Documentum Upgrade – Castor is locked!

One of the best practices while doing upgrade of Documentum is to unlock the various repository objects before starting. This will make sure that if the upgrade process requires an update of some objects, then it will succeed and not cause you issues because you are missing some pieces. This also brings a second benefit: it means that if you… 

RCSI with foreign keys, NULL values and paramater sniffing behavior

In this blog post let’s go back to the roots (DBA concern) with a discussion with one of my friends about a weird transaction locking issue. In fact, this discussion was specifically around two questions. The first one was why SQL Server continues to use shared locks in RCSI mode leading to blocking scenarios and the second one was about… 

Result cache invalidation caused by DML locks

By Franck Pachot . In a previous post about Result Cache, I was using ‘set autotrace on’ in my session to see when the result cache hit saves the logical reads. I got a comment, by e-mail and with full test case, mentioning that the invalidation I had when doing some DML does not occur when autotrace is set to… 

Documentum story – How to avoid “DFC_FILE_LOCK_ACQUIRE_WARN” messages in Java Method Server (jms) LOG

After upgrading from 6.7.x to 7.2, the following warning message is logged in JMS log files: com.documentum.fc.common.DfNewInterprocessLockImpl – [DFC_FILE_LOCK_ACQUIRE_WARN] Failed to acquire lock proceeding ahead with no lock java.nio.channels.OverlappingFileLockException at sun.nio.ch.SharedFileLockTable.checkList FileLockTable.java:255) By default ACS and ServerApp dfc.properties are pointing to $DOCUMENTUM_SHARED/config/dfc.properties. Adding separate ‘dfc.data.dir’ cache folder location in ACS and ServerApp dfc.properties. After JAVA Method Server restart, two separate… 

Oracle serializable is not serializable

By Franck Pachot . Did you know that when you set isolation level to SERIALIZABLE, it is not serializable but SNAPSHOT? This isolation level is lower than serializable. I’ve never thought about it until I read Markus Winand slides about transactions. I recommend every developer or DBA to read those slides. This post is there to illustrate write skew in… 

Script to suggest FK indexes

By Franck Pachot . In Oracle, when the referenced key is deleted (by delete on parent table, or update on the referenced columns) the child tables(s) are locked to prevent any concurrent insert that may reference the old key. This lock is a big issue on OLTP applications because it’s a TM Share lock, usually reserved for DDL only, and… 

NOLOCK is definitely not what you may expect …

For those who still believe that using nolock hint is a lock-free process, keep reading this blog post. I wrote a previous blog post 3 years ago, when I was at one of my customer and we had an interesting discussion about the nolock hint with reporting queries. I convinced him that nolock continues to generate locks even if the… 

Waiting for row lock. But which row is locked?

By Franck Pachot . When you are waiting on a locked row, the locked resource is the transaction that has locked the row. We have no information about which row is locked. Here is how to get it from V$SESSION. In a first session I lock a row in the SCOTT schema: SQL> select * from SCOTT.SALGRADE where grade=1 for… 

Oracle: an unexpected lock behavior with rollback

By Franck Pachot . Here is an odd Oracle behavior I observed when a transaction that acquired a lock is rolled back. Note that this is related to a specific combination of locks that should not be encountered in production. So it’s not a bug. Just something unexpected.   First session In my first session I lock the DEPT table…