'temporary tablespace'에 해당되는 글 1건

  1. 2012.12.27 temporary tablespace 관리 방법
반응형

 

-- 실전 오라클 백업과 복구(생능출판사, 서진수 지음), p.138~p.140
-- temporary tablespace 관리 방법

-- 1. 현재 상태 파악하기
SQL> set line 200
SQL> col tablespace_name for a10
SQL> col file_name for a50
SQL> select file_id, tablespace_name, bytes/1024/1024 MB, file_name from dba_temp_files;
SQL>

 

-- 2. 신규 temporary tablespace temp2 생성하기
SQL> create temporary tablespace temp2
tempfile '/u01/app/oracle/oradata/orcl/temp02.dbf' size 10M;
SQL> set line 200
SQL> col property_name for a30
SQL> col property_value for a10
SQL> col description for a50
SQL> select * from database_properties
where property_name like 'DEFAULT%';
SQL>

 

-- 3. temporary tablespace 변경하기
SQL> alter database default temporary tablespace temp2;
SQL> drop tablespace temp;
SQL>

반응형