oracle创建用户及授权等相关操作
生活随笔
收集整理的這篇文章主要介紹了
oracle创建用户及授权等相关操作
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、創(chuàng)建用戶
create user test identified by test; 這樣就創(chuàng)建了一個用戶名密碼都為test的用戶 但這個時候test還是不能登陸成功的,我們需要賦予相應的權限2、賦予create session 的權限
grant create session to test; 這樣test用戶就能成功登錄進去賦予用戶創(chuàng)建表的權限 grant create table to test;賦予相應的權限 grant unlimited tablespace to test; 這個時候用戶就擁有了創(chuàng)建表的權限 由于表是用戶test的,相應的他就擁有了對創(chuàng)建的表的增刪查改的權限了3、撤銷權限
revoke create table from test;二、刪除用戶
drop user 用戶名;若用戶擁有對象,則不能直接刪除,否則將返回一個錯誤值。指定關鍵字cascade,可刪除用戶所有的對象,然后再刪除用戶。
drop user 用戶名 cascade;授權操作
grant select on tabel1 to tabel2; grant update on tabel1 to tabel2;–授權存儲過程
grant execute on procedure1 to tabel2;角色
create role farxix;--建立farxix角色grant insert on table1 to farxix; --將插入表的信息revoke insert on table1 from xujin1; --收回farxix角色的權限grant farxix to farxix1; --將角色的權限授權給farxix1;create role farxix1;grant farxix1 to farxix2; --將角色farxix1授權給farxix2;alter user farxix default farxix1,farxix2; --修改用戶默認角色drop role farxix1;--刪除角色farxix1;總結
以上是生活随笔為你收集整理的oracle创建用户及授权等相关操作的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: windows media servic
- 下一篇: Blob和Clob的区别和用法