Oracle 建立使用者,並賦於唯讀某幾張表的許可權

2021-10-01 14:10:47 字數 732 閱讀 6021

#建立唯讀使用者

create user kms identified by "123123";

grant connect to kms;

#給使用者賦予許可權

grant select on a.table1 to kms;

grant select on a.table2 to kms;

grant select on a.table3 to kms;

#建立同義詞  (注意:如果不建立同義詞,那麼kms使用者查詢表時,必須使用a.table這類的寫法,不能直接用table.)

grant create synonym to kms;

create or replace synonym kms.table1 for a.table1;

create or replace synonym kms.table2 for a.table2;

create or replace synonym kms.table3 for a.table3;

更多

#檢視所有使用者的物件許可權

select * from dba_tab_privs where grantee='kms';

Oracle建立使用者,並賦於唯讀某幾張表的許可權

進入資料庫 su oracle sqlplus as sysdba 建立唯讀使用者 create user kms identified by 123 456 grant connect to kms 給表賦予許可權 grant select on tts.bs productline to kms...

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...