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模式不能共存!