Relationship between dynamic views of Oracle and corresponding tables

Source: Internet
Author: User

We all know that during Oracle database running, we often use Oracle dynamic views starting with V $, such as V $ session, in an accidental situation, someone used the V _ $ session. At first, I thought someone else wrote an error. I didn't expect desc v _ $ session to see the same structure as v $ session, later, we will find views starting with gv $.

Taking the opportunity of installing Oracle on a Linux system, I finally figured out the relationship between these dynamic views and the corresponding tables.

These are data structures managed by Oracle, starting with v $ fixed_table:

 
 
  1. [Oracle@3857 admin]$ sqlplus sys/sys@archdw as sysdba  
  2. SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 14 11:27:20 2009  
  3. Copyright (c) 1982, 2009, Oracle. All rights reserved.  
  4. Connected to:  
  5. Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production  
  6. With the Partitioning, OLAP, Data Mining and Real Application Testing options  
  7. SQL> desc v$fixed_table;  
  8. Name Null? Type  
  9. —————————————– ——– —————————-  
  10. NAME VARCHAR2(30)  
  11. OBJECT_ID NUMBER  
  12. TYPE VARCHAR2(5)  
  13. TABLE_NUM NUMBER  
  14. SQL> select * from v$fixed_table  
  15. NAME OBJECT_ID TYPE TABLE_NUM  
  16. —————————— ———- —– ———-  
  17. X$KQFTA 4294950912 TABLE 0  
  18. X$KQFVI 4294950913 TABLE 1  
  19. GV$PROCESS 4294951256 VIEW 65537  
  20. V$PROCESS 4294950917 VIEW 65537  
  21. GV$BGPROCESS 4294951257 VIEW 65537  
  22. ………………………………………  

From the above we can see that GV $ and V $ are views, and X $ is tables. What is the relationship between them? Obtain the following information from another view v $ fixed_view_definition (take v $ fixed_table as an example ):

 
 
  1. SQL> set linesize 100  
  2. SQL> col view_name for a15  
  3. SQL> col view_definition for a80  
  4. SQL> select * from v$fixed_view_definition where view_name=’V$FIXED_TABLE’;  
  5. VIEW_NAME VIEW_DEFINITION   

The above content is a description of the dynamic view of Oracle, hoping to help you in this regard.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.