Oracle导入(imp )与导出(exp )
导出
exp username/password@orcl file=db.dmp
导入
imp username/password@orcl file=h:\db.dmp full=y
备注:在导入之前,请先清除Views、Sequences、Tables
也可以使用Bat文件导出
Bat文件内容如下:
@echo ********************************
@echo 数据库备份
@echo ********************************
@echo off
set dbbarkfile=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%
set dbbarkdir=d:\application\dbbarkup\%dbbarkfile%
mkdir %dbbarkdir%
@echo ********************************
@echo 备份
@echo ********************************
exp username/password@orcl file=%dbbarkdir%\db%dbbarkfile%.dmp