当前位置:网站首页>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';
边栏推荐
- Crawl with requests
- VPP three-layer network interconnection configuration
- Tablespace creation management and control file management
- Cause: org. apache. ibatis. builder. Builderexception: error parsing SQL mapper configuration problem analysis
- ORACLE 11G 单机冷备数据库
- Google Earth engine (GEE) - ghsl global population grid dataset 250 meter resolution
- Summary of interview questions (2) IO model, set, NiO principle, cache penetration, breakdown avalanche
- 面试题总结(2) IO模型,集合,NIO 原理,缓存穿透,击穿雪崩
- C language two-dimensional array
- 大厂技术专家:工程师如何提升沟通能力?
猜你喜欢
Crawl with requests
有赞CTO崔玉松:有赞Jarvis核心目标是使产品变得更加聪明和可靠
栈,单调栈,队列,单调队列
Software testing redis database
2021 reading summary (continuously updating)
I have been doing software testing for three years, and my salary is less than 20K. Today, I put forward my resignation
Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure
Solve undefined reference to`__ aeabi_ Uidivmod 'and undefined reference to`__ aeabi_ Uidiv 'error
(二)进制
The element form shows the relationship between elementary transformation and elementary matrix
随机推荐
1. Hal driven development
使用onvif协议操作设备
搭建ADG后,实例2无法启动 ORA-29760: instance_number parameter not specified
Matlab extracts numerical data from irregular txt files (simple and practical)
Hal -- writing hardware drivers
进程与线程
The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years
[proteus simulation] 16 channel water lamp composed of 74hc154 four wire to 12 wire decoder
Test what the leader should do
项目管理精华读书笔记(六)
Inexplicable problems in the nesting of constraintlayout and relativelayout
有赞CTO崔玉松:有赞Jarvis核心目标是使产品变得更加聪明和可靠
"Core values of testing" and "super complete learning guide for 0 basic software testing" summarized by test engineers for 8 years
如何成为一名高级数字 IC 设计工程师(1-4)Verilog 编码语法篇:表达式
php如何解决高并发问题
IIS修改配置信息后不生效
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
Project management essence reading notes (VII)
线性表顺序表综合应用题P18
如何让让别人畏惧你