最近2018中文字幕在日韩欧美国产成人片_国产日韩精品一区二区在线_在线观看成年美女黄网色视频_国产精品一区三区五区_国产精彩刺激乱对白_看黄色黄大色黄片免费_人人超碰自拍cao_国产高清av在线_亚洲精品电影av_日韩美女尤物视频网站

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
Sec_P1創(chuàng)建和授予角色


陽西網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)建站,陽西網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為陽西數(shù)千家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)營(yíng)銷網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的陽西做網(wǎng)站的公司定做!

Sec_P1創(chuàng)建和授予角色


SQL>connect system/oracle

#創(chuàng)建兩個(gè)角色

SQL>createrole  usr_role;

SQL>createrole mgr_role;

 

#為這些角色授予一些權(quán)限,并將usr_role授予mgr_role;

SQL>grantcreate session to usr_role;

SQL>grantselect on sales.t1 on usr_role;

SQL>grantusr_role to mgr_role with admin option;

SQL>grantall on sales.t1 to mgr_role;

 

SQL>connsystem/oracle

SQL>grantmgr_role to webapp;

 

SQL>connwebapp/oracle;

 

SQL>grantusr_role to accounts ;

SQL>insertinto sales.t1 values(sysdate);

SQL>commit;

 

#擁有查詢權(quán)限,但是沒有插入權(quán)限。

SQL>connaccounts/oracle

SQL>Select* from sales.t1;

SQL>insertinto sales.t1 values(sysdate);

--ORA-01031:insufficient privileges

 

#對(duì)accounts的權(quán)限進(jìn)行調(diào)整,使其可以在默認(rèn)情況下登錄,但無其他權(quán)限。

SQL>connsystem/oracle

SQL>grantconnect to accounts;

SQL>alteruser default role  connect;

 

#演示角色的啟用和禁用

SQL>connaccounts/oracle

SQL>select* from sales.t1;

--ORA-00942:table or veiw does not exist

 

SQL>setrole usr_role;

SQL>select* from sales.t1;  --It's OK;

 

#查看兩個(gè)新角色對(duì)于的查看權(quán)限

SQL>select * from dba_role_privs

Wheregranted_role in ('USR_ROLE', 'MGR_ROLE');

SQL>selectgrantee,owner, table_name,privilege,grantable

Fromdba_tab_privs where grantee in ( ' USR_ROLE', 'MGR_ROLE')

Union all

Selectgrantee, to_char(null), to_char(null),privilege,admin_option

Fromdba_sys_privs  where grantee in ('USR_ROLE', 'MGR_ROLE')

Order bygrantee;


當(dāng)前文章:Sec_P1創(chuàng)建和授予角色
文章起源:http://fisionsoft.com.cn/article/jsdijd.html