Data Dictionary
To see all the data dictionary views to which you have access
Section titled “To see all the data dictionary views to which you have access”select * from dictText source of the stored objects
Section titled “Text source of the stored objects”USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the OWNER column.
select * from user_source where type='TRIGGER' and lower(text) like '%order%'ALL_SOURCE describes the text source of the stored objects accessible to the current user.
select * from all_source where owner=:ownerDBA_SOURCE describes the text source of all stored objects in the database.
select * from dba_sourceGet list of all tables in Oracle
Section titled “Get list of all tables in Oracle”select owner, table_namefrom all_tablesALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. COLS is a synonym for USER_TAB_COLUMNS.
select *from all_tab_columnswhere table_name = :tnamePrivilege information
Section titled “Privilege information”All roles granted to user.
select *from dba_role_privswhere grantee= :usernamePrivileges granted to user:
- system privileges
select *from dba_sys_privswhere grantee = :username- object grants
select *from dba_tab_privswhere grantee = :usernamePermissions granted to roles.
Roles granted to other roles.
select *from role_role_privswhere role in (select granted_role from dba_role_privs where grantee= :username)- system privileges
select *from role_sys_privswhere role in (select granted_role from dba_role_privs where grantee= :username)- object grants
select *from role_tab_privswhere role in (select granted_role from dba_role_privs where grantee= :username)Oracle version
Section titled “Oracle version”select *from v$versionDescribes all objects in the database.
Section titled “Describes all objects in the database.”select *from dba_objectsRemarks
Section titled “Remarks”The data dictionary views, also known as catalog views, let you monitor the state of the database in real time:
The views prefixed with USER_, ALL_, and DBA_, show information about schema objects that are owned by you (USER_), accessible by you (ALL_) or accessible by a user with SYSDBA privilege (DBA_). For example, the view ALL_TABLES shows all tables that you have privileges on.
The V$ views show performance-related information.
The _PRIVS views show privilege information for different combinations of users, roles, and objects.