Oracle 对象批量进行授权

环境:oracle

  • 给用户多表只读权限
select 'grant select on '||owner||'.'||object_name||'' to 用户名;' from dba_objects where owner in (‘owner’)  and object_type='TABLE';
  • 批量创建多个同义词
SELECT 'create or replace SYNONYM 用户名.'||object_name||' FOR '||owner||'.'||object_name||';'
from dba_objects
where owner in (‘owner’) and object_type=TABLE’;

 

posted @ 2023-05-11 15:52  wazz_s  阅读(190)  评论(0编辑  收藏  举报