建立表空間 臨時表空間 使用者 指定表空間

2022-05-06 03:48:11 字數 900 閱讀 4901

1、--刪除已有的舊資料(表空間和臨時表空間下)

--drop tablespace user_data including contents and datafiles;

--drop tablespace user_temp including contents and datafiles;

2、--建立表空間

--建立臨時表空間

3、 --建立使用者,指定表空間

create   user  cph identified  by  cph  default  tablespace user_data  temporary  tablespace user_temp;

4、 --授權  

grant connect,resource,dba to cph;  grant unlimited tablespace to cph;  

5、 --匯入資料

-- cmd下  

imp cph/cph file=d:\database_bak\cph201304012.dmp log=d:\cph20130412_imp.log buffer=10000000 rows=y ignore=y full=y

6、備份資料 補充

exp userid=cph/cph@orcl owner=cph file=d:\cph201304012.dmp log=d:\cph20130412_imp.logbuffer=67108864 statistics=none grants=n consistent=y  

exp userid=pyc2/pyc2 owner=pyc2 file=d:\pyc2_20130801.dmp log=d:\pyc2_20130801.log buffer=67108864 statistics=none grants=n consistent=y

Oracle 建立使用者,臨時表空間,表空間,授權

建立使用者需要制訂預設表空間及臨時表空間,如果忽略,system表空間將成為預設表空間,這樣並不好。所以我們在建立使用者之前,先建立表空間。首先使用sys賬號使用sysbda方式登陸 建立臨時表空間 create temporary tablespace mydataspace temp tempf...

Oracle建立表空間和臨時表空間並指定給使用者

1 建立表空間 create tablespace data01 datafile nnc data01.dbf size 10000m autoextend on next 50m extent management local uniform size 512k create tablespac...

建立臨時表空間

語法 create table albums artist char 30 album name char 50 media type int go該錶也可以使用下邊的命令來手動刪除 drop table albums go當使用者退出sql server 時該表也可以被自動地刪除如果你是在自態sq...