当前位置:网站首页>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';边栏推荐
- Construction and maintenance of business websites [13]
- [C #] use regular verification content
- OpenCASCADE7.6编译
- 【OpenCV】-5种图像滤波的综合示例
- How does MySQL solve the problem of not releasing space after deleting a large amount of data
- Automatically browse pinduoduo products
- This is the report that leaders like! Learn dynamic visual charts, promotion and salary increase are indispensable
- Golang lock
- Open that kind of construction document
- 跨域?同源?一次搞懂什么是跨域
猜你喜欢

How to use redis ordered collection

SQLite 3 of embedded database

Data analysis on the disaster of Titanic

How to solve MySQL master-slave delay problem
![[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

5g/4g pole gateway_ Smart pole gateway

leetcode2310. 个位数字为 K 的整数之和(中等,周赛)

MySQL constraints and multi table query example analysis

Design and implementation of key value storage engine based on LSM tree

MySQL约束与多表查询实例分析
随机推荐
leetcode373. 查找和最小的 K 对数字(中等)
Implementation principle of city selector component
附加:信息脱敏;
Construction and maintenance of business websites [12]
C language 3-7 daffodils (enhanced version)
D discard the virtual recovery method
Medical management system (C language course for freshmen)
研发中台拆分过程的一些心得总结
How to debug apps remotely and online?
Based on configured schedule, the given trigger will never fire
Five skills of adding audio codec to embedded system
1222. Password dropping (interval DP, bracket matching)
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 use a product to promote "brand thrill"?
If you want to rewind the video picture, what simple methods can you use?
Open那啥的搭建文档
2022 Q2 - résumé des compétences pour améliorer les compétences
牛客网——华为题库(51~60)
leetcode373. Find and minimum k-pair numbers (medium)
Cross domain? Homology? Understand what is cross domain at once