How do users use data dictionary
2002-03 Yu Maple Oracle's Data Dictionary is one of the important components of the database. As the database is generated, with the change of the database, it is reflected in 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 "size (m)" from user_segments where segment_name = Upper ('& index_name'); four, serial number View serial number, Last_Number is the current value SQL> SELECT * FROM user_ Sequences; 5, View View View Name SQL> Select View_name from user_views; View Create View SQL> Set View_name, text_length from user_views; sql> set long 2000; Description: You can set SET Long according to the text_length value of the view. size SQL> select text from user_views where view_name = upper ( '& view_name'); six, synonyms view synonym name SQL> select * from user_synonyms; VII constraints Check constraints SQL a table> select constraint_name, constraint_type, search_condition, R_Constraint_name from user_constraints where table_name = Upper ('& Table_name'); SQL>