Chinaunix首页 | 论坛 | 博客
  • 博客访问: 338818
  • 博文数量: 94
  • 博客积分: 1500
  • 博客等级: 上尉
  • 技术积分: 1020
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-11 09:23
文章分类
文章存档

2011年(76)

2010年(18)

分类: Oracle

2011-05-25 18:11:20



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;


阅读(1234) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~