首页 > 数据库技术 > 详细

oracle 授权用户访问指定视图

时间:2016-12-04 07:03:48      阅读:348      评论:0      收藏:0      [点我收藏+]

  

--创建用户 test_user ,并授权 连接,查询视图
create user test_user identified by test_user;
grant connect to test_user;
grant create view to test_user;

--授权视图引用的表权限给新用户
grant select on other_user.table1 to test_user with grant option;
grant select on other_user.table2 to test_user with grant option;
grant select on other_user.table3 to test_user with grant option;

-- 使用新用户 test_user 创建相关视图
create or replace view v_1 as
select a.*,b.*,c.* from  other_user.table1 a
join other_user.table2 b on a.id=b.fid
join other_user.table3 c on b.fid=c.xid

-- 移出新用户创建视图的权限
revoke create view from test_user;

 

绕了很多弯路,记录一下

oracle 授权用户访问指定视图

原文:http://www.cnblogs.com/Jscriptman/p/6130028.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!