Oracle view users, user permissions, user tablespaces, user default tablespaces 1. view the relationship between users and default tablespaces. Select username, default_tablespace from dba_users; 2. view the table of the current user: select table_name from user_tables; 3. view the table names of all users: select table_name from all_tables; 4. view All table names (including system tables) select table_name from all_tables; 5. view All Tables: select * from tab/dba_tables/dba_objects/cat. The following describes how to query user tablespaces in Oracle. ◆ query user tablespaces in Oracle: select * from user_all_tables ◆ Oracle queries all functions and stored procedures: select * from user_source ◆ Oracle queries all users: select * from all_user S. select * from dba_users ◆ Oracle view current user connection: select * from v $ Session ◆ Oracle view current user permission: select * from session_privs ◆ Oracle view User tablespace usage: 1. select. file_id "FileNo",. tablespace_name "Tablespace_name",. bytes "Bytes",. bytes-sum (nvl (B. bytes, 0) "Used", sum (nvl (B. bytes, 0) "Free", sum (nvl (B. bytes, 0)/. bytes * 100 "% free" from dba_data_files a, dba_free_space B where. file_id = B. file_id (+) group by. tabl Espace_name,. file_id,. bytes order by. tablespace_name; 1. view All users: select * from dba_user; select * from all_users; select * from user_users; 2. view user system permissions: select * from dba_sys_privs; select * from all_sys_privs; select * from user_sys_privs; 3. view user object permissions: select * from dba_tab_privs; select * from all_tab_privs; select * from user_tab_privs; 4. view All roles: select * from dba_roles; 5. view roles owned by a user: select * From dba_role_privs; select * from user_role_privs; 6. view the permissions of a role: select * from role_sys_privs; select * from role_tab_privs; 7. view All system permissions select * from system_privilege_map; 8. view All object permissions select * from table_privilege_map; the preceding statements show user permissions in Oracle, and select * from syscat in DB2. dbauth or get authorizations to view sid select * from v $ instance <! -- [If gte mso 9]> <xml> <w: WordDocument> <w: View> Normal </w: View> <w: Zoom> 0 </w: zoom> <w: PunctuationKerning/> <w: DrawingGridVerticalSpacing> 7.8 </w: DrawingGridVerticalSpacing> <w: DisplayHorizontalDrawingGridEvery> 0 </w: Drawing> <w: displayVerticalDrawingGridEvery> 2 </w: DisplayVerticalDrawingGridEvery> <w: ValidateAgainstSchemas/> <w: SaveIfXMLInvalid> false </w: SaveIfXMLInvalid> </w: W: IgnoreMixedContent> false </w: IgnoreMixedContent> <w: AlwaysShowPlaceholderText> false </w: Drawing> <w: Compatibility> <w: SpaceForUL/> <w: drawing/> <w: DoNotLeaveBackslashAlone/> <w: ULTrailSpace/> <w: DoNotExpandShiftReturn/> <w: AdjustLineHeightInTable/> <w: BreakWrappedTables/> <w: snapToGridInCell/> <w: WrapTextWithPunct/> <w: UseAsianBreakRules/> <w: DontGrowAuto Fit/> <w: UseFELayout/> </w: Compatibility> <w: BrowserLevel> MicrosoftInternetExplorer4 </w: BrowserLevel> </w: WordDocument> </xml> <! [Endif] --> <! -- [If gte mso 9]> <xml> <w: LatentStyles DefLockedState = "false" LatentStyleCount = "156"> </w: LatentStyles> </xml> <! [Endif] --> <! --/* Font Definitions */@ font-face {font-family:; panose-1: 2 1 6 0 3 1 1 1 1 1; mso-font-alt: SimSun; mso-font-charset: 134; mso-generic-font-family: auto; mso-font-pitch: variable; mso-font-signature: 3 135135232 16 0 262145 0 ;} @ font-face {font-family: "\ @ face"; panose-1: 2 1 6 0 3 1 1 1 1 1; mso-font-charset: 134; mso-generic-font-family: auto; mso-font-pitch: variable; mso-font-signature: 3 135135232 16 0 262145 0;}/* Style Definitions */p. msoNormal, li. msoNormal, div. msoNormal {mso-style-parent: ""; margin: 0 cm; margin-bottom :. 0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: none; font-size: 10.5pt; mso-bidi-font-size: 10.0pt; font-family: "Times New Roman"; mso-fareast-font-family:; mso-font-kerning: 1.0pt ;} /* Page Definitions */@ page {mso-page-border-surround-header: no; Mso-page-border-surround-footer: no;} @ page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin: 42.55pt; mso-footer-margin: 49.6pt; mso-paper-source: 0; layout-grid: 15.6pt;} div. section1 {page: Section1 ;}--> <! -- [If gte mso 10]> <style>/* Style Definitions */table. msoNormalTable {mso-style-name: regular table; mso-tstyle-rowband-size: 0; mso-tstyle-colband-size: 0; mso-style-noshow: yes; mso-style-parent: ""; mso-padding-alt: 0 cm 5.4pt 0 cm 5.4pt; mso-para-margin: 0 cm; mso-para-margin-bottom :. 0001pt; mso-pagination: widow-orphan; font-size: 10.0pt; font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; Mso-ansi-language: #0400; mso-fareast-language: #0400; mso-bidi-language: #0400 ;}</style> <! [Endif] --> Get table: select table_name from user_tables; // select table_name from all_tables for the current user table; // select table_name from dba_tables for all user tables; // including the system table select table_name from dba_tables where owner = 'username' user_tables: table_name, tablespace_name, role, and other dba_tables: ower, table_name, tablespace_name, role, and other all_tables: ower, tablespace_name, last_analyzed, and other all_objects: ower, Object_name, subobject_name, object_id, created, last_ddl_time, timestamp, status, and other table fields: select * from user_tab_columns where Table_Name = 'user table '; select * from all_tab_columns where Table_Name = 'user table'; select * from region where Table_Name = 'user table'; user_tab_columns: table_name, column_name, data_type, data_length, data_precision, data_scale, nullable, column_id and other all_tab_columns: ower, table_name, Column_name, data_type, data_length, data_precision, data_scale, nullable, column_id, etc. values: ower, table_name, column_name, data_type, data_length, data_precision, data_scale, nullable, column_id, etc: select * from user_tab_comments: table_name, table_type, comments -- corresponding to dba_tab_comments and all_tab_comments, which have more ower columns than user_tab_comments. Obtain field comments: select * from user_col_comments: table_name, column_name, comments author lilin530