오라클 정보

오라클 db 백업 하기,복원하기

빈센트코드 2010. 9. 17. 14:15


 

실행 > cmd > EXP ID/PW@SID full=Y file=백업받을 경로

 
 예)EXP 
test/test@oracle full=Y file=c:\test.dmp






 

+간단 명료한 오라클 DB복원하기+

 

1.SQL Plus

   SQL+에서  SYSTEM 계정으로 접속(기본DB일경우 pw=manager)


   CREATE USER ID IDENTIFIED BY PW;
   GRANT connect, resource, DBA TO ID;

 

2.DOS

imp 아이디/비밀번호@tnsname(sid) file=저장경로

ex 1) scott계정으로 들어가 해당 파일을 Import
imp scott/tiger@orcl file=c:\dump.dmp

ex2) 복원하고자 하는 DB에 같은 이름으로 오브젝트가 있을 경우, 오류를 무시하고 건너뛰고 싶을 때 ignore옵션을 추가
imp scott/tiger@orcl file=c:\dump.dmp ignore=y

ex 3) system계정으로 들어가 scott에서 Export한 데이터를 scott2에게 Import
imp system/system@orcl fromuser=scott touser=scott2 file=c:\dump.dmp

실행 > cmd > imp ID/PW fromuser=record touser=ID ignore=Y file=백업파일이 있는 경로