Oracle查看所有⽤户及其权限
Oracle查看所有⽤户及其权限:
Oracle数据字典视图的种类分别为:USER,ALL 和 DBA.
USER_*:有关⽤户所拥有的对象信息,即⽤户⾃⼰创建的对象信息
ALL_*:有关⽤户可以访问的对象的信息,即⽤户⾃⼰创建的对象的信息加上其他⽤户创建的对象但该⽤户有权访问的信息DBA_*:有关整个数据库中对象的信息
(这⾥的*可以为TABLES,INDEXES,OBJECTS,USERS等。)
1、查看所有⽤户
select * from dba_user;
select * from all_users;
select * from user_users;
2、查看⽤户系统权限
select * from dba_sys_privs;
select * from all_sys_privs;
select * from user_sys_privs;
3、查看⽤户对象权限
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
4、查看所有⾓⾊
select * from dba_roles;
5、查看⽤户所拥有的⾓⾊
select * from dba_role_privs;
select * from user_role_privs;
6、查看当前⽤户的缺省表空间
select username,default_tablespace from user_users;
7、查看某个⾓⾊的具体权限
如 grant connect,resource,create session,create view to TEST;
8、查看RESOURCE具有那些权限
SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE='RESOURCE
oracle创建⽤户需要什么权限,Oracle 创建普通⽤户,并赋予权限
采⽤sys or system / manager assysdba; 连接数据库。
创建普通⽤户oadmin: create user oadmin identified by pwd_oracle;
删除⽤户:
drop user oadmin;
授予⽤户登录数据库的权限:
grant create session to oadmin;
授予⽤户操作表空间的权限:
grant unlimited tablespace to oadmin;
grant create tablespace to oadmin;
grant alter tablespace to oadmin;
grant drop tablespace to oadmin;
grant manage tablespace to oadmin;
授予⽤户操作表的权限:
grant create table to oadmin; (包含有create index权限, alter table, drop table权限)
授予⽤户操作视图的权限:
grant create view to oadmin; (包含有alter view, drop view权限)
授予⽤户操作触发器的权限:
grant create trigger to oadmin; (包含有alter trigger, drop trigger权限)
授予⽤户操作存储过程的权限:
grant create procedure to oadmin;(包含有alter procedure, drop procedure 和function 以及 package权限)授予⽤户操作序列的权限:
grant create sequence to oadmin; (包含有创建、修改、删除以及选择序列)
授予⽤户回退段权限:
grant create rollback segment to oadmin;
grant alter rollback segment to oadmin;
grant drop rollback segment to oadmin;
授予⽤户同义词权限:
grant create synonym to oadmin;(包含drop synonym权限)
grant createpublicsynonym to oadmin;
grant droppublicsynonym to oadmin;
授予⽤户关于⽤户的权限:
grant create user to oadmin;
grant alter user to oadmin;
grant become user to oadmin;
grant drop user to oadmin;
授予⽤户关于⾓⾊的权限:
grant create role to oadmin;
oracle 新建用户
授予⽤户操作概要⽂件的权限
grant create profile to oadmin;
grant alter profile to oadmin;
grant drop profile to oadmin;
允许从sys⽤户所拥有的数据字典表中进⾏选择
grant select any dictionary to oadmin;

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。