標籤:
查看使用者和預設資料表空間的關係
select username,default_tablespace from dba_users;
--查看目前使用者能訪問的表
select * from user_tables;
--Oracle查詢使用者表
select * from user_all_tables;
--Oracle查詢使用者視圖
select * from user_views;
--查詢所有函數和儲存過程:
select * from user_source;
--查詢所有使用者:
select * from all_users;
--select * from dba_users
--查看目前使用者串連:
select * from v$Session;
--查看使用者角色
SELECT * FROM USER_ROLE_PRIVS;
--查看目前使用者許可權:
select * from session_privs;
--查看所有使用者所擁有的角色
SELECT * FROM DBA_ROLE_PRIVS;
--查看所有角色
select * from dba_roles;
--查看資料庫名
SELECT NAME FROM V$DATABASE;
--查看所有資料表空間使用方式
select a.file_id "FileNo",
a.tablespace_name "Tablespace_name",
a.bytes "Bytes",
a.bytes - sum(nvl(b.bytes, 0)) "Used",
sum(nvl(b.bytes, 0)) "Free",
sum(nvl(b.bytes, 0)) / a.bytes * 100 "%free"
from dba_data_files a, dba_free_space b
where a.file_id = b.file_id(+)
group by a.tablespace_name, a.file_id, a.bytes
order by a.tablespace_name;
oracle查看目前使用者許可權