sqlplus /nologSQL> conn sys/pwd as sysdba; 導(dǎo)入導(dǎo)出數(shù)據(jù)庫(來源網(wǎng)絡(luò)):1 將數(shù)據(jù)庫TEST完全導(dǎo)出,用戶名system 密碼manager 導(dǎo)出到D:/daochu.dmp中 exp system/ma" />
C:/Users/Administrator>sqlplus /nolog
SQL> conn sys/pwd as sysdba;
導(dǎo)入導(dǎo)出數(shù)據(jù)庫(來源網(wǎng)絡(luò)):
1 將數(shù)據(jù)庫TEST完全導(dǎo)出,用戶名system 密碼manager 導(dǎo)出到D:/daochu.dmp中
exp system/manager@TEST file=d:/daochu.dmp full=y
2 將數(shù)據(jù)庫中system用戶與sys用戶的表導(dǎo)出
exp system/manager@TEST file=d:/daochu.dmp owner=(system,sys)
3 將數(shù)據(jù)庫中的表table1 、table2導(dǎo)出
exp system/manager@TEST file=d:/daochu.dmp tables=(table1,table2)
4 將數(shù)據(jù)庫中的表table1中的字段filed1以"00"打頭的數(shù)據(jù)導(dǎo)出
exp system/manager@TEST file=d:/daochu.dmp tables=(table1) query=/" where filed1 like '00%'/"
要想壓縮,在上面命令后面 加上 compress=y 就可以了
數(shù)據(jù)的導(dǎo)入
1 將D:/daochu.dmp 中的數(shù)據(jù)導(dǎo)入 TEST數(shù)據(jù)庫中。
imp system/manager@TEST file=d:/daochu.dmp
上面可能有點問題,因為有的表已經(jīng)存在,然后它就報錯,對該表就不進行導(dǎo)入。
在后面加上 ignore=y 就可以了。
2 將d:/daochu.dmp中的表table1 導(dǎo)入
imp system/manager@TEST file=d:/daochu.dmp tables=(table1)
新建表空間
create tablespace demo datafile 'E:/oracle/TableSpace/tsdemo.dbf' size 100M autoextend on next 1M maxsize unlimited;
新建用戶,并賦予默認空間
create user demouser
identified by "userpwd"
default tablespace demo
temporary tablespace TEMP
profile default;
grant dba to demo; //復(fù)DBA權(quán)限
grant unlimited tablespace to demo;
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com