本文將介紹的是通過創建一張表,進而實現Oracle創建用戶權限的過程。以下這些代碼主要也就是爲實現Oracle創建用戶權限而編寫,希望能對大家有所幫助。
注意:每條語語分開執行,結尾必須用分號;
- //創建空間
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創建用戶權限//創建用戶
create user lxg identified by lxg default tablespace test;
//授權
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
- 創建用戶
- create user userName identified by password;
- 創建用戶 userName, 密碼爲 password
- 給用戶授權
- grant dba to lxg;--授予DBA權限
- grant unlimited tablespace to lxg;--授予不限制的表空間
- grant select any table to lxg;--授予查詢任何表
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;