oracle grant 授權語句

2021-06-28 01:10:48 字數 1796 閱讀 6474

--select * from dba_users; 查詢資料庫中的所有使用者

--alter user test_select account lock; 鎖住使用者

--alter user test_select account unlock; 給使用者解鎖

--create user xujin identified by   xujin; 建立使用者

--grant create tablespace to xujin; 授權

--grant select on tabel1 to xujin; 授權查詢

--grant update on table1 to xujin;

--grant execute on procedure1 to xujin 授權儲存過程

--grant update on table1 to xujin with grant option; 授權更新許可權轉移給xujin使用者,許進使用者可以繼續授權;

--收回許可權

--revoke select on table1 from xujin1; 收回查詢select表的許可權;

--revoke all on table1 from xujin;

/*grant connect to xujin;

revoke connect from xujin

grant select on xezf.cfg_alarm to xujin;

revoke select on xezf.cfg_alarm from xujin;*/

--select table_name,privilege from dba_tab_privs where grantee='xujin' 查詢乙個使用者擁有的物件許可權

--select * from dba_sys_privs where grantee='xujin' 查詢乙個使用者擁有的系統許可權

--select * from session_privs --當錢會話有效的系統許可權

--角色

--create role xujin1;--建立xujin1角色

--grant insert on xezf.cfg_alarm to xujin1; 將插入表的資訊

--revoke insert on xezf.cfg_alarm from xujin1; 收回xujin1角色的許可權

--grant xujin1 to xujin ; 將角色的許可權授權給xujin;

-- create role xujin2;

--grant xujin1 to xujin2; 將角色xujin1授權給xujin2;

--alter user xujin default xujin1,xujin2; 修改使用者預設角色

-- drop role xujin1;刪除角色1;

--select * from role_sys_privs where role=xujin1;

--檢視許進1角色下有什麼系統許可權;

--select granted_role,admin_option from role_role_privs where role='xujin2';

--檢視xujin1角色下面有什麼角色許可權

--select * from role_sys_privs where role='xujin2';

--select table_name,privilege from role_tab_privs where role='xujin1';

--select * from dba_role_privs where grantee='xujin' --檢視使用者下面有多少個角色;

oracle grant 授權語句

select from dba users 查詢資料庫中的所有使用者 alter user test select account lock 鎖住使用者 alter user test select account unlock 給使用者解鎖 create user xujin identified...

oracle grant 授權語句

select from dba users 查詢資料庫中的所有使用者 alter user test select account lock 鎖住使用者 alter user test select account unlock 給使用者解鎖 create user xujin identified...

Oracle grant使用者授權

獲得物件授權的使用者可以訪問資料庫物件及其內容。提示當使用者獲得處理其他使用者表的許可權後,在他能夠在sql語句中引用其他使用者的表之前,必須有這些表的公用或私用同義詞,oracle可通過它們識別出這些表。假設jrstocks擁有稱為sample b的表,並允許所有資料庫使用者訪問sample b。...