查看用戶下所有的表
SQL>select * from user_tables;
查看當前用戶的缺省表空間
SQL>select username
查看當前用戶的角色
SQL>select * from user_role_privs;
查看當前用戶的系統權限和表級權限
SQL>select * from user_sys_privs;
SQL>select * from user_tab_privs;
顯示當前會話所具有的權限
SQL>select * from session_privs;
顯示指定用戶所具有的系統權限
SQL>select * from dba_sys_privs where grantee=
顯示特權用戶
select * from v$pwfile_users;
顯示用戶信息(所屬表空間)
select default_tablespace
from dba_users where username=
顯示用戶的PROFILE
select profile from dba_users where username=
查看用戶下所有的表
SQL>select * from user_tables;
查看名稱包含log字符的表
SQL>select object_name
where instr(object_name
查看某表的創建時間
SQL>select object_name
查看某表的大小
SQL>select sum(bytes)/(
where segment_name=upper(
查看放在ORACLE的內存區裡的表
SQL>select table_name
查看索引個數和類別
SQL>select index_name
查看索引被索引的字段
SQL>select * from user_ind_columns where index_name=upper(
查看索引的大小
SQL>select sum(bytes)/(
where segment_name=upper(
查看序列號
SQL>select * from user_sequences;
查看視圖的名稱
SQL>select view_name from user_views;
查看創建視圖的select語句
SQL>set view_name
SQL>set long
SQL>select text from user_views where view_name=upper(
查看同義詞的名稱
SQL>select * from user_synonyms;
查看某表的約束條件
SQL>select constraint_name
from user_constraints where table_name = upper(
SQL>select nstraint_name
from user_constraints c
where c
and c
order by cc
查看函數和過程的狀態
SQL>select object_name
SQL>select object_name
查看函數和過程的源代碼
SQL>select text from all_source where owner=user and name=upper(
From:http://tw.wingwit.com/Article/program/Oracle/201311/18880.html