oracle庫中唯讀使用者需要的許可權

2021-09-01 19:27:11 字數 886 閱讀 6687

業務中要求建立乙個唯讀使用者,此使用者對其他使用者的物件有唯讀許可權,目的

是滿足開發人員的查詢需要,又要防止其誤操作。同時該使用者具有select

any dictionary許可權,所以一切系統檢視如v$session、v$sql、v$process等

也都可以檢視,也就是說,包括dba在內,如果只是查詢庫資訊,均可用此用

戶登入。

在11g r2中通過授予使用者以下許可權,達到了要求。

-- create the user

create user u1 identified by u1 default tablespace xxtbs temporary

tablespace xxtbs_temp;

-- grant/revoke role privileges

grant connect to u1;

-- grant/revoke system privileges

grant debug any procedure to u1;

grant debug connect session to u1;

grant select any dictionary to u1;

grant select any sequence to u1;

grant select any table to u1;

通過u1登入之後,只能檢視之前使用者表,不過更新或刪除

例如執行update  zsdms.jf_org_user u set u.cl_domain=1000 where

u.cl_name='tanzhongmin'

其中zsdms是另乙個使用者.,jf_org_user是zsdms的其中乙個表

會提示ora-01031:許可權不足

來自

Oracle資料庫建立唯讀使用者

建立乙個唯讀使用者user2,只能查詢管理員使用者user1下的表,不能增刪改。操作環境 pl sql developer 1 用管理員使用者user1登入,建立使用者user2 並授權 建立使用者user1,密碼123456 create user user2 identified by 1234...

Oracle資料建立唯讀使用者

記得授權完成後重新登入使用者,不然也會遇到許可權不足的一些問題 建立乙個使用者 create user test identified by 123456授予連線許可權 grant connect to test 授予只能查詢的許可權 授權所有表的唯讀許可權 grant select any tab...

Oracle建立唯讀許可權使用者

我們使用者histest下面有很多表,需建立使用者 hongshu no1.先建立乙個使用者hongshu,密碼hongshu no2.給他一些許可權,包括連線許可權,因為他要建立同義詞,還需要給他同義詞 grant connect to hongshu grant create synonym t...