#创建只读用户
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';