詳解Oracle創(chuàng)建用戶權(quán)限全過(guò)程
作者:myprogramlife
在這里我們將介紹的是Oracle創(chuàng)建用戶權(quán)限,在這一過(guò)程中,我們將先要?jiǎng)?chuàng)建一張表,然后進(jìn)行后面的操作。
本文將介紹的是通過(guò)創(chuàng)建一張表,進(jìn)而實(shí)現(xiàn)Oracle創(chuàng)建用戶權(quán)限的過(guò)程。以下這些代碼主要也就是為實(shí)現(xiàn)Oracle創(chuàng)建用戶權(quán)限而編寫,希望能對(duì)大家有所幫助。
注意:每條語(yǔ)語(yǔ)分開(kāi)執(zhí)行,結(jié)尾必須用分號(hào);
- //創(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)魏伪?
- 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;
責(zé)任編輯:彭凡
來(lái)源:
chinaunix