当前位置:网站首页>Oracle withdraw permission & create role
Oracle withdraw permission & create role
2022-07-03 11:19:00 【Drunken Xiaobai】
0、 Take back authority
SELECT 'REVOKE '||PRIVILEGE||' FROM BAIPX;' FROM dba_sys_privs WHERE GRANTEE='BAIPX';
1、 Take back dba jurisdiction
revoke dba from BAIPX;
2、 Create roles and authorize related permissions
create role BAIPX_ROLE;
grant select on v_$sysstat to BAIPX_ROLE;
grant delete any table to BAIPX_ROLE;
grant insert any table to BAIPX_ROLE;
grant select any table to BAIPX_ROLE;
grant unlimited tablespace to BAIPX_ROLE;
grant execute any procedure to BAIPX_ROLE;
grant update any table to BAIPX_ROLE;
grant SELECT ANY TABLE to BAIPX_ROLE;
grant CREATE VIEW to BAIPX_ROLE;
grant ALTER SESSION to BAIPX_ROLE;
grant DROP PUBLIC SYNONYM to BAIPX_ROLE;
grant CREATE DATABASE LINK to BAIPX_ROLE;
grant CREATE ANY DIRECTORY to BAIPX_ROLE;
grant SELECT ANY DICTIONARY to BAIPX_ROLE;
grant CREATE SYNONYM to BAIPX_ROLE;
grant CREATE PUBLIC SYNONYM to BAIPX_ROLE;
grant CREATE TYPE to BAIPX_ROLE;
grant CREATE LIBRARY to BAIPX_ROLE;
grant CREATE PUBLIC DATABASE LINK to BAIPX_ROLE;
grant CREATE TRIGGER to BAIPX_ROLE;
grant DEBUG CONNECT SESSION to BAIPX_ROLE;
grant CREATE TABLE to BAIPX_ROLE;
grant CREATE CLUSTER to BAIPX_ROLE;
grant CREATE SESSION to BAIPX_ROLE;
grant CREATE SEQUENCE to BAIPX_ROLE;
grant DROP PUBLIC DATABASE LINK to BAIPX_ROLE;
grant CREATE PROCEDURE to BAIPX_ROLE;
3、 Grant roles to users
grant BAIPX_ROLE to BAIPX;
grant connect, resource to BAIPX;
grant unlimited tablespace to BAIPX;
4、 View user permissions
### Query the given system permission of a user
select * from dba_sys_privs where GRANTEE='BAIPX';
### Query the role permissions assigned to a user
select * from dba_role_privs where GRANTEE='BAIPX';
### Query the permissions contained in the role
select * from role_sys_privs where role='BAIPX';
Grant the same permission
select table_name from dict where table_name like '%PRIVS%';
select 'grant '|| PRIVILEGE|| ' ' || ' on ' || OWNER||'.'|| TABLE_NAME||' TO ' || GRANTEE|| ';'from dba_tab_privs where grantee='WSCRM';
select 'grant '|| GRANTED_ROLE || ' to ' || GRANTEE||';' from dba_role_privs where grantee='WSCRM';
select 'grant '|| privilege|| ' to ' || grantee||';' from dba_sys_privs where grantee='WSCRM';
边栏推荐
- Matlab extracts numerical data from irregular txt files (simple and practical)
- 面試題總結(2) IO模型,集合,NIO 原理,緩存穿透,擊穿雪崩
- 如何让让别人畏惧你
- Gut | 香港中文大学于君组揭示吸烟改变肠道菌群并促进结直肠癌(不要吸烟)
- The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years
- 搭建ADG后,实例2无法启动 ORA-29760: instance_number parameter not specified
- 【Proteus仿真】74HC154 四线转12线译码器组成的16路流水灯
- 如何成为一名高级数字 IC 设计工程师(1-5)Verilog 编码语法篇:操作数
- 历经一个月,终于拿到金蝶Offer!分享一下四面面经+复习资料
- Using activity to realize a simple inputable dialog box
猜你喜欢
EPS电动转向系统分析
Encapsulation attempt of network request framework of retro + kotlin + MVVM
封装一个koa分布式锁中间件来解决幂等或重复请求的问题
Hal - General
Leetcode 46: full arrangement
How did I grow up in the past eight years as a test engineer of meituan? I hope technicians can gain something after reading it
Expandablelistview that can expand and shrink (imitating the list page of professional selection of Zhilian recruitment)
Tencent micro app to get wechat user information
软件测试工程师的5年之痒,讲述两年突破瓶颈经验
MATLAB extrait les données numériques d'un fichier txt irrégulier (simple et pratique)
随机推荐
CorelDRAW Graphics Suite 2022新版功能详情介绍
C language two-dimensional array
Probability theory: application of convolution in calculating moving average
行业唯一!法大大电子合同上榜36氪硬核科技企业
Expandablelistview that can expand and shrink (imitating the list page of professional selection of Zhilian recruitment)
ExecutorException: Statement returned more than one row, where no more than one was expected.
线性表顺序表综合应用题P18
POI excel 单元格换行
(二)进制
有赞CTO崔玉松:有赞Jarvis核心目标是使产品变得更加聪明和可靠
Hard goods | write all the codes as soon as you change the test steps? Why not try yaml to realize data-driven?
12. Nacos server service registration of source code analysis of Nacos service registration
How can UI automated testing get out of trouble? How to embody the value?
00后抛弃互联网: 毕业不想进大厂,要去搞最潮Web3
[proteus simulation] 16 channel water lamp composed of 74hc154 four wire to 12 wire decoder
Reading notes: heart like Bodhi, Cao Dewang
php如何解决高并发问题
[VTK] vtkPolydataToImageStencil 源码解读
Application of high-precision indoor positioning technology in safety management of smart factory
搭建ADG后,实例2无法启动 ORA-29760: instance_number parameter not specified