Oracle 数据备份与恢复

2014-11-24 17:25:17 · 作者: · 浏览: 0

导入数据

编写创建User文件:create_user.sql

drop user test2 cascade;
create user test2 identified by password;
grant connect, resource to test2;
create or replace directory dmpdir as 'E:\app\tmp';
grant read, write on directory dmpdir to test2;

exit

编写执行导入Bat文件:restore.bat

sqlplus system/root123@localhost:1521/MYTEST @create_user.sql
impdp system/root123@localhost:1521/MYTEST schemas=test directory=dmpdir dumpfile=MYTEST.DMP table_exists_action=replace remap_schema=test:test2


推荐阅读: