Data Dictionary Views
Data Dictionary Views
Also see How to debug PL/SQL code
Parameter Settings
Online Redo Log Information
archived redo logs
Job Queue Information
Tablespace Information
Datafile Information
Rollback Segment Information
Information about Tables
Index Information
Partitioned Tables and Indexes
Views, Synonyms, and Sequences
Constraint Information
Database Users and Profiles
Privilege and Role Information
You have several options for viewing parameter settings.
Viewing Online Redo Log Information
Use the following views to display online redo log information. See Example
| View | Description |
|
|
Displays the redo log file information from the control file |
|
|
Identifies redo log groups and members and member status |
|
|
Contains log history information |
Viewing information about archived redo logs
There are several dynamic performance views that contain useful information about archived redo logs. See Example
The ARCHIVE LOG LIST Command
The SQL*Plus command ARCHIVE LOG LIST can be used to show archiving information for the connected instance. For example:
This display tells you all the necessary information regarding the archived redo log settings for the current instance:
- The database is currently operating in
ARCHIVELOGmode. - Automatic archiving is enabled.
- The archived redo log’s destination is
D:\ORANT\oradata\IDDB2\archive. - The oldest filled online redo log group has a sequence number of 11160.
- The next filled online redo log group to archive has a sequence number of 11163.
- The current online redo log file has a sequence number of 11163.
You can view information about jobs in the job queue using the data dictionary views listed below: See Example
Viewing Tablespace Information
The following data dictionary and dynamic performance views provide useful information about the tablespaces of a database. See Example
The following data dictionary views provide useful information about the datafiles of a database: See Example
Viewing Rollback Segment InformationThe following views are useful for displaying information about rollback segments: See Example
In addition, the following data dictionary views contain information about the segments of a database, including rollback segments:
USER_SEGMENTSDBA_SEGMENTS
Viewing Information About TablesThe following views allow you to access information about tables.
The following views display information about indexes:
Viewing Information About Partitioned Tables and IndexesThe following views display information specific to partitioned tables and indexes:
View Description
USER_PART_TABLESDBAview displays partitioning information for all partitioned tables in the database.ALLview displays partitioning information for all partitioned tables accessible to the user.USERview is restricted to partitioning information for partitioned tables owned by the user.USER_TAB_PARTITIONSDisplay partition-level partitioning information, partition storage parameters, and partition statistics generated by the
DBMS_STATSpackage or theANALYZEstatement.USER_TAB_SUBPARTITIONSDisplay subpartition-level partitioning information, subpartition storage parameters, and subpartition statistics generated by the
DBMS_STATSpackage or theANALYZEstatement.USER_PART_KEY_COLUMNSDisplay the partitioning key columns for partitioned tables.
USER_SUBPART_KEY_COLUMNSDisplay the subpartitioning key columns for composite-partitioned tables (and local indexes on composite-partitioned tables).
USER_PART_COL_STATISTICSDisplay column statistics and histogram information for the partitions of tables.
USER_SUBPART_COL_STATISTICSDisplay column statistics and histogram information for subpartitions of tables.
USER_PART_HISTOGRAMSDisplay the histogram data (end-points for each histogram) for histograms on table partitions.
USER_SUBPART_HISTOGRAMSDisplay the histogram data (end-points for each histogram) for histograms on table subpartitions.
USER_PART_INDEXESDisplay partitioning information for partitioned indexes.
USER_IND_PARTITIONSDisplay the following for index partitions: partition-level partitioning information, storage parameters for the partition, statistics collected by the
DBMS_STATSpackage or theANALYZEstatement.USER_IND_SUBPARTITIONSDisplay the following for index subpartitions: partition-level partitioning information, storage parameters for the partition, statistics collected by the
DBMS_STATSpackage or theANALYZEstatement.
Viewing Information About Views, Synonyms, and SequencesThe following views display information about views, synonyms, and sequences: See Example
View Description
USER_VIEWSDBAview describes all views in the database.ALLview is restricted to views accessible to the current user.USERview is restricted to views owned by the current user.USER_SYNONYMSThese views describe synonyms.
USER_SEQUENCESThese views describe sequences.
USER_UPDATABLE_COLUMNSThese views describe all columns in join views that are updatable.
Viewing Constraint Information
Oracle provides the following views that enable you to see constraint definitions on tables and to identify columns that are specified in constraints:
View Description
USER_CONSTRAINTSDBAview describes all constraint definitions in the database.ALLview describes constraint definitions accessible to current user.USERview describes constraint definitions owned by the current user.USER_CONS_COLUMNSDBAview describes all columns in the database that are specified in constraints.ALLview describes only those columns accessible to current user that are specified in constraints.USERview describes only those columns owned by the current user that are specified in constraints.Viewing Information About Database Users and Profiles
The following data dictionary views contain information about database users and profiles:
View Description
USER_USERSDBAview describes all users of the database.ALLview lists users visible to the current user, but does not describe them.USERview describes only the current user.USER_TS_QUOTASDescribes tablespace quotas for users.
USER_PASSWORD_LIMITSDescribes the password profile parameters that are assigned to the user.
USER_RESOURCE_LIMITSDisplays the resource limits for the current user.
DBA_PROFILESDisplays all profiles and their limits.
RESOURCE_COSTLists the cost for each resource.
V$SESSIONLists session information for each current session. Includes user name.
V$SESSTATLists user session statistics.
V$STATNAMEDisplays decoded statistic names for the statistics shown in the
V$SESSTATview.PROXY_USERSDescribes users who can assume the identity of other users.
Viewing Privilege and Role Information
To access information about grants of privileges and roles, you can query the following data dictionary views:
View Description
USER_COL_PRIVSDBA view describes all column object grants in the database. ALL view describes all column object grants for which the current user or PUBLIC is the object owner, grantor, or grantee. USER view describes column object grants for which the current user is the object owner, grantor, or grantee.
USER_COL_PRIVS_MADEALL view lists column object grants for which the current user is object owner or grantor. USER view describes column object grants for which the current user is the grantor.
USER_COL_PRIVS_RECDALL view describes column object grants for which the current user or PUBLIC is the grantee. USER view describes column object grants for which the current user is the grantee.
USER_TAB_PRIVSDBA view lists all grants on all objects in the database. ALL view lists the grants on objects where the user or PUBLIC is the grantee. USER view lists grants on all objects where the current user is the grantee.
USER_TAB_PRIVS_MADEALL view lists the all object grants made by the current user or made on the objects owned by the current user. USER view lists grants on all objects owned by the current user.
USER_TAB_PRIVS_RECDALL view lists object grants for which the user or PUBLIC is the grantee. USER view lists object grants for which the current user is the grantee.
DBA_ROLESThis view lists all roles that exist in the database.
USER_ROLE_PRIVSDBA view lists roles granted to users and roles. USER view lists roles granted to the current user.
USER_SYS_PRIVSDBA view lists system privileges granted to users and roles. USER view lists system privileges granted to the current user.
ROLE_ROLE_PRIVSThis view describes roles granted to other roles. Information is provided only about roles to which the user has access.
ROLE_SYS_PRIVSThis view contains information about system privileges granted to roles. Information is provided only about roles to which the user has access.
ROLE_TAB_PRIVSThis view contains information about object privileges granted to roles. Information is provided only about roles to which the user has access.
SESSION_PRIVSThis view lists the privileges that are currently enabled for the user.
SESSION_ROLESThis view lists the roles that are currently enabled to the user.