当前位置:文档之家› 数据库常用数据字典

数据库常用数据字典

Static Data Dictionary ViewsIn Trusted Oracle Server, each of the dictionary tables and views contains a column that indicates the label of each row in the table or view. Trusted Oracle also provides some additional dictionary tables and views, and some Oracle8 dictionary tables and views contain columns that support compatibility with Trusted Oracle applications. See your Trusted Oracle documentation for more information about Trusted Oracle dictionary tables and views.Data Dictionary ViewsThe following is an alphabetical reference of the data dictionary views accessible to all users of an Oracle Server. Most views can be accessed by any user with the CREATE_SESSION privilege.The data dictionary views that begin with DBA_ are restricted. These views can be accessed only by users with the SELECT_ANY_TABLE privilege. This privilege is assigned to the DBA role when the system is initially installed.ALL_ALL_TABLESThis view describes all of the tables (object tables and relational tables) accessible to the user.ALL_INDEXESThis view contains descriptions of indexes on tables accessible to the user. To gather statistics for this view, use the SQL command ANALYZE. This view supports parallel partitioned index scans.ALL_SEQUENCESThis view lists descriptions of sequences accessible to the user.ALL_TABLESThis view contains descriptions of relational tables accessible to the user. To gather statistics for this view, use the SQL command ANALYZE.ALL_TRIGGERSThis view lists trigger information for triggers owned by the user, triggers on tables owned by the user, or all triggers if the user has the CREATE ANY TRIGGER privilege.ALL_USERSThis view contains information about all users of the database.ALL_VIEWSThis view lists the text of views accessible to the user.DBA_ALL_TABLESThis view displays descriptions of all tables (object tables and relational tables) in the database.DBA_CONSTRAINTSThis view contains constraint definitions on all tables.DBA_DATA_FILESThis view contains information about database files.DBA_EXTENTSThis view lists the extents comprising all segments in the database.DBA_FREE_SPACEThis view lists the free extents in all tablespaces.DBA_INDEXESThis view contains descriptions for all indexes in the database. To gather statistics for this view, use the SQL command ANALYZE. This view supports parallel partitioned index scans.DBA_JOBSThis view lists all jobs in the database.DBA_ROLESThis view lists all roles that exist in the database.DBA_ROLE_PRIVSThis view lists roles granted to users and roles.DBA_ROLLBACK_SEGSThis view contains descriptions of rollback segments.DBA_SEGMENTSThis view contains information about storage allocated for all database segments. DBA_TABLESPACESThis view contains descriptions of all tablespaces.DBA_TRIGGERSThis view lists all triggers in the database.DBA_TS_QUOTASThis view lists tablespace quotas for all users.DBA_VIEWSThis view contains the text of all views in the database.DICTIONARYThis view contains descriptions of data dictionary tables and views.USER_TABLESThis view contains a description of the user's own relational tables. To gather statistics for this view, use the SQL command ANALYZE.USER_TABLESPACESThis view contains descriptions of accessible tablespaces.USER_TRIGGERSThis view contains descriptions of the user's triggers.Dynamic Performance ViewsThe Oracle Server contains a set of underlying views that are maintained by the server and accessible to the database administrator user SYS. These views are called dynamic performance views because they are continuously updated while a database is open and in use, and their contents relate primarily to performance.Although these views appear to be regular database tables, they are not. These views provide data on internal disk structures and memory structures. These views can be selected from, but never updated or altered by the user.The file CATALOG.SQL contains definitions of the views and public synonyms for the dynamic performance views. You must run CATALOG.SQL to create these views and synonyms.V$ ViewsDynamic performance views are identified by the prefix V_$. Public synonyms for these views have the prefix V$. Database administrators or users should only access the V$ objects, not the V_$ objects.The dynamic performance views are used by Enterprise Manager and Oracle Trace, which is the primary interface for accessing information about system performance.Suggestion: Once the instance is started, the V$ views that read from memory are accessible. Views that read data from disk require that the database be mounted. Warning:Information about the dynamic performance views is presented for completeness only; this information does not imply a commitment to support these views in the future.GV$ ViewsIn Oracle, there is an additional class of fixed views, the GV$ (Global V$) fixed views. For each of the V$ views described in this chapter (with the exception ofV$CACHE_LOCK, V$LOCK_ACTIVITY, V$LOCKS_WITH_COLLISIONS, and V$ROLLNAME), there is a GV$ view. In a parallel server environment, querying a GV$ view retrieves the V$ view information from all qualified instances. In addition to the V$ information, each GV$ view possesses an additional column namedINST_ID with type integer. The INST_ID column displays the instance number from which the associated V$ view information was obtained. The INST_ID column can be used as a filter to retrieve V$ information from a subset of available instances. For example, the query:SELECT * FROM GV$LOCK WHERE INST_ID = 2 OR INST_ID = 5retrieves the information from the V$ views on instances 2 and 5.The GV$ views can be used to return information on groups of instances defined with the OPS_ADMIN_GROUP parameter.Restrictions on GV$ ViewsGV$ views have the following restrictions:∙The value of the PARALLEL_MAX_SERVERS parameter must be greater than zero on all instances mounting the database.∙The OPS_ADMIN_GROUP parameter must be defined with at least one member for a query to successfully complete.V$BGPROCESSThis view describes the background processes.V$BUFFER_POOLThis view displays information about all buffer pools available for the instance. The "sets" pertain to the number of LRU latch sets.V$CONTROLFILEThis view lists the names of the control files.V$DATABASEThis view contains database information from the control file.V$DATAFILEThis view contains datafile information from the control file.V$DATAFILE_HEADERThis view displays datafile information from the datafile headers.V$DBFILEThis view lists all datafiles making up the database. This view is retained for historical compatibility. Use of V$DATAFILE is recommended instead.V$FILESTATThis view contains information about file read/write statistics.V$INSTANCEThis view displays the state of the current instance. This version of V$INSTANCE is not compatible with earlier versions of V$INSTANCE.V$LICENSEThis view contains information about license limits.V$PARAMETERThis view lists information about initialization parameters.V$ROLLSTATThis view contains rollback segment statistics.V$SGAThis view contains summary information on the System Global Area.V$SGASTATThis view contains detailed information on the System Global Area.V$SHARED_POOL_RESERVEDThis fixed view lists statistics that help you tune the reserved pool and space within the shared pool.V$SHARED_SERVERThis view contains information on the shared server processes.V$SYSSTATThis view lists system statistics.V$TABLESPACEThis view displays tablespace information from the controlfile.。

相关主题