zoukankan      html  css  js  c++  java
  • oracle授权用户访问指定视图

    oracle 授权用户访问指定视图

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    --创建用户 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;
  • 相关阅读:
    string 流
    文件输入和输出
    IO类
    算法
    MySQL常用处理方法
    linux curl工具
    设计模式
    C语言编程流程
    js escape 与php escape
    js undefined易错分析
  • 原文地址:https://www.cnblogs.com/--cainiao/p/13433277.html
Copyright © 2011-2022 走看看