Oracle's Data dictionary

Source: Internet
Author: User
Tags oracle database

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;

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.