About Static Data Dictionary Views

huzhichengforce發表於2012-08-26
1.靜態資料字典檢視:

Data dictionary tables are not directly accessible, but you can access information in them through data dictionary views. To list the data dictionary views available to you, query the view DICTIONARY.

資料字典不能夠直接訪問,但是你能夠透過資料字典檢視得到裡面的資訊。   透過查詢資料字典檢視,列出各類資訊

Many data dictionary tables have three corresponding views:

許多資料字典表有三張對應的檢視。

An ALL_ view displays all the information accessible to the current user, including information from the current user's schema as well as information from objects in other schemas, if the current user has access to those objects by way of grants of privileges or roles.

一種是以ALL_開頭的,包含了當前使用者所有能夠訪問到的資訊。包括當前使用者的 schemas也包括其它的 schemas:允許當前使用者有權訪問的那些物件或者

A DBA_ view displays all relevant information in the entire database. DBA_ views are intended only for administrators. They 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.

一種是以DBA_開頭的,包含了整個資料庫相關的資訊,DBA_開頭的檢視一般只給adminiistator 管理員使用者使用,它們只能被透過獲得了SELECT ANY TABLE  許可權的使用者查詢到, 這種許可權在建立資料庫的時候會指定給dba 這個角色。

A USER_ view displays all the information from the schema of the current user. No special privileges are required to query these views.

一種是以USER_開頭的,所有的資訊都是來自與當前使用者的schema,當前使用者查詢這些檢視不需要特殊的許可權

The columns of the ALL_, DBA_, and USER_ views corresponding to a single data dictionary table are usually nearly identical. 

ALL_ ,DBA_ 和USER_ 這些檢視通常列出的結果是一個非常相似的資料。

About Dynamic Performance Views

V$ Views
The actual dynamic performance views are identified by the prefix V_$. Public synonyms for these views have the prefix V$. Database administrators and other users should access only the V$ objects, not the V_$ objects.

The dynamic performance views are used by Oracle Enterprise Manager, which is the primary interface for accessing information about system performance. After an instance is started, the V$ views that read from memory are accessible. Views that read data from disk require that the database be mounted, and some require that the database be open.

GV$ Views

For almost every V$ view described in this chapter, Oracle has a corresponding GV$ (global V$) view. In Real Application Clusters, querying a GV$ view retrieves the V$ view information from all qualified instances. In addition to the V$ information, each GV$ view contains an extra column named INST_ID of datatype NUMBER. 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 following query retrieves the information from the V$LOCK view on instances 2 and 5:

另:
  • DBA_ / USER_ / ALL_ views are built on the data dictionary - they're not available if the database is not mounted and opened.

  • V$_.. views are dynamic performance dirctionary views, where as user_.., all_.. and dba_.. view are static performance dirctionary views. i.e. V$ views are get updated from control files and memory but to update dictionary information for user_, all_ and dba_ view you may need to analyze the object.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26764973/viewspace-741923/,如需轉載,請註明出處,否則將追究法律責任。

相關文章