当前位置:网站首页>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';
边栏推荐
- 栈,单调栈,队列,单调队列
- 线性表的双链表
- The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years
- Google Earth Engine(GEE)——当我们前后影像来弥补插值效果得时候,没有效果怎么办?
- 如何:配置 ClickOnce 信任提示行为
- Reading notes: heart like Bodhi, Cao Dewang
- 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
- Lecture 1 number field
- 【obs】obs的ini格式的ConfigFile
- I have been doing software testing for three years, and my salary is less than 20K. Today, I put forward my resignation
猜你喜欢

行业唯一!法大大电子合同上榜36氪硬核科技企业

After a month, I finally got Kingdee offer! Share tetrahedral Sutra + review materials

我对测试工作的一些认识(资深测试人员总结)

解决undefined reference to `__aeabi_uidivmod‘和undefined reference to `__aeabi_uidiv‘错误

Overview of testing theory

Encapsulate a koa distributed locking middleware to solve the problem of idempotent or repeated requests

MATLAB提取不规则txt文件中的数值数据(简单且实用)

Résumé des questions d'entrevue (2) Modèle io, ensemble, principe NiO, pénétration du cache, avalanche de rupture

(2) Base

Google Earth engine (GEE) - ghsl global population grid dataset 250 meter resolution
随机推荐
基于I2C协议的驱动开发
The highest monthly salary of 18K has a good "mentality and choice", and success is poor "seriousness and persistence"~
Tencent micro app to get wechat user information
MATLAB extrait les données numériques d'un fichier txt irrégulier (simple et pratique)
One hot code
Illustrated network: what is virtual router redundancy protocol VRRP?
2022-07-02:以下go语言代码输出什么?A:编译错误;B:Panic;C:NaN。 package main import “fmt“ func mai
[vtk] source code interpretation of vtkpolydatatoimagestencil
Crawl with requests
【obs】封装obs实现采集的基础流程
Unique in the industry! Fada electronic contract is on the list of 36 krypton hard core technology enterprises
封装一个koa分布式锁中间件来解决幂等或重复请求的问题
Lecture 1 number field
00后抛弃互联网: 毕业不想进大厂,要去搞最潮Web3
php如何解决高并发问题
Analysis of JMM memory model
软件测试工程师的5年之痒,讲述两年突破瓶颈经验
redis那些事儿
What are the strengths of "testers"?
2. Hal hardware abstraction layer