Oracle Data Dictionary Documentation

Source: Internet
Author: User
Tags documentation table name

select * from dictionary;

--Data dictionary

The data dictionary is where Oracle holds information about the database tutorial, and its purpose is to describe the data.

For example, a table creator information, create time information, belong to the table space information, user access rights information.

A database data dictionary is a set of tables and view structures. They are stored in the system table space

When users encounter difficulties in manipulating data in a database, they can access the data dictionary to view detailed information.

Users can access the database data dictionary using SQL statements.

Data dictionary content includes:

1, information about all schema objects in the database, such as tables, views, clusters, and indexes.

2, how much space is allocated, how much space is currently used.

3, the default value for the column.

4, the integrity of the constraint information.

5, the name of theOracle user.

6, the user and the role are granted permissions.

7, user access or use of audit information.

8, other generated database information.

Data dictionaries in Oracle have static and dynamic points.

1, static data dictionary--> is mainly in the user access to the data dictionary will not change,

--for example, a table created by a user

2, Dynamic Data dictionary--> is dependent on the performance of database running, reflecting some intrinsic information of database operation, so it is often not invariable to access such data dictionary.

--the object currently locked

static data dictionary: This kind of data dictionary is mainly composed of tables and views

Tables in the data dictionary are not directly accessible, but you can access the views in the data dictionary.

The views in the static data dictionary are grouped into three categories, which are made up of three prefixes: user_*, all_*, and dba_*.

User_*

This view stores information about the objects that are owned by the current user. (That is, all objects in this user mode)

All_*

This attempt to store information about an object that the current user has access to. (all_* does not need to own the object, as opposed to user_*, only the permission to access the object)

Dba_*

This view stores information about all the objects in the database. (provided that the current user has permission to access these databases, you must generally have administrator rights)

-----------------------------------------------------------------------------------------------------------

select * from dictionary;

--Query What tables the user owns

--user_tables mainly describes the information of all tables owned by the current user,

----mainly include table name, table space name, cluster name and so on. This view allows you to see clearly what tables the current user can manipulate

Desc User_tables;

Select table_name from User_tables;

SELECT * from User_tables;

--Query which indexes the user owns

Select Index_name from User_indexes;

--Query What views the user has

Select View_name from User_views;

--Query What database objects the user owns, including tables, views, stored procedures, triggers, packages, indexes, sequences, Java files, and so on.

Select object_name from User_objects;

--mainly describes the current user's information, including the current user name, account ID, account status, table space name, creation time, and so on.

SELECT * from User_users;

-----------------------------------------------------------------------------------------------------------

--user_/all_ difference:

The information listed----All_ is an object that the current user can access rather than an object owned by the current user.

--Query all the tables, procedures, functions, and so on for a user.

Select owner, object_name, object_type from All_objects

-----------------------------------------------------------------------------------------------------------

--For Dba_, you need administrator privileges.

--Query the table space for information (the current user must have a DBA role).

SELECT * FROM Dba_data_files

-----------------------------------------------------------------------------------------------------------

Dynamic Data dictionary

Oracle contains a number of potential tables and views maintained by system administrators such as SYS, which are called Dynamic Data dictionaries (or dynamic performance views) because they are constantly updated when the database is running. These views provide information about memory and disk operations, so we can only read-only access to them and not modify them.

These dynamic performance views in Oracle are views that start with v$.

V$access

This view displays the database objects locked in the database and the session objects that access those objects.

SELECT * FROM V$access

V$session

This view lists the details of the current session.

V$active_instance

This view mainly describes the information for an active instance under the current database. You can still use the SELECT statement to observe this information.

V$context

This view lists the property information for the current session. such as namespaces, attribute values, and so on.

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.