红联Linux门户
Linux帮助

Oracle数据库在Windows/Linux环境下普通/数据泵方式导入/导出示

发布时间:2015-04-11 10:36:49来源:linux网站作者:johnnysun2015

1.Linux普通导出/入
1.1 终端下导出
exp naricom/naricom@10.185.3.100/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/naricom@10.185.3.100/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/naricom@10.185.3.100/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