原创做品,转自请注明出处:https://www.cnblogs.com/sunshine5683/p/10236129.htmlhtml
继续上节的索引,此次主要总结oracle数据库的权限问题!(在总结的过程当中,后续会不断完善)数据库
1、索引session
一、单列索引:基于单个列创建的索引oracle
建立单列索引:create index index_name on student(name);spa
二、复合索引htm
2、权限对象
一、授予某用户登陆权限blog
grant create session to user_name 索引
二、授予某个用户建立表和建立视图权限开发
grant create table,create view to user_name
三、授予权限的同时但愿该用户能够同时将该权限授予其余用户
grant create table to user_name with admin option
四、授予用户只修改scott.emp表的sal列
grant update on emp(sal) to user_name
五、授予某用户只能够查询scott.emp表的ename,sal数据
grant select on scott.emp(ename,sal) to user_name
六、授予index权限
若是想在别的方案的表上创建索引,则必须具备index对象权限,如:但愿ken用户能够在scott.emp表上创建索引,就给其index的对象权限
grant index on scott.emp to ken
同时也能够使用with grant option选项(对象权限,若是是系统权限,则:with admin option)
3、角色
角色能够将权限的授予步骤(权限授完通常须要12个)
一、预约义角色
(1)connect角色
connect角色具备通常引用开发人员须要的大部分权限,当创建一个用户后,多数状况下只要授予用户connect和resource角色就够了,其中connect角色具备的用户权限以下
alter session
create cluster
create database link
create session
create table
create view
create sequence
(2)resource角色
resource角色具备应用开发人员所需的其余权限,好比创建存储过程,触发器等。这里须要注意的是,resource角色隐含了unlimited tablespace系统权限。其中resource角色具备的用户权限以下:
create cluster
create indextype
create table
create sequence
create type
create procedure
create trigger
(3)dba角色
dba角色具备全部的系统权限,以及with admin option选项,默认的dba用户为sys和system,他们能够将任何系统权限授予其余用户,可是dba角色不具有sysdba和sysoper的特权(启动和关闭数据库)
二、自定义角色
暂时不总结,后面总结