gen_grant_exec.sql ﹏ヽ暗。殇╰゛Y 2021-12-20 01:27 212阅读 0赞 set echo off feedback off verify off pagesize 0 linesize 120 define v\_grantee = &1 define v\_grant\_exec\_command\_file = .\\log\\grant\_exec\_&v\_grantee..sql define v\_grant\_exec\_log\_file = .\\log\\grant\_exec\_&v\_grantee..log spool &v\_grant\_exec\_command\_file. prompt spool &v\_grant\_exec\_log\_file. prompt set echo on feedback on prompt show user select 'grant execute on ' || o.object\_name || ' to &v\_grantee;' from user\_objects o where object\_type in ('PACKAGE','FUNCTION','PROCEDURE') and not exists (select null from user\_tab\_privs p where p.owner = user and p.table\_name = o.object\_name and p.grantee = upper('&v\_grantee')) and user != upper('&v\_grantee') order by o.object\_name / prompt set echo off feedback off prompt spool off spool off @&v\_grant\_exec\_command\_file. 转载于:https://www.cnblogs.com/feiyun8616/p/5897021.html
还没有评论,来说两句吧...