当前位置:网站首页>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';边栏推荐
- How to solve MySQL master-slave delay problem
- Niuke - Huawei question bank (51~60)
- 【毕业季】研究生学长分享怎样让本科更有意义
- 大学的知识是否学而无用、过时?
- 医药管理系统(大一下C语言课设)
- MySQL约束与多表查询实例分析
- Failed to transform file 'xxx' to match attributes
- Redis环境搭建和使用的方法
- The concept, function, characteristics, creation and deletion of MySQL constraints
- Sword finger offer II 031 Least recently used cache
猜你喜欢

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

mysql列转行函数指的是什么

医药管理系统(大一下C语言课设)

1222. Password dropping (interval DP, bracket matching)

Number of palindromes in C language (leetcode)

How to execute an SQL in MySQL

Ar Augmented Reality applicable scenarios

How to use redis ordered collection

Five skills of adding audio codec to embedded system

如何用一款产品推动「品牌的惊险一跃」?
随机推荐
Failed to transform file 'xxx' to match attributes
【OpenCV】-5种图像滤波的综合示例
MySQL主从延迟问题怎么解决
Sword finger offer II 031 Least recently used cache
"C language programming", 4th Edition, edited by he Qinming and Yan Hui, after class exercise answers Chapter 3 branch structure Exercise 3
A quick understanding of digital electricity
Webgpu (I): basic concepts
RTL8189FS如何关闭Debug信息
剑指 Offer 29. 顺时针打印矩阵
Construction and maintenance of business websites [14]
leetcode2309. 兼具大小写的最好英文字母(简单,周赛)
Opengauss database backup and recovery guide
如何远程、在线调试app?
Exception handling of class C in yyds dry goods inventory
leetcode2311. Longest binary subsequence less than or equal to K (medium, weekly)
[question] - why is optical flow not good for static scenes
np.where 和 torch.where 用法
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
C language 3-7 daffodils (enhanced version)
np. Where and torch Where usage