add locking on oracle scripts
fix oracle script