本文將介紹的是通過創(chuàng)建一張表,進而實現(xiàn)Oracle創(chuàng)建用戶權(quán)限的過程。以下這些代碼主要也就是為實現(xiàn)Oracle創(chuàng)建用戶權(quán)限而編寫,希望能對大家有所幫助。
注意:每條語語分開執(zhí)行,結(jié)尾必須用分號;
//創(chuàng)建空間 create tablespace test datafile 'c:\oracle\oradata\orcl9\test.dbf' size 50M default storage (initial 500K Next 500K minextents 1 maxextents unlimited pctincrease 0); //Oracle創(chuàng)建用戶權(quán)限//創(chuàng)建用戶 create user lxg identified by lxg default tablespace test; //授權(quán) grant resource,connect,dba to test; //刪除表空間 drop tablespace "空間名" including contents and datafiles 刪除用戶
drop user "lxg" cascade 增加表空間
alter tablespace chinawater add datafile 'c:\oracle\oradata\orcl9\ADDCHINAWATER.dbf' size 200M 創(chuàng)建用戶
create user userName identified by password; 創(chuàng)建用戶 userName,密碼為 password
2
給用戶授權(quán)
grant dba to lxg;--授予DBA權(quán)限 grant unlimited tablespace to lxg;--授予不限制的表空間 grant select any table to lxg;--授予查詢?nèi)魏伪?nbsp; grant select any dictionary to lxg;--授予 查詢 任何字典 grant dba to lxg; grant unlimited tablespace to lxg; grant select any table to lxg; grant select any dictionary to lxg;