전문가를 위한 오라클 데이터베이스 아키텍처 (2014년)
템프 파일 0 0 53,449

by 구루비스터디 템프 파일 temp file [2018.09.27]


템프 파일

용도

  • 대량의 정렬이나 해시 작업의 임시 결과 저장
  • 글로벌 템프로리 테이블 저장
  • 메모리에 담기에 너무 큰 결과집합 저장
  • 영구 보존되는 세그먼트를 저장할 수는 없음


특징

  • 템프 파일에 저장되는 데이터는 REDO LOG 기록되지 않음
  • Rollback 을 대비하여 UNDO Record 는 생성 함(자세한 내용은 9장에서)
  • Initial Size 를 할당하더라도 실제 사용되기 전까지 OS Filesystem 의 공간 점유 하지 않음



[RECO3]rac2:/app/oracle/ext> df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg_rac2-lv_root
                      51606140  22802376  26182324  47% /
[RECO3]rac2:/app/oracle/ext> sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Sat Oct 11 07:24:58 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> create temporary tablespace tmp2 tempfile '/app/oracle/temp_test.dbf' size 2G;

Tablespace created.

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

[RECO3]rac2:/app/oracle/ext> ls -l /app/oracle/temp_test.dbf
-rw-r----- 1 oracle oinstall 2147491840 Oct 11 07:25 /app/oracle/temp_test.dbf
[RECO3]rac2:/app/oracle/ext> df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg_rac2-lv_root
                      51606140  22803420  26181280  47% /
[RECO3]rac2:/app/oracle/ext>


[RECO3]rac2:/app/oracle/ext> sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Sat Oct 11 07:26:22 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> create tablespace test datafile '/app/oracle/data_test.dbf' size 2G;

Tablespace created.

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

[RECO3]rac2:/app/oracle/ext> ls -l /app/oracle/data_test.dbf
-rw-r----- 1 oracle oinstall 2147491840 Oct 11 07:27 /app/oracle/data_test.dbf

[RECO3]rac2:/app/oracle/ext> df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg_rac2-lv_root
                      51606140  24900680  24084020  51% /

"데이터베이스 스터디모임" 에서 2014년에 "전문가를 위한 오라클 데이터베이스 아키텍처 " 도서를 스터디하면서 정리한 내용 입니다.

- 강좌 URL : http://www.gurubee.net/lecture/4001

- 구루비 강좌는 개인의 학습용으로만 사용 할 수 있으며, 다른 웹 페이지에 게재할 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^

- 구루비 강좌는 서비스 제공을 위한 목적이나, 학원 홍보, 수익을 얻기 위한 용도로 사용 할 수 없습니다.

댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.
로그인 사용자만 댓글을 작성 할 수 있습니다. 로그인, 회원가입