Thursday, May 21, 2009

DBA_INVALID_OBJECTS

1. DBA_INVALID_OBJECTS is new in 11g.

2. Run utlrp.sql to recompile any remaining stored PL/SQL and Java code, and the invalid objects are stored in DBA_INVALID_OBJECTS.

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

Verify that all expected packages and classes are valid:

SQL> SELECT count(*) FROM dba_invalid_objects;

SQL> SELECT distinct object_name FROM dba_invalid_objects;

The DBA_INVALID_OBJECTS is defined with query:

select "OWNER", "OBJECT_NAME", "SUBOBJECT_NAME", "OBJECT_ID", "DATA_OBJECT_ID",

"OBJECT_TYPE", "CREATED", "LAST_DDL_TIME", "TIMESTAMP", "STATUS",

"TEMPORARY", "GENERATED", "SECONDARY", "NAMESPACE", "EDITION_NAME"

from DBA_OBJECTS

where STATUS = 'INVALID' and

(OBJECT_TYPE != 'TYPE' or

(OBJECT_TYPE='TYPE' and SUBOBJECT_NAME is null))

Oracle data dictionary views

Oracle dynamic performance views

Tuesday, May 19, 2009

DBA_KGLLOCK

DBA_KGLLOCK lists all the locks and pins held on KGL objects (objects in the Kernel Generic Library cache).

Column

Datatype

NULL

Description

kgllkuse

RAW(4)

Address of the user session that holds the lock or pin

kgllkhdl

RAW(4)

Address of the handle for the KGL object

kgllkmod

NUMBER

Current mode of the lock or pin

kgllkreq

NUMBER

Mode in which the lock or pin was requested

kgllktype

VARCHAR2(4)

Whether this is a lock or a pin

Note

1To setup lock views such as dba_locks and dba_blockers, run $ORACLE_HOME/rdbms/admin/catblock.sql. The script creates dba_locks, dba_blockers, dba_kgllock, dba_lock (dba_locks is synonym for this), dba_lock_internal, dba_dml_locks, dba_ddl_locks and dba_waiters.

Oracle data dictionary views

Oracle dynamic performance views

Tuesday, May 12, 2009

DBA_CONNECT_ROLE_GRANTEES

DBA_CONNECT_ROLE_GRANTEES displays information about users who are granted the CONNECT privilege.

Column

Datatype

NULL

Description

GRANTEE

VARCHAR2(30)

User or schema to which the CONNECT role is granted

PATH_OF_CONNECT_ROLE_GRANT

VARCHAR2(4000)

The path of role inheritance through which the grantee is granted the CONNECT role

ADMIN_OPT

VARCHAR2(3)

Whether or not the grantee was granted the ADMIN option for the CONNECT role

In Oracle 7: The CONNECT role was introduced with other predefined roles, i.e., DBA, RESOURCE, EXP_FULL_DATABASE, IMP_FULL_DATABASE.

In 8i: New roles are introduced which allow access to the dictionary views, i.e., SELECT_CATALOG_ROLE, EXECUTE_CATALOG_ROLE, DELETE_CATALOG_ROLE

In 9i: SELECT_CATALOG_ROLE works in conjunction with parameter O7_DICTIONARY_ACCESSIBILITY and SELECT ANY DICTIONARY privilege

In 10.2/11R1: the CONNECT role is changed, i.e., only having CREATE SESSION. The seven other privileges have been removed from the CONNECT role: CREATE TABLE, CREATE VIEW, CREATE SYNONYM, CREATE CLUSTER, CREATE DATABASE LINK, CREATE SEQUENCE, ALTER SESSION.

The DBA_CONNECT_ROLE_GRANTEES view enables administrators who decide to continue using the old CONNECT role to list which users have the CONNECT role.

Oracle data dictionary views

Oracle dynamic performance views

DBA_CHANGE_NOTIFICATION_REGS

DBA_CHANGE_NOTIFICATION_REGS describes all change notification registrations in the database.

Related View: USER_CHANGE_NOTIFICATION_REGS describes the change notification registrations owned by the current user. This view does not display the USERNAME column.

Column

Datatype

NULL

Description

USERNAME

VARCHAR2(31)

Owner of the registration

REGID

NUMBER

Internal registration ID

REGFLAGS

NUMBER

Registration flags

CALLBACK

VARCHAR2(256)

Notification callback

OPERATIONS_FILTER

NUMBER

Operations filter (if specified)

CHANGELAG

NUMBER

Transaction lag between notifications (if specified)

TIMEOUT

NUMBER

Registration timeout (if specified)

TABLE_NAME

VARCHAR2(63)

Name of the registered table

Oracle data dictionary views

Oracle dynamic performance views