본문 바로가기

Oracle DataBase/SQL

9day

-- 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

 

'Oracle DataBase > SQL' 카테고리의 다른 글

오라클 EXISTS, NOT EXISTS 함수  (0) 2013.07.16
Oracle 설치후 게정 잡아주기  (0) 2012.08.29
8day  (0) 2012.07.13
SQLGate2010 데이터 가져오기  (0) 2012.07.12
7day  (0) 2012.07.11