Dynamic Performance View 有三百多個‧你常會聽到它們被稱為「V$」View,因為它們的名稱前面會是「V$」‧ 事實上,「V$」
範例: SELECT OBJECT_NAME,OBJECT_TYPE                                                                             
          FROM DBA_OBJECTS                                                                                           
          WHERE OBJECT_NAME LIKE 'V$%' OR OBJECT_NAME LIKE 'V_$%';                                                   
結果: OBJECT_NAME                  OBJECT_TYPE                                                                             
          ---------------------------         -------------------                                                                          
          V_$MAP_LIBRARY            VIEW                                                                                     
          V$MAP_LIBRARY               SYNONYM                                                                                  
          V_$MAP_FILE                      VIEW                                                                                     
          V$MAP_FILE                        SYNONYM                                                                                  
          V_$MAP_FILE_EXTENT     VIEW                                                                                     
          V$MAP_FILE_EXTENT       SYNONYM                                                                                 
Dynamic Performance View 對關於instance和資料庫驚人的資訊數量(某種程度上),提供了存取方式‧ 多數 View 會被填入來自
instance的資訊,其餘的會被填入來看Control File的資訊‧它們都會提供即時資訊‧ 例如V$INSTANCE或V$SYSSTAT,隨時都可以
此時控制檔(Control File)已被讀取‧相較之下,Static Data Dictionary Views(開頭為DBA、ALL、USER)只能在資料庫已開啟後才能被
Static Data Dictionary Views會在啟動時建立,在instance存在期間被更新,並在關機後被捨棄。這代表它們只包含自啟動後所


Oracle contains a set of underlying views that are maintained by the database 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. You can select from these views, but you can never update or alter them.       
(1)You can query the dynamic performance views to extract information from them. However, only simple queries are
   supported. If sorts, joins, GROUP BY clauses and the like are needed, then you should copy the information from
   each V$ view into a table (for example, using a CREATE TABLE ... AS SELECT statement), and then query from    
   those tables.                                                                                                 
(2)Because the information in the V$ views is dynamic, read consistency is not guaranteed for SELECT operations on
   these views.                                                                                                  
The catalog.sql script contains definitions of the views and public synonyms for the dynamic performance views.  
You must run catalog.sql to create these views and synonyms. After installation, only user SYS or anyone with    
SYSDBA role has access to the dynamic performance tables.                         
//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:            


香 香蕉皮 發表在 痞客邦 PIXNET 留言(0) 人氣()