当前位置:网站首页>Oracle收回权限 & 创建角色
Oracle收回权限 & 创建角色
2022-07-03 09:46:00 【喝醉酒的小白】
0、收回权限
SELECT 'REVOKE '||PRIVILEGE||' FROM BAIPX;' FROM dba_sys_privs WHERE GRANTEE='BAIPX';
1、收回dba权限
revoke dba from BAIPX;
2、创建角色并授权相关权限
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 BAIPX_ROLE to BAIPX;
grant connect, resource to BAIPX;
grant unlimited tablespace to BAIPX;
4、查看用户权限
###查询某用户的被赋予的系统权限
select * from dba_sys_privs where GRANTEE='BAIPX';
###查询某用户被赋予的角色权限
select * from dba_role_privs where GRANTEE='BAIPX';
###查询角色内包含的权限
select * from role_sys_privs where role='BAIPX';
授予相同权限
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';
边栏推荐
- QT: QSS custom qtabwidget and qtabbar instances
- Qt:qss custom qmenubar instance
- 如何让让别人畏惧你
- The highest monthly salary of 18K has a good "mentality and choice", and success is poor "seriousness and persistence"~
- 【蓝桥杯选拔赛真题44】Scratch消灭骷髅军团 少儿编程scratch蓝桥杯选拔赛真题讲解
- php如何解决高并发问题
- The element form shows the relationship between elementary transformation and elementary matrix
- Software testing (test case) writing: vulgar, native and skillful
- 可以写进简历的软件测试电商项目,不进来get一下?
- . Net core - a queuing system for wechat official account
猜你喜欢
嵌入式軟件測試怎麼實現自動化測試?
多路IO转接——前导
Use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B
Snownlp emotion analysis
栈,单调栈,队列,单调队列
有些能力,是工作中学不来的,看看这篇超过90%同行
Is it OK to test the zero basis software?
.Net Core-做一个微信公众号的排队系统
What is the salary level of 17k? Let's take a look at the whole interview process of post-95 Test Engineers
EPS电动转向系统分析
随机推荐
Logstash backup tracks the data records reported
Use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B
【Proteus仿真】74HC154 四线转12线译码器组成的16路流水灯
“测试人”,有哪些厉害之处?
EPS电动转向系统分析
Is it OK to test the zero basis software?
UI自动化测试如何走出困境?价值又如何体现?
12. Nacos server service registration of source code analysis of Nacos service registration
最高月薪18K 拥有好的“心态和选择”, 成功就差“认真和坚持”~
POI excel 单元格换行
2022 pinduogai 100000 sales tutorial
QT:QSS自定义QHeaderView实例
QT: QSS custom qsplitter instance
Large scale e-commerce project - environment construction
C language project: student achievement system
MAUI Developer Day in GCR
Interviewer: what is the internal implementation of the list in redis?
Test what the leader should do
软件测试工程师的5年之痒,讲述两年突破瓶颈经验
ExecutorException: Statement returned more than one row, where no more than one was expected.