1.用Oracle用戶登錄sqlplus
sqlplus / as dba
2.創建臨時表空間 miya_temp
我的Oracle安裝路徑是/data/oracle/product/11.2.0/db_1/
在這個目錄下mkdir database
create temporary tablespace miya_temp
tempfile '/data/oracle/product/11.2.0/db_1/database/miya_temp.dbf'
size 10m
autoextend on
next 10m maxsize 20480m
extent management local;
3.創建數據表空間 miya
create tablespace miya
loggingdatafile '/data/oracle/product/11.2.0/db_1/database/miya.dbf'
size 10m
autoextend on
next 10m maxsize 20480m
extent management local;
4.創建用戶並指定表空間 miya是用戶名,miya123是密碼
create user miya identified by miya123
default tablespace miya
temporary tablespace miya_temp;
5.給用戶授權
grant connect,resource,dba to miya;
附加內容
給用戶無限表空間權限
grant unlimited tablespace to miya;
刪除表空間
drop tablespace miya;
刪除用戶
drop user miya;