Dynamic Performance Tables (271)
Throughout its operation, Oracle maintains a set of virtual tables that record currentdatabase activity. These tables are called dynamic performance tables.Dynamic performance tables are not true tables, and they should not be accessed bymost users. However, database administrators can query and create views on thetables and grant access to those views to other users. These views are sometimes calledfixed views because they cannot be altered or removed by the database administrator.SYS owns the
Views with the Prefix DBA (269)
Views with the prefix DBA show a global view of the entire database. Synonyms arenot created for these views, because DBA views should be queried only byadministrators. Therefore, to query the DBA views, administrators must prefix the viewname with its owner, SYS, as in the following:SELECT owner, object_name, object_type FROM SYS.DBA_OBJECTS;Oracle recommends that you implement data dictionary protection to prevent usershaving the ANY system privileges from using such privileges on the data dic
Views with the Prefix ALL (268)
Views with the prefix ALL refer to the user’s overall perspective of the database. Theseviews return information about schema objects to which the user has access throughpublic or explicit grants of privileges and roles, in addition to schema objects that theuser owns. For example, the following query returns information about all the objectsto which you have access:SELECT owner, object_name, object_type FROM ALL_OBJECTS;ALL前缀视图以 ALL为前缀的视图反映了某个用户所能看到的全部数据库内容。其中除
Views with the Prefix USER (267)
The views most likely to be of interest to typical database users are those with theprefix USER. These views:■ Refer to the user’s own private environment in the database, includinginformation about schema objects created by the user, grants made by the user,and so on■ Display only rows pertinent to the user■ Have columns identical to the other views, except that the column OWNER isimplied■ Return a subset of the information in the ALL views■ Can have abbreviated PUBLIC synonyms for conven
How to Use the Data Dictionary (266)
The views of the data dictionary serve as a reference for all database users. Access thedata dictionary views with SQL statements. Some views are accessible to all Oracleusers, and others are intended for database administrators only.The data dictionary is always available when the database is open. It resides in theSYSTEM tablespace, which is always online.The data dictionary consists of sets of views. In many cases, a set consists of threeviews containing similar information and distinguished
Other Programs and the Data Dictionary (265)
Other Oracle products can reference existing views and create additional datadictionary tables or views of their own. Application developers who write programsthat refer to the data dictionary should refer to the public synonyms rather than theunderlying tables: the synonyms are less likely to change between software releases.其他程序与数据字典[@more@]
Cache the Data Dictionary for Fast Access (264)
Much of the data dictionary information is kept in the SGA in the dictionary cache,because Oracle constantly accesses the data dictionary during database operation tovalidate user access and to verify the state of schema objects. All information is storedin memory using the least recently used (LRU) algorithm.Parsing information is typically kept in the caches. The COMMENTS columns describingthe tables and their columns are not cached unless they are accessed frequently.缓存数据字典1. 大多数的
Public Synonyms for Data Dictionary Views (263)
Oracle creates public synonyms for many data dictionary views so users can accessthem conveniently. The security administrator can also create additional publicsynonyms for schema objects that are used systemwide. Users should avoid namingtheir own schema objects with the same names as those used for public synonyms.数据字典视图的公共同义词1. 用户通过公共同义词能方便的访问数据字典2. 用户应防止自身的方案对象名与公共同义词名重复[@more@]
How the Data Dictionary Is Used (261)
The data dictionary has three primary uses:■ Oracle accesses the data dictionary to find information about users, schemaobjects, and storage structures.■ Oracle modifies the data dictionary every time that a data definition language(DDL) statement is issued.■ Any Oracle user can use the data dictionary as a read-only reference forinformation about the database.数据字典如何使用数据字典有三个主要用途: * Oracle 利用数据字典来获取关于用户,方案对象,及存储结构的信息。 * 每当数据库中执行了
How Oracle Uses the Data Dictionary (262)
Data in the base tables of the data dictionary is necessary for Oracle to function.Therefore, only Oracle should write or change data dictionary information. Oracleprovides scripts to modify the data dictionary tables when a database is upgraded ordowngraded.During database operation, Oracle reads the data dictionary to ascertain that schemaobjects exist and that users have proper access to them. Oracle also updates the datadictionary continuously to reflect changes in database structures, audit
SYS, Owner of the Data Dictionary (260)
The Oracle user SYS owns all base tables and user-accessible views of the datadictionary. No Oracle user should ever alter (UPDATE, DELETE, or INSERT) any rowsor schema objects contained in the SYS schema, because such activity can compromisedata integrity. The security administrator must keep strict control of this centralaccount.SYS用户:数据字典的拥有者1. 没有Oracle用户能更改sys方案下的对象 ,这样的操作将危及数据完整性[@more@]
Structure of the Data Dictionary : User-Accessible Views (259)
The views that summarize and display the information stored in the base tables of thedata dictionary. These views decode the base table data into useful information, suchas user or table names, using joins and WHERE clauses to simplify the information.Most users are given access to the views rather than the base tables.数据字典结构之用户可访问视图1. 将基表的数据通过连接,where条件将基表中有用的信息转换展现给用户[@more@]
Structure of the Data Dictionary : Base Tables (258)
The underlying tables that store information about the associated database. OnlyOracle should write to and read these tables. Users rarely access them directly becausethey are normalized, and most of the data is stored in a cryptic format.数据字典结构之基表1. Oracle能读写这些数据字典的基本 , 基表大多数被加密[@more@]
Introduction to the Data Dictionary (257)
One of the most important parts of an Oracle database is its data dictionary, which is aread-only set of tables that provides information about the database. A data dictionarycontains:■ The definitions of all schema objects in the database (tables, views, indexes,clusters, synonyms, sequences, procedures, functions, packages, triggers, and soon)■ How much space has been allocated for, and is currently used by, theschema objects■ Default values for columns■ Integrity constraint information■
Definition of ad hoc query
A non-standard inquiry. An ad hoc query is created to obtain information as the need arises.Contrast with a query that is predefined and routinely performed[@more@]
Dependencies of Applications (256)
Code in database applications can reference objects in the connected database. Forexample, OCI and precompiler applications can submit anonymous PL/SQL blocks.Triggers in Oracle Forms applications can reference a schema object.Such applications are dependent on the schema objects they reference. Dependencymanagement techniques vary, depending on the development environment.应用程序的依赖性数据库应用程序的代码中也会引用相关数据库中的对象[@more@]
Dependencies Among Other Remote Schema Objects (255)
Oracle does not manage dependencies among remote schema objects other thanlocal-procedure-to-remote-procedure dependencies.For example, assume that a local view is created and defined by a query thatreferences a remote table. Also assume that a local procedure includes a SQL statementthat references the same remote table. Later, the definition of the table is altered.As a result, the local view and procedure are never invalidated, even if the view orprocedure is used after the table is altered,
Signature Checking (254)
Oracle provides the additional capability of remote dependenciesusing signatures. The signature capability affects only remote dependencies. Localdependencies are not affected, as recompilation is always possible in this environment.The signature of a procedure contains information about the following items:■ Name of the package, procedure, or function■ Base types of the parameters■ Modes of the parameters (IN, OUT, and IN OUT)Note: Only the types and modes of parameters are significant. Then
Time stamp Checking (253)
In the time stamp checking dependency model, whenever aprocedure is compiled or recompiled its time stamp (the time it is created, altered, orreplaced) is recorded in the data dictionary. The time stamp is a record of the time theprocedure is created, altered, or replaced. Additionally, the compiled version of theprocedure contains information about each remote procedure that it references,including the remote procedure’s schema, package name, procedure name, and timestamp.When a dependent proc
Dependencies Among Local and Remote Database Procedures (252)
Dependencies among stored procedures including functions, packages, and triggers ina distributed database system are managed using time stamp checking or signaturechecking.The dynamic initialization parameter REMOTE_DEPENDENCIES_MODE determineswhether time stamps or signatures govern remote dependencies.本地过程及远程过程间的依赖性1. 在分布式数据库系统中,函数,包,触发器等存储过程间的依赖性是通过时间戳检查或签名检查来进行管理的2. 初始话参数 REMOTE_DEPENDENCIES_MODE 决定使用时间戳还是签名检