1>sqlplus / as sysdba 进入sqlplus
2>drop user USER cascade
3>create user USER IDENTIFIED BY PASSWD 创建用户和密码
4>GRANT CREATE SESSION TO USER
5>grant dba to USER
6>返回dos,在dos下输入:imp userid=USER/****@orcl file=c:\src.dmp log=c:\src.log full=y ignore=y
==================================
201708更新
如果需要备份多个dmp方便比较,可以创建多个userID。备份时候将full模式改成 fromuser -- touser模式
1>create user "用户名1" IDENTIFIED BY PASSWD 创建用户和密码
2>GRANT CREATE SESSION TO "用户名1"
3>grant dba to "用户名1"
4>返回dos,在dos下输入:imp userid="用户名1"/密码1@orcl file=c:\1.dmp log=c:\1.log ignore=y fromuser=dmp的用户名 touser="用户名1"
--------------------------------------------
然后重复创建"用户名2"
1>create user "用户名2" IDENTIFIED BY PASSWD 创建用户和密码
2>GRANT CREATE SESSION TO "用户名2"
3>grant dba to "用户名2"
4>返回dos,在dos下输入:imp userid="用户名2"/密码2@orcl file=c:\2.dmp log=c:\2.log ignore=y fromuser=dmp的用户名 touser="用户名2"
=============================
fromuser touser模式和full模式不能共存!