■ Data file 및 Tablespace 조회
SQL> select tablespace_name, bytes, file_name from dba_data_files;
SQL> select tablespace_name, status, contents, extent_management, segment_space_management
2 from dba_tablespaces;
■ Tablespace 생성
- 일반 Tablespace
SQL> create tablespace tablespace_name
2 datafile 'path/data_file_name' size 크기
3 segment space management auto;
SQL> create tablespace tablespace_name
2 datafile 'path/data_file_name' size 크기
3 extent space management local;
- UNDO Tablespace
SQL> create undo tablespace tablespace_name
2 datafile 'path/data_file_name' size 크기;
- TEMP Tablespace
SQL> create temporary tablespace tablespace_name
2 tempfile 'path/data_file_name' size 크기;
- Tablespace Block 지정
SQL> create tablespace tablespace_name
2 datafile 'path/data_file_name' size 크기
3 blocksize [2K | 4K | 8K | 16K | 32K]
4 segment space management auto;
■ Tablespace 확장
SQL> alter tablespace tablespace_name
2 datafile 'path/data_file_name' size 크기;
SQL> alter database datafile 'path/data_file_name' resize 크기;
■ Tablespace 관리
SQL> alter tablespace tablespace_name offline;
SQL> alter tablespace tablespace_name online;
SQL> alter tablespace tablespace_name rename
2 datafile 'path/data_file_name(원본 Datafile)'
3 to 'path/data_file_name';
SQL> alter database rename
2 file 'path/data_file_name(원본 Datafile)'
3 to 'path/data_file_name';
■ Tablespace 삭제
SQL> drop tablespace tablespace_name
2 including contents and datafiles cascade constraints;
'Oracle 10g > 10g - Admin I' 카테고리의 다른 글
프로파일 & 유저 관리 & 권한 관리 (0) | 2010.03.05 |
---|---|
Constraints (제약 조건) (0) | 2010.03.05 |
Index (인덱스) (0) | 2010.03.05 |
Table (테이블) (0) | 2010.03.03 |
Redo log group & member 관련 명령어 (0) | 2010.02.24 |