오라클에서 덤프 Export 및 Import

2009. 1. 2. 11:38컴퓨터 프로그램/ORACLE


오라클에서 덤프 Export 및 Import

$ exp 데이터베이스 계정/비밀번호 tables=소유하고 있는 테이블 file=사용자임의 파일네임

ex) $ exp scott/tiger tables=emp file=emp

이렇게 하면 scott 계정의 권한으로 접근할수 있는 emp 테이블의 덤프를 emp.dmp 파일로 만들게 된다.

$ imp 데이터베이스 계정/비밀번호 file=사용자 덤프 파일명 fromuser=최초 덤프파일 작성계정 touser=사용할 계정

ex) $ imp scott2/tiger2 file=emp fromuser=scott touser=scott2

scott2 로 접근하는 데이터베이스에 emp.dmp 파일을 임포트 시키며 최초 덤프파일 작성시의 계정과 현재 데이터 베이스

의 계정을 써주면 덤프를 임포트 할수 있게 된다.