当前位置:网站首页>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';
边栏推荐
- Logstash backup tracks the data records reported
- Word line and bit line
- glassfish org. h2.server. Shutdownhandler classnotfoundexception exception exception handling
- Overview of testing theory
- 现在零基础转行软件测试还OK吗?
- 如何让让别人畏惧你
- 软件测试——Redis数据库
- T5 的尝试
- Differences among norm, normalize and normalized in eigen
- C language project: student achievement system
猜你喜欢
The normal one inch is 25.4 cm, and the image field is 16 cm

STM32F1与STM32CubeIDE编程实例-TM1637驱动4位7段数码管

Programming examples of stm32f1 and stm32subeide -tm1637 drives 4-bit 7-segment nixie tubes

2021 reading summary (continuously updating)

栈,单调栈,队列,单调队列

QT: QSS custom qtreeview instance

可以写进简历的软件测试电商项目,不进来get一下?

公司测试部门来了个00后卷王之王,老油条感叹真干不过,但是...

月薪过万的测试员,是一种什么样的生活状态?

How to realize automatic testing in embedded software testing?
随机推荐
Comment réaliser des tests automatisés pour les tests logiciels embarqués?
Exclusive analysis | truth about resume and interview
Stack, monotone stack, queue, monotone queue
可以写进简历的软件测试电商项目,不进来get一下?
游戏测试相关 测试一个英雄的技能(春招被问比较多的一道题)
MAUI Developer Day in GCR
logstash备份跟踪上报的数据记录
IIS does not take effect after modifying the configuration information
Interviewer: what is the internal implementation of the list in redis?
The highest monthly salary of 18K has a good "mentality and choice", and success is poor "seriousness and persistence"~
独家分析 | 关于简历和面试的真 相
Do you really need automated testing?
Commonly used discrete random distribution
Summary of the history of Mathematics
Activity and fragment lifecycle
Qt:qss custom qlistview instance
Solution: jupyter notebook does not pop up the default browser
Qt:qss custom QSlider instance
使用ML.NET+ONNX预训练模型整活B站经典《华强买瓜》
程序进程管理工具-go supervisor