系统权限 & 对象权限
系统权限: 允许用户执行特定的数据库动作,如创建表、创建索引、连接实例等。
select count(*) from system_privilege_map;
对象权限: 允许用户操纵一些特定的对象,如读取视图,可更新某些列、执行存储过程等。
常用的系统权限:
create session 创建会话
create sequence 创建序列
create synonym 创建同名对象
create table 在用户模式中创建表
create any table 在任何模式中创建表
drop table 在用户模式中删除表
drop any table 在任何模式中删除表
create procedure 创建存储过程
execute any procedure 执行任何模式的存储过程
create user 创建用户
drop user 删除用户
create view 创建视图
一般业务用户授予权限
-- 授予用户表空间与执行存储过程权限
grant unlimited tablespace to username;
grant execute any procedure to username;
-- 授予普通权限
grant connect to username;
grant resource to username;
grant create view to username;
#授权相关处理
grant create any table to username;
grant alter any table to username;
grant drop any table to username;
grant insert any table to username;
grant update any table to username;
grant delete any table to username;
权限管理