select * from dictionary;

 

-- data dictionary

The data dictionary is Oracle A place to store information about a database , Its purpose is to describe data .

    For example, the creator information of a table , Create time information , Table space information , User access rights information, etc .

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

 

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

    Users can use SQL Statement to access database data dictionary .

 

The contents of the data dictionary include :

  1, Information about all schema objects in the database , As shown in the table , view , cluster , And index, etc .

  2, How much space is allocated , How much space is currently used, etc .

  3, The default value of the column .

  4, The integrity of constraint information .

  5,Oracle User's name .

  6, Permissions granted to users and roles .

  7, Audit information accessed or used by users .

  8, Other generated database information .

 

Oracle There are static and dynamic data dictionaries in .

    1, Static data dictionary --> It is mainly that it will not change when users access the data dictionary ,

    -- For example, a table created by a user

    2, Dynamic data dictionary --> It depends on the performance of the database , Reflect some internal information of database operation , Therefore, the access to this kind of data dictionary is not always the same .

    -- Objects currently locked

 

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

Tables in the data dictionary cannot be accessed directly , But you can access views in the data dictionary .

There are three types of views in the static data dictionary , They are made up of three prefixes :user_*, all_*, dba_*.

 

  user_*

   This view stores information about the objects owned by the current user .( All objects in the user mode )

 

  all_*

   The attempt stores information about objects that the current user can access .( And user_* comparison ,all_* You don't need to own the object , You only need to have access to the object )

 

  dba_*

   This view stores information about all objects in the database .( The premise is that the current user has access to these databases , Generally speaking, you must have administrator rights )

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

 

select * from dictionary;

 

-- Query which tables the user owns

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

---- It mainly includes table name , Table space name , Cluster name, etc . This view gives you a clear idea of the tables that the current user can manipulate

desc user_tables;

select table_name from user_tables;

select * from user_tables;

 

-- Query which indexes the user has

select index_name from user_indexes;

 

-- Query which views the user has

select view_name from user_views;

 

-- Query which database objects the user owns , Objects include tables , view , stored procedure , trigger , package , Indexes , sequence ,JAVA Documents, etc .

select object_name from user_objects;

 

-- It mainly describes the current user information , It mainly includes the current user name , account id, Account status , Table space name , Creation time, etc .

select * from user_users;

 

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

--user_/all_ difference :

----all_ The information listed is the object that the current user can access, not the object owned by the current user .

 

-- Query all tables under a user , process , Function and other information .

select owner , object_name ,object_type from all_objects

 

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

-- about dba_ Administrator permission is required at the beginning ,

 

-- Query table space information ( The current user must have DBA role ).

select * from dba_data_files

 

 

 

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

 

Dynamic data dictionary

  Oracle Contains some potential system administrators such as SYS Maintained tables and views , Because they are constantly updated when the database is running , So they are called dynamic data dictionaries ( Or dynamic performance view ). These views provide information about memory and disk operation , So we can only access them read-only, not modify them .

  Oracle These dynamic performance views in v$ View at the beginning .

 

  v$access

   This view shows the database objects locked in the database and the session objects that access them (session object ).

    select * from v$access

 

  v$session

   This view lists the details of the current session .

 

v$active_instance

   This view mainly describes the information of the active instance under the current database . It can still be used select Statement to observe the information .

 

  v$context

   This view lists the property information for the current session . For example, a namespace , Attribute values, etc .

 

Technology
©2019-2020 Toolsou All rights reserved,
Python Garbage collection and memory leak hive Summary of processing methods for a large number of small files The difference between memory overflow and memory leak , Causes and Solutions Create data mysql Library process You don't know ——HarmonyOS stay Vue Use in Web WorkerSparkSQL Achieve partition overlay write msf Generate Trojan horse attack android mobile phone Linux Page replacement algorithm C Language implementation Django Personal blog building tutorial --- Time classified archiving