当前位置:网站首页>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';
边栏推荐
- 项目管理精华读书笔记(六)
- Internet Socket (非)阻塞write/read n个字节
- Gut | 香港中文大学于君组揭示吸烟改变肠道菌群并促进结直肠癌(不要吸烟)
- 项目管理精华读书笔记(七)
- What are the strengths of "testers"?
- Tablespace creation management and control file management
- 【Proteus仿真】74HC154 四线转12线译码器组成的16路流水灯
- Oracle收回权限 & 创建角色
- 如何成为一名高级数字 IC 设计工程师(1-2)Verilog 编码语法篇:Verilog 1995、2001、2005 标准
- A simple method of adding dividing lines in recyclerview
猜你喜欢

2021 reading summary (continuously updating)

Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure

C语言 AES加解密

The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years

进程与线程

Encapsulation attempt of network request framework of retro + kotlin + MVVM

My understanding of testing (summarized by senior testers)

Solve the problem that pycharm Chinese input method does not follow

00后抛弃互联网: 毕业不想进大厂,要去搞最潮Web3

redis那些事儿
随机推荐
今晚要修稿子準備發佈。但是,仍卡在這裡,也許你需要的是一個段子。
C language two-dimensional array
Encapsulate a koa distributed locking middleware to solve the problem of idempotent or repeated requests
VPP三层网络互联配置
Tencent micro app to get wechat user information
图解网络:什么是虚拟路由器冗余协议 VRRP?
英特尔13代酷睿旗舰曝光,单核5.5GHz
How to become a senior digital IC Design Engineer (1-4) Verilog coding syntax: expression
线性表的双链表
Execute kubectl on Tencent cloud container service node
在职美团测试工程师的这八年,我是如何成长的,愿技术人看完都有收获
2022-07-02:以下go语言代码输出什么?A:编译错误;B:Panic;C:NaN。 package main import “fmt“ func mai
What are the strengths of "testers"?
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
The manuscript will be revised for release tonight. But, still stuck here, maybe what you need is a paragraph.
The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years
我对测试工作的一些认识(资深测试人员总结)
Definition and properties of summation symbols
Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure
redis那些事儿