oracle 使用pl/sql創建用戶和表空間

/*分爲四步,複製全部並存儲爲.sql格式的文檔,在pl/sql中間操作區右鍵-打開-sql腳本進行執行即可創建 */
/*第1步:創建臨時表空間nhdj_temp  */
create temporary tablespace nhdj_temp  
tempfile 'E:\app\Administrator\oradata\orcl\nhdj_temp.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  
 
/*第2步:創建數據表空間nhdj_data  */
create tablespace nhdj_data  
logging  
datafile 'E:\app\Administrator\oradata\orcl\nhdj_data.dbf' 
size 50m  
autoextend on  
next 50m maxsize 20480m  
extent management local;  
 
/*第3步:創建用戶並指定表空間 賬號nhdj 密碼nhdj   */
create user nhdj identified by nhdj
default tablespace nhdj_data  
temporary tablespace nhdj_temp;  
 
/*第4步:給用戶授予權限  */
grant connect,resource,dba to nhdj

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章