Oracle數據庫分別在Windows/Linux環境下普通/數據泵方式導入/導出示例
1 Linux普通導出/入
1.1 終端下導出
exp naricom/
[email protected]/SGTMS owner='('mw_app,mw_sys,statdba,dictdba')' file=/orabackup/SGTMS_201408131200.dmp log= /orabackup/SGTMS_201408131200.Log buffer=80000000
1.2 終端下導入
imp naricom/naricom@SGTMS fromuser=(MW_SYS,MW_APP,STATDBA,DICTDBA) touser=(MW_SYS,MW_APP,STATDBA,DICTDBA) file=D:\SGTMSDB\init\SGTMS_201408131105.dmp log=D:\SGTMSDB\init\SGTMS_201408131105.Log
2 Linux數據泵導出/入
2.1
SQL命令模式下先創建目錄“sgtms”
CREATE OR REPLACE DIRECTORY sgtms AS '/orabackup';
2.2 終端下導出(兩種方式)
expdp naricom/
[email protected]/SGTMS directory=sgtms dumpfile=sgtms_expdp_201408131200-%U.dmp parallel=4 schemas=DICTDBA,MW_APP,MW_SYS,STATDBA logfile=sgtms_expdp_201408131200.log
expdp naricom/
[email protected]/SGTMS directory=sgtms parallel=1 schemas=DICTDBA,MW_APP,MW_SYS,STATDBA dumpfile=sgtms_expdp_201408131200.dmp logfile=sgtms_expdp_201408131200.log
2.3 終端下導入(兩種方式)
impdp naricom/naricom@SGTMS directory=sgtms dumpfile=sgtms_expdp_%U.dmp parallel=4 schemas=DICTDBA,MW_APP,MW_SYS,STATDBA logfile=imp_sgtms_expdp.log
impdp naricom/naricom@SGTMS directory=sgtms dumpfile=sgtms_expdp_201408261630.dmp parallel=1 schemas=DICTDBA,MW_APP,MW_SYS,STATDBA logfile=imp_sgtms_expdp.log
3 Windows普通模式導出/入
3.1 CMD控制台下導出
exp naricom/naricom@SGTMS owner=(mw_app,mw_sys,statdba,dictdba) file=D:\SGTMS_20140523.dmp log= D:\SGTMS_20140523.Log buffer=80000000
3.2 CMD控制台下導入
imp naricom/naricom@sgtms file=D:\SGTMSDB\init\SGTMS_20140523172007.dmp fromuser=(mw_sys,mw_app,statdba,dictdba) touser=(mw_sys,mw_app,statdba,dictdba) log=D:\SGTMSDB\init\SGTMS_20140523172007.log
4 Windows數據泵導出/入
4.1 SQL命令模式下先創建目錄“sgtms”
CREATE OR REPLACE DIRECTORY sgtms AS 'E:\BackupSGTMS';
4.2 CMD控制台下導出
expdp system/system@SGTMS directory=sgtms dumpfile=sgtms_expdp_201408141145.dmp parallel=1 schemas=DICTDBA,MW_APP,MW_SYS,STATDBA logfile=sgtms_expdp_201408141145.log
4.3 CMD控制台下導入
impdp naricom/naricom@SGTMS directory=sgtms dumpfile=sgtms_expdp_%U.dmp parallel=4 schemas=DICTDBA,MW_APP,MW_SYS,STATDBA logfile=imp_sgtms_expdp.log