While doing performance checks and tuning for one of the database found that two of the very well known dynamic views are not working and throwing “Does Not Exist”. We are using – Oracle Database 11g Release 11.2.0.1.0 – 64bit Production.
I was trying to call the views using SYS user.
The two dynamic views are:
DBA_BLOCKERS: It displays a session if it is not waiting for a locked object but is holding a lock on an object for which another session is waiting.
DBA_WAITERS: It shows all the sessions that are waiting for a lock, but do not hold locks for which another session is waiting.
SQL> conn / as sysdba
Connected.
SQL> desc dba_blockers;
ERROR:
ORA-04043: object dba_blockers does not exist
SQL> desc dba_waiters
ERROR:
ORA-04043: object dba_waiters does not exist
[oracle@testdb ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 28 17:25:18 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @?/rdbms/admin/catblock.sql
View created.
Synonym created.
Grant succeeded.
drop synonym DBA_LOCKS
*
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
drop view DBA_LOCKS
*
ERROR at line 1:
ORA-00942: table or view does not exist
View created.
Synonym created.
Grant succeeded.
Synonym created.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
This will create following views.
dba_locks
dba_blockers
dba_kgllock
dba_lock
dba_lock_internal
dba_dml_locks
dba_ddl_locks
dba_waiters
SQL> conn test/test
Connected.
SQL> select sid, username, program, machine from v$session where sid in (select holding_session from dba_blockers);
no rows selected
I was trying to call the views using SYS user.
The two dynamic views are:
DBA_BLOCKERS: It displays a session if it is not waiting for a locked object but is holding a lock on an object for which another session is waiting.
DBA_WAITERS: It shows all the sessions that are waiting for a lock, but do not hold locks for which another session is waiting.
SQL> conn / as sysdba
Connected.
SQL> desc dba_blockers;
ERROR:
ORA-04043: object dba_blockers does not exist
SQL> desc dba_waiters
ERROR:
ORA-04043: object dba_waiters does not exist
[oracle@testdb ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Mon Mar 28 17:25:18 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @?/rdbms/admin/catblock.sql
View created.
Synonym created.
Grant succeeded.
drop synonym DBA_LOCKS
*
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
drop view DBA_LOCKS
*
ERROR at line 1:
ORA-00942: table or view does not exist
View created.
Synonym created.
Grant succeeded.
Synonym created.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
View created.
Synonym created.
Grant succeeded.
This will create following views.
dba_locks
dba_blockers
dba_kgllock
dba_lock
dba_lock_internal
dba_dml_locks
dba_ddl_locks
dba_waiters
SQL> conn test/test
Connected.
SQL> select sid, username, program, machine from v$session where sid in (select holding_session from dba_blockers);
no rows selected