Oracle授予普通用户dblink创建、删除权限
1、sys用户登录查询sys的权限和普通权限。
sys用户权限
SQL> select * from user_sys_privs where privilege like upper('%DATABASE LINK%');
普通用户权限
SQL> select * from user_sys_privs where privilege like upper('%DATABASE LINK%') AND USERNAME='SJZXHD';
no rows selected
SQL>
2、授予普通用户创建和删除权限
SQL> grant create public database link,drop public database link to SJZXHD;
Grant succeeded.
SQL> commit;
3、查询授权后的信息
3.1 在sys下查询
SQL> select * from dba_sys_privs where privilege like upper('%DATABASE LINK%') AND GRANTEE ='SJZXHD';
GRANTEE PRIVILEGE ADM COM INH
-------------- -------------------------- --- --- ---
SJZXHD DROP PUBLIC DATABASE LINK NO NO NO
SJZXHD CREATE PUBLIC DATABASE LINK NO NO NO
SQL>
或者登录普通用户下查询
SQL> select * from user_sys_privs where privilege like upper('%DATABASE LINK%') AND USERNAME='SJZXHD';
本文来自博客园,作者:花之旭,转载请注明原文链接:https://www.cnblogs.com/huazhixu/p/17104542.html