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:
- [Oracle@3857 admin]$ sqlplus sys/sys@archdw as sysdba
- SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 14 11:27:20 2009
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- SQL> desc v$fixed_table;
- Name Null? Type
- —————————————– ——– —————————-
- NAME VARCHAR2(30)
- OBJECT_ID NUMBER
- TYPE VARCHAR2(5)
- TABLE_NUM NUMBER
- SQL> select * from v$fixed_table
- NAME OBJECT_ID TYPE TABLE_NUM
- —————————— ———- —– ———-
- X$KQFTA 4294950912 TABLE 0
- X$KQFVI 4294950913 TABLE 1
- GV$PROCESS 4294951256 VIEW 65537
- V$PROCESS 4294950917 VIEW 65537
- GV$BGPROCESS 4294951257 VIEW 65537
- ………………………………………
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 ):
- SQL> set linesize 100
- SQL> col view_name for a15
- SQL> col view_definition for a80
- SQL> select * from v$fixed_view_definition where view_name=’V$FIXED_TABLE’;
- VIEW_NAME VIEW_DEFINITION
The above content is a description of the dynamic view of Oracle, hoping to help you in this regard.