oracle逐步學習總結之權限和角色(基礎六)

原創做品,轉自請註明出處: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的特權(啓動和關閉數據庫)

二、自定義角色

暫時不總結,後面總結

相關文章
相關標籤/搜索