꿈풀이 2012. 7. 13. 10:27
-- 9일차
-- quota
-- sys로 접속 (사용자에게 테이블스페이스 가용량을 설정)
ALTER USER WAN
QUOTA 10M ON JAVACTS;
-- quota unlimited on javacts; -- 무제한 설정
-- 백업(backup) & 복구(Recovery)
-- exp, imp
-- 1. 전체 DB 백업
-- exp system/비번 full=y file="파일명 지정"
-- 2. 스키마 백업
-- exp scott/tiger full=y file="d:/scott.dmp"
-- 3. 테이블 단위 백업
-- exp scott/tiger file="d:/tables.dmp" tables=(ziptbl, emp, dept)
DROP TABLE ZIPTBL PURGE;
SELECT * FROM ZIPTBL;
-- imp 복구
-- 1. 계정(스키마)복구
-- imp scott/tiger full=y file="d:/scott.dmp"
-- 삭제된 내용은 복구가 되나 이미 존재하는 테이블의 내용은 변경되지 않음
-- ingnore=y 옵션을 주면 기존 테이블에 데이터를 추가가 가능해진다.
-- 2. 테이블 복구 (scott -> wan)
-- imp system/javac file="d:/tables.dmp" fromuser=scott touser=wan