当前位置:网站首页>Oracle management - tablespace permission control
Oracle management - tablespace permission control
2022-04-21 20:51:00 【qq_ thirty-four million nine hundred and eighty-nine thousand e】
One 、 to grant authorization
When building users, you can usually choose one default tablespace, However, the user cannot write data to the tablespace without authorization , Authorization is needed . Authorization includes global authorization and approval quota Limit two situations (quota Quotas can prevent a user from using too much space in a table space )
1. Grant permission to a user's global tablespace ( Grant... Separately by command )
grant unlimited tablespace to username;
2. Grant permission to a user's global tablespace ( Grant... By role )
When granted by role, it is usually granted resource role .
Be careful : although resource The character doesn't bring unlimited tablespace Authority , But when granting this role to users ,unlimited tablespace The permission will be brought automatically
1) see resource The permissions under the role , No, unlimited tablespace jurisdiction
SQL> SELECT * from Dba_Sys_Privs s WHERE s.grantee='RESOURCE';
GRANTEE PRIVILEGE ADMIN_
------------------------------------------------------------ -------------------------------------------------------------------------------- ------
RESOURCE CREATE TRIGGER NO
RESOURCE CREATE SEQUENCE NO
RESOURCE CREATE TYPE NO
RESOURCE CREATE PROCEDURE NO
RESOURCE CREATE CLUSTER NO
RESOURCE CREATE OPERATOR NO
RESOURCE CREATE INDEXTYPE NO
RESOURCE CREATE TABLE NO
2) hold resource The role grants the user
SQL> grant resource to username;
Grant succeeded.
3) View the permissions the user has , You can find yourself with unlimited tablespace( In addition, you can go to see dba_ts_quotas, Such authorized users are not reflected )
SQL> SELECT * from Dba_Sys_Privs s WHERE s.grantee='USERNAME' ;
GRANTEE PRIVILEGE ADMIN_OPTION
------------------------------------------------------------ -------------------------------------------------------------------------------- ------
USERNAME UNLIMITED TABLESPACE NO
USERNAME CREATE TABLESPACE NO
USERNAME CREATE SESSION NO
3. Grant a user permission to an individual tablespace
1) Grant a user full access to a tablespace
ALTER USER username QUOTA UNLIMITED ON rcat
--- Special , After granting permission, view dba_ts_quotas surface :
SQL> SELECT * from Dba_Ts_Quotas z WHERE z.username='USERNAME';
TABLESPACE_NAME USERNAME BYTES MAX_BYTES BLOCKS MAX_BLOCKS DROPPE
------------------------------------------------------------ ------------------------------------------------------------ ---------- ---------- ---------- ---------- ------
RCAT USERNAME 524288 -1 64 -1 NO
here max_bytes by -1, That is, unlimited .
2) Grant a user limited access to a tablespace
ALTER USER username QUOTA 1M ON rcat;
SQL> SELECT * from Dba_Ts_Quotas z WHERE z.username='USERNAME';
TABLESPACE_NAME USERNAME BYTES MAX_BYTES BLOCKS MAX_BLOCKS DROPPE
------------------------------------------------------------ ------------------------------------------------------------ ---------- ---------- ---------- ---------- ------
RCAT USERNAME 524288 1048576 64 128 NO
--- You can see MAX_BYTES yes 1MB
Two 、 Recycling permissions
1. overall situation
revoke unlimited tablespace from username;
2. Individual tablespaces
ALTER USER username QUOTA 0 ON rcat
版权声明
本文为[qq_ thirty-four million nine hundred and eighty-nine thousand e]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204212043215905.html
边栏推荐
- < 2021SC@SDUSC > Introduction to the jpress group on software engineering application and practice of Shandong University
- Go语言自学系列 | golang指针
- [high concurrency] analysis of thread pool and ThreadPoolExecutor class
- 如何正确有效的进行滑环的安装
- gstreamer学习
- RTMP(3):Protocol Control Message
- 【Daily LeetCoding Challenge14】 K 个一组翻转链表
- < 2021SC@SDUSC > Application and practice of software engineering in Shandong University jpress code analysis (I)
- 4、MySQL Workbench创建访问用户
- Live555学习
猜你喜欢

神经网络 || 注意力机制的Pytorch代码实现

6、Qt使用MySQL例子

《动手学机器人学》7.4机器人运动学介绍|机械臂运动学|两轮差速底盘运动学|轮式里程计

PR视频添加字幕

《ROS2机器人建模URDF》8.4控制移动机器人轮子运动

深度剖析TCP三次握手,面试官拍案叫绝
![[azure application service] after azure function enables managed identity, error appears in PowerShell function: managedidentitycredential authentication failed](/img/81/adf80795cc22a887be2075ab3da0ef.png)
[azure application service] after azure function enables managed identity, error appears in PowerShell function: managedidentitycredential authentication failed

1、MySQL Workbench 8.0安装

What is the most important aspect of slip ring wiring

UAV assembly and debugging tutorial
随机推荐
25.<tag-数组和模拟>-lt- 31.下一个排列 + lt- 556. 下一个更大元素 III
Circular linked list of single and double linked lists (XV)
《动手学机器人学》7.2.3姿态的多种表示,四元数,欧拉角旋转矩阵、轴角ROS2
神经网络 || 注意力机制的Pytorch代码实现
滑环接线最主要的看什么
10分钟快速入门RDS
Get application instance through reflection
Release announcement of HMS core version 6.4.0
[azure application service] after azure function enables managed identity, error appears in PowerShell function: managedidentitycredential authentication failed
异常处理器
Go语言自学系列 | golang defer语句
Trackup | six unique benefits of using project management
2022年电工(初级)考试模拟100题及模拟考试
88%工业人都不知,小程序这7点,能让营收暴增,粗暴有效!强烈建议收藏,反复读!
TGIP-CN 038 报名|深度解析 Apache Pulsar 源码阅读正确姿势(一)
终于有人讲明白了,原来这才是全球低时延一张网技术
In depth analysis of TCP three handshakes, the interviewer applauded
Go语言自学系列 | golang init函数
Weekly report from April 11, 2022 to April 17, 2022
How to beat the king with sonic cloud machine