亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Oracle的用戶、角色及權(quán)限相關(guān)操作

 更新時(shí)間:2017年07月05日 11:59:48   作者:益哥哥  
這篇文章主要介紹了Oracle的用戶、角色及權(quán)限相關(guān)操作,需要的朋友可以參考下

1、創(chuàng)建用戶

create user KD identified by 123456;

2、授予連接數(shù)據(jù)庫的權(quán)限

grant connect to KD;

3、將Scott用戶的emp表授權(quán)給KD可以查詢

grant select on scott.emp to KD;
grant create table to KD;

4、回收權(quán)限

revoke select on scott.emp from KD;

5、表的增刪改權(quán)限授權(quán)

grant select,inset,delete,update on scott.emp to KD;
revoke select,inset,delete,update on scott.emp from KD;

6、刪除用戶

SQL 錯(cuò)誤: ORA-01940: 無法刪除當(dāng)前連接的用戶

退出已經(jīng)連接得KD用戶后再執(zhí)行

drop user KD;

會(huì)提示:錯(cuò)誤: ORA-01922: 必須指定 CASCADE 以刪除 'KD'

drop user KD cascade;

7、查看當(dāng)前用戶所擁有的權(quán)限

select * from session_privs;

8、查看當(dāng)前用戶所擁有的角色

select * from user_role_privs;

9、查看角色所有的權(quán)限

select * from dba_sys_privs;
select * from dba_sys_privs where grantee='CONNECT';
--create session
select * from dba_sys_privs where grantee='RESOURCE';
/*
create trigger 
create sequence 
create type 
create procedure 
create cluster 
create operator 
create indextype 
create table
*/
select * from dba_sys_privs where grantee='DBA';
--有最高權(quán)限 所有的權(quán)限都有

創(chuàng)建一個(gè)開發(fā)人員并授權(quán):

create user CURRY identified by 123456;
create connet,resource to CURRY;

10、用戶解鎖

alter user HR account unlock;

11、修改用戶密碼

alter user HR identified by 123456;

以上所述是小編給大家介紹的純Oracle的用戶、角色以及權(quán)限相關(guān)操作,希望對(duì)大家有所幫助,如果大家有任何疑問請給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論