1. 程式人生 > >oracle grant總結

oracle grant總結

所有權 exec nbsp 插入 session rac -- 存儲過程 upd

1.select * from dba_users; --查詢數據庫中的所有用戶

2.GRANT SELECT ON tableName to userName;--授權查詢(將表tableName的查詢權授給userName)
GRANT INSERT ON tableName to userName;--授權插入(將表tableName的插入權授給userName)
GRANT UPDATE ON tableName to userName;--授權更新(將表tableName的更新權授給userName)

GRANT UPDATE ON table1 to userName with grant option; --授權更新權限轉移給用戶,該用戶可以繼續授權;

GRANT EXECUTE ON procedure1 to userName;--授權存儲過程

3.revoke select on table1 from user1; --收回查詢表的權限;

 revoke all on table1 from user1;--收回表table1的所有權限;

4.select table_name,privilege from dba_tab_privs where grantee=‘xujin‘ ;--查詢一個用戶擁有的對象權限

 select * from dba_sys_privs where grantee=‘xujin‘ ;--查詢一個用戶擁有的系統權限

 select * from session_privs ;--a當前會話有效的系統權限

oracle grant總結