본문 바로가기
oracle/[Admin] 실습

[실습] temporary tablespace 관리

by #moonyz 2014. 10. 23.

step 1. 기존 Temporary tablespace 조회하기



step 2. temporary tablespace 생성하기

SQL > create temporary tablespace 테이블스페이스명 tempfile '경로' size 크기 [autoextend on];



step 3. default temporary tablespace 변경하기

SQL > alter database default temporary tablespace 테이블스페이스명;



step 4. temporary tablespace 크기 변경하기

SQL > alter database tempfile '경로' resize 크기;

- 용량이 부족할 경우 등



step 5. temporary tablespace 삭제하기

- default temporary tablespace는 삭제 불가 >> default temporary tablespace라면 default를 변경해주고 삭제해야함

SQL > alter database default temporary tablespace 테이블스페이스명;



step 6. Temporary tablespace group (11g New Feature)

- 생성시 그룹 추가 생성 : create temporary tablespace 테이블스페이스명 tempfile '경로' size 크기 tablespace group 그룹명;

- 그룹에 테이블스페이스 추가 : alter tablespace 테이블스페이명 tablespace group 그룹명;

- 사용자에게 그룹을 할당 : alter user 사용자명 temporary tablespace 그룹명;

- 시스템에게 기본temp tablespace 지정 : alter database default temporary tablespace 그룹명;



step 7. 그룹에서 temporary tablespace 탈퇴시키기

SQL > alter tablespace 테이블스페이스명 tablesapce group ' '; --group뒤에 공백을 주면 그룹이 없는 것으로 인식



댓글