First, Oracle's dictionary and Dynamic Data dictionary views can basically be divided into three levels.
1.x$ table
This section of the table is the basis for the operation of the Oracle database, which is dynamically created by the Oracle application when the database is started.
2.gv$ and v$ views
Starting with Oracle8, the gv$ view is introduced, which means global v$.
In addition to some exceptions, each v$ view has a corresponding gv$ view.
The gv$ view is generated to meet the needs of the OPS environment, where the query gv$ view returns all instance information, and each v$ view is based on the gv$ view, adding inst_id column creation, containing only the current connection instance information.
Note that each v$ view contains a similar statement:
where inst_id = USERENV (' Instance ')
Used to restrict the return of the current instance information.
We start with gv$fixed_table and v$fixed_table.
Sql> Select View_definition from v_$fixed_view_definition where view_name= ' v$fixed_table ';
View_definition
-------------------------------------------------------------------------------------- ----------------
Select NAME, object_id, TYPE, table_num from gv$fixed_table where inst_id = USERENV (' Instance ')
Here we see v$fixed_table based on gv$fixed_table creation.
Sql> Select View_definition from v_$fixed_view_definition where view_name= ' gv$fixed_table ';
View_definition
-------------------------------------------------------------------------------------- ------------------
Select Inst_id,kqftanam, Kqftaobj, ' TABLE ', indx from X$kqfta
UNION ALL
Select Inst_id,kqfvinam, Kqfviobj, ' VIEW ', 65537 from X$KQFVI
UNION ALL
Select Inst_id,kqfdtnam, Kqfdtobj, ' TABLE ', 65537 from X$KQFDT
So we found the Gv$fixed_table view creation statement, which is based on the x$ table.
3.gv_$,v_$ View and v$,gv$ synonyms
These views are created by Catalog.sql.
When Catalog.sql is running:
Create or Replace view v_$fixed_table as SELECT * from V$fixed_table;
Create or replace public synonym v$fixed_table for v_$fixed_table;
Create or Replace view gv_$fixed_table as SELECT * from Gv$fixed_table;
Create or replace public synonym gv$fixed_table for gv_$fixed_table;