oracle創(chuàng)建表空間導(dǎo)入導(dǎo)出命令

創(chuàng)建表空間

以dba身份 在plsql中執(zhí)行
第1步:創(chuàng)建數(shù)據(jù)表空間 win

create tablespace landscape
logging
datafile 'e:\app\hp\oradata\landscape.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;


linux 創(chuàng)建數(shù)據(jù)庫(kù)表空間
su - oracle
sqlplus /nolog
conn /as sysdba
dba方式登陸后:
create tablespace landscape
logging
datafile '/home/oracle/oradata/landscape.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;

第2步:創(chuàng)建用戶(hù)并指定表空間
create user landscape identified by landscape
default tablespace landscape;

第3步:給用戶(hù)授予權(quán)限
grant connect,resource,dba to landscape;

導(dǎo)入數(shù)據(jù)命令

打開(kāi)cmd控制臺(tái)
跳轉(zhuǎn)到oracle安裝路徑下的product\11.2.0\dbhome_1\BIN
cd F:\app\hp\product\11.2.0\dbhome_1\BIN

全部表:
imp landscape/landscape@ORCL file=e:\11.dump full=y
導(dǎo)入表:
imp landscape/landscape@ORCL file=e:\table.dump tables=T_NB

導(dǎo)出數(shù)據(jù)命令

表空間:
exp landscape/landscape@ORCL file=e:\11.dump tablespaces=landscape

導(dǎo)出表:
exp landscape/landscape@ORCL file=e:\table.dump tables=T_NB,T_

刪除表空間命令

alter tablespace landscape offline; -----這條可能用到,windows下dbf文件可能刪除不掉
DROP TABLESPACE landscape INCLUDING CONTENTS AND DATAFILES;

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容