2020. 6. 2.

[Oracle] 관리자 5장 실습 1


실습 5.1 Tablespace와 Data file 상태 조회 (필)

SELECT tablespace_name, status, contents,
extent_management, segment_space_management
FROM dba_tablespaces;


  • Tablespace의 상태를 조회한다.
  • STATUS : 사용 가능여부
  • CONTENTS : 저장 Segment의 종류
  • EXTENT_MANAGEMENT : Extent의 할당 및 관리 방식
  • SEGMENT_SPACE_MANAGEMENT : Block내의 공간 관리 방식

SELECT tablespace_name, bytes, file_name
FROM dba_data_files;


  • Tablespace별 data file의 상태를 조회 한다.
  • BYTES : Data file의 크기
  • FILE_NAME : Data file의 경로명을 포함한 이름

SELECT t.name tablespace_name, d.bytes, d.name file_name
FROM v$tablespace t, v$datafile d
WHERE t.ts#=d.ts#;


  • Tablespace별 data file의 상태를 조회 한다.
  • Dictionary가 아니라 dynamic performance view를 조회하는 것이므로
MOUNT 상태에서도 조회 가능하다.

tablespace의 상태를 조회 한다.

SELECT tablespace_name, status, contents,
extent_management, segment_space_management
FROM dba_tablespaces
ORDER BY 1;


data file의 상태를 조회한다.

SELECT tablespace_name, bytes, file_name FROM dba_data_files
ORDER BY 1;


temp file의 상태를 조회 한다.

SELECT tablespace_name, bytes, file_name FROM dba_temp_files;


SELECT ts#, file#, name FROM v$datafile;


SELECT ts#, name FROM v$tablespace;


SELECT t.name tablespace_name, d.bytes, d.name file_name
FROM v$tablespace t, v$datafile d
WHERE t.ts#=d.ts#
ORDER BY 1;
// 검색 환경이 MOUNT 이상에서 모두 조회가 가능하다.



댓글 없음:

댓글 쓰기