How do users use data dictionary

xiaoxiao2021-03-06  96

Oracle's Data Dictionary is one of the important components of the database, which is generated as the database is generated, and as the database changes, it reflects some tables and views under SYS users. The data dictionary name is a capital character. There are user information in the data dictionary, the user's permission information, all data object information, table constraints, and views of the statistical analysis database. We cannot manually modify the information in the data dictionary. Many times, a general Oracle user does not know how to effectively use it. Dictionary all data dictionary table name and interpretation, there is a synonym Dict Dict_Column all data dictionary table field name and explanation If we want to query the data dictionary related to the index, you can use the following SQL statement: SQL> Select * from FROM Dictionary WHERE INSTR (Comments, 'Index')> 0; if we want to know the detailed meaning of the user_indexes table, you can use the following SQL statement: SQL> SELECT Column_name, Comments from Dict_Columns where Table_Name = 'user_indexes'; Such push, you can easily know the detailed names and explanations of the data dictionary, and don't look at Oracle's other documentation. Below, some Oracle User's Common Data Dictionary is listed below by category.

First, the user checks the current user's default table space SQL> Select username, default_tablespace from user_users; see the current user's role SQL> Select * from user_role_privs; check the current user's system permission and table-level permissions SQL> Select * from user_sys_privs; sql > Select * from user_tab_privs; 2, table View users all table sql> select * from user_tables; view name containing log characters SQL> SELECT OBJECT_NAME, OBJECT_ID from user_Objects where INSTR (Object_name, 'log')> 0; view Create time sql> select Object_name, create from user_objects where object_name = Upper ('& Table_name'); View Size SQL> SELECT SUM (Bytes) / (1024 * 1024) AS "SIZE (M)" from User_SEGments WHERE segment_name = Upper ('& Table_name'); View Table SQL> SELECT TABLE_NAME, Cache from User_Tables Where INSTR (Cache, 'Y')> 0; 3, index View Index and Category SQL > select index_name, index_type, table_name from user_indexes order by table_name; See index being indexed SQL> select * from user_ind_columns where index_name = upper ( '& index_name'); See index size SQL> select sum (bytes) / (1024 * 1024) AS "S ize (M) "from user_segments where segment_name = upper ( '& index_name'); four, SEQ ID NO see the serial number, LAST_NUMBER is the current value SQL> select * from user_sequences; V. view to see the name SQL view of> select view_name from user_views; See creating the view select statement SQL> set view_name, text_length from user_views; SQL> set long 2000; Description: to set set long size SQL according text_length value View> select text from user_views where view_name = upper ( '& view_name') ; Sixth, synonyms View synonyms SQL> Select * from user_synonyms; seven, constraint conditions View a table of constraints SQL>

转载请注明原文地址:https://www.9cbs.com/read-123691.html

New Post(0)