Oracle创建设置查询权限用户

允我心安 提交于 2020-04-05 20:44:18

--普通用户test,需要创建查询用户(cxtest),授权test的部分表或试图查询权限
-- 使用 SYSTEM创建用户

create user cxtest
  identified by cxtest
  default tablespace USERS
  temporary tablespace TEMP
  profile DEFAULT;
grant create session to cxtest;
grant create synonym to cxtest;


---test用户赋权VJK_WBFK_CPXX、VJK_WBFK_GZB、VJK_WBFK_QMCCB给cxtest

grant select on VJK_WBFK_CPXX to cxtest;
grant select on VJK_WBFK_GZB to cxtest;
grant select on VJK_WBFK_QMCCB to cxtest;


--cxtest用户建同义词

create synonym VJK_WBFK_CPXX for  test.VJK_WBFK_CPXX;
create synonym VJK_WBFK_GZB for test.VJK_WBFK_GZB;
create synonym VJK_WBFK_QMCCB for  test.VJK_WBFK_QMCCB;

---cxtest用户下查询测试

select * From VJK_WBFK_CPXX;
select * From VJK_WBFK_GZB;
select * From VJK_WBFK_QMCCB;

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!