DBA_LOCK or DBA_LOCKS view does not exist

Login on to the server OS as oracle user and then

$cd $ORACLE_HOME/rdbms/admin/

$ls -lrt catblock.sql

Here is the output

-rw-r--r-- 1 oracle01 dba01 13900 Nov 13  2007 catblock.sql

Now login as sysdba

$sqlplus "/as sysdba"

Run the script called "catblock.sql". 

SQL>@catblock.sql

The script creates dba_locks and dba_blockers, along with the following views:
  • dba_kgllock
  • dba_lock (dba_locks is synonym for this)
  • dba_lock_internal
  • dba_dml_locks
  • dba_ddl_locks
  • dba_waiters

Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post