call_grant_exec.sql
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')
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.
相关文章
- SQL Pretty Printer sql 格式化
- SolrCloud6.1.0之SQL查询测试
- SQL案例分析-地铁换乘线路查询.sql
- SQL案例分析-应用系统用户权限设计.sql
- 本人收藏的Sql server经典t-sql语句(备忘录,持续更新中)
- 第157章 SQL函数 WEEK
- 第四十五章 SQL函数 DATEPART
- Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
- 常用sql收录 增删改查 建表 条件查询 模糊查询 联查
- 错误解决方法:java.sql.SQLException: Unknown system variable ‘tx_isolation‘
- 《WEB安全渗透测试》(3)SQL注入实战:报错注入
- Caused by: java.sql.SQLException: Couldn't perform the operation getAutoCommit: You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see lo
- 《SQL学习指南(第2版)(修订版)》———1.4 内容前瞻
- sql语言实践之自学SQL网(SQL Lesson10,11)
- 使用PL/SQL将sql脚本数据导入数据库
- call_create_syn.sql
- SQL Server: Get table primary key and Foreign Key using sql query
- 《SQL与关系数据库理论——如何编写健壮的SQL代码》一第2章
- SQL Server 自动备份数据脚本
- SQL-用到的数据库语句总结
- sql优化-把派生表改成子查询,查询速度将变快
- MySQL数据库:SQL优化与索引优化
- SQL分组查询
- SQLite的SQL语法
- (4.61)sql server执行SQL遇到错误不中断
- 【sql server压测】sql server使用Diskspd测试SQL Server IO存储
- (4.52)解决sql server动态SQL中对表字段操作时需要频繁 ISNULL的问题
- (1.2)sql server for linux 开启代理服务(SQL AGENT),使用T-SQL新建作业
- sql server代理服务无法启动(SQL Agent):OpenSQLServerInstanceRegKey:GetRegKeyAccessMask failed (reason: 2).
- sql server存储引擎启动错误(SQL Server could not spawn FRunCM thread)
- 【sql server镜像】SQL SERVER 基于数据库镜像的主从同步(数据库镜像实践汇总)
- Oracle与Sql server 在SQL上的不同
- SQL查询--简单了解SQL(结构化查询语言)
- sql-如何提高SQL查询的效率?
- sql添加和删除链接服务器(链式服务器)的语法
- Oracle-PL/SQL编程