当前位置:网站首页>oracle创建只读权限的用户简单四步走
oracle创建只读权限的用户简单四步走
2022-07-02 02:11:00 【leowang5566】
第一步、创建用户。使用有管理员权限的用户创建一个新的用户:
create user 用户名 identified by 密码 default tablespace 表空间;
第二步、赋连接权限:
grant connect to 用户名;
第三步、赋表权限
grant select on owner.表名 to 用户名;
如果有多表,可以用selece转换批量执行语句:
select 'grant select on '||owner||'.'||object_name||' to 用户名;'
from dba_objects
where owner in ('owner')
and object_type='TABLE';
第四步、创建同义词:
create or replace SYNONYM 用户名.表名 FOR owner.表名;
如果有多表,可以用selece转换批量执行语句:
SELECT 'create or replace SYNONYM 用户名.'||object_name||' FOR '||owner||'.'||object_name||';' from dba_objects
where owner in ('owner')
and object_type='TABLE';边栏推荐
- leetcode2312. Selling wood blocks (difficult, weekly race)
- flutter 中間一個元素,最右邊一個元素
- JPM 2021 most popular paper released (with download)
- Volume compression, decompression
- [Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
- How to execute an SQL in MySQL
- how to add one row in the dataframe?
- The difference between new and malloc
- Five skills of adding audio codec to embedded system
- 【视频】马尔可夫链蒙特卡罗方法MCMC原理与R语言实现|数据分享
猜你喜欢

Architecture evolution from MVC to DDD

JMeter (II) - install the custom thread groups plug-in

What style of Bluetooth headset is easy to use? High quality Bluetooth headset ranking

The smart Park "ZhongGuanCun No.1" subverts your understanding of the park

leetcode2305. Fair distribution of biscuits (medium, weekly, shaped pressure DP)

跨域?同源?一次搞懂什么是跨域

pytest 测试框架

321. Chessboard segmentation (2D interval DP)
![[Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing](/img/ba/dcb276768b1a9cc84099f093677d29.png)
[Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing

1222. Password dropping (interval DP, bracket matching)
随机推荐
正则表达式学习笔记
5g/4g pole gateway_ Smart pole gateway
Based on configured schedule, the given trigger will never fire
pytest 测试框架
leetcode2310. 个位数字为 K 的整数之和(中等,周赛)
Webgpu (I): basic concepts
Number of palindromes in C language (leetcode)
leetcode2309. 兼具大小写的最好英文字母(简单,周赛)
leetcode2305. Fair distribution of biscuits (medium, weekly, shaped pressure DP)
剑指 Offer II 031. 最近最少使用缓存
1069. Division of convex polygons (thinking, interval DP)
What is AQS and its principle
2022 Q2 - 提昇技能的技巧總結
1218 square or round
[graduation season] graduate seniors share how to make undergraduate more meaningful
Based on configured schedule, the given trigger will never fire
The concepts and differences between MySQL stored procedures and stored functions, as well as how to create them, the role of delimiter, the viewing, modification, deletion of stored procedures and fu
How to batch add background and transition effects to videos?
Redis环境搭建和使用的方法
how to come in an investnent bank team