溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

oracle創(chuàng)建用戶、表空間,并賦權(quán)

發(fā)布時(shí)間:2020-06-24 02:49:00 來源:網(wǎng)絡(luò) 閱讀:868 作者:flameover 欄目:關(guān)系型數(shù)據(jù)庫(kù)

--創(chuàng)建表空間

create tablespace test_tps   

datafile 'D:\app\Administrator\oradata\orcl\test_tps.dbf'   

size 1500M   

autoextend on next 5M;


--創(chuàng)建用戶并制定表空間

create user test_tps identified by test_tps   

default tablespace test_tps;  

--賦權(quán)限

grant connect,resource to test_tps;  

grant create any sequence to test_tps;  

grant create any table to test_tps;  

grant delete any table to test_tps;  

grant insert any table to test_tps;  

grant select any table to test_tps;  

grant unlimited tablespace to test_tps;  

grant execute any procedure to test_tps;  

grant update any table to test_tps;  

grant create any view to test_tps;  


--賦權(quán)DBA

grant sysdba to test_tps;

--撤回dba權(quán)限

revoke dba from 用戶

---------------------------------------------------------------

--授權(quán)命令:

--GRANT   {DBA|RESOURCE|CONNECT}   TO   {PUBLIC|user-list}  

--PUBLIC|user-list:全部或指定的用戶。     

--三種權(quán)限居且僅居其一,事務(wù)處理過程中不要執(zhí)行GRANT語(yǔ)句。


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI