Oracle檢視當前使用者許可權
阿新 • • 發佈:2019-01-01
--檢視使用者和預設表空間的關係
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;