1.
exp导出脚本:exp_steel.dat
set NLS_LANG=AMERICAN_AMERICA.UTF8
exp steel/steel@steel250 owner=steel file=db_steel_%date:~0,4%-%date:~5,2%-%date:~8,2%.dmp rows=y
pause
2.imp 导入脚本:
set NLS_LANG=AMERICAN_AMERICA.UTF8
imp system/oracle@bealla file=db_steel_2011-05-21.dmp log=implog.txt fromuser=steel touser=steel ignore=y ROWS=Y COMMIT=Y
3.expdp 导出脚本:
#!/bin/bash
aa=`date +%Y%m%d%H%M`
su - oracle <
expdp steel/steel directory=DATA_PUMP_DIR dumpfile=$aa
end
find /home/oracle/oracle/product/10.2.0/db_1/admin/steel/dpdump -name "*.dmp" -mtime +7 -exec rm -f {} \;
4. expdp 导入脚本:
impdp
dumpfile=test.dmp directory=expdir remap_schema=原shema:新schema
//创建目录
create or replace directory expdir as 'd:\';
create or replace directory expdir as '/home/oracle/oracle/dump';
select * from dba_directories;
阅读(1270) | 评论(0) | 转发(0) |