--------------------------------------------------------
-- 創建表空間 和用戶
--------------------------------------------------------
/**刪除表空間*/
-- drop tablespace ssh_temp including contents and datafiles;
-- drop tablespace ssh_data including contents and datafiles;
/*創建臨時表空間*/
create temporary tablespace ssh_temp
tempfile 'D:\oracle\workspace\ssh_temp.dbf'
size 50m
autoextend on next 50m maxsize 2048m
extent management local;
/***創建數據表空間****/
create tablespace ssh_data datafile 'D:\oracle\workspace\ssh_data.dbf' size 50m
autoextend on next 50m maxsize unlimited logging
extent management local /**表示使用本地管理表空間***/
segment space management auto /***表示使用位圖來管理空閒段空間***/
;
-- drop user bestsoft cascade;
/**創建用戶**/
create user root identified by 123456
default tablespace ssh_data
temporary tablespace ssh_temp;
/**給用戶授權*/
-- grant connect,resource to root;
grant dba to root;
-- 登陸
connect root/123456;