SlideShare a Scribd company logo
1 of 8
Download to read offline
WareValley
http://www.WareValley.com
Database Audit and Protection [ DB 접근통제 ]
Database Encryption [ DB 암호화 ]
Database Vulnerability Assessment [ DB 취약점 분석 ]
Database SQL Query Approval [ DB 작업결재 ]
Database Performance Monitoring and Management [ DB 성능관리 및 개발 ]
WareValley
Oracle Architecture
오렌지팀 윤석준 선임연구원
Database security and management, WareValley.
http://www.WareValley.com
Oracle Architecture
User
Process
Listener
Server
Process
User
Process
User
Process
User
Process
Server
Process
Server
Process
Server
Process
Instance
SGA
(System Global Area)
Background Process
Oracle Database
Data Files
Control
Files
Online
Redo
Log
Offline Redo Log Feles
Parameter
FILE
Password
FILE
PGA
(Program Global Area)
PGA
(Program Global Area)
PGA
(Program Global Area)
PGA
(Program Global Area)
Database security and management, WareValley.
http://www.WareValley.com
Oracle Memory
Server
Process
Instance
Background Process
PGA
(Program Global Area)
SGA
(System Global Area)
 PGA (Program Global Area)
- Process 혹은 Thread의 개별적인 메모리 공간
- 사용자마다 개별적으로 사용하는 공간
 SGA (System Global Area)
- Oracle Process 들이 접근하는 큰 공유 메모리
- Server Process 와 Background Process 가 공용으로 사용
Database security and management, WareValley.
http://www.WareValley.com
Oracle Instance : PGA (Program Global Area)
PGA
정렬 공간
(Sort Area)
변수 저장 공간
(Stack Space)
세션 정보
(Session
Information)
커서 상태 정보
(Cursor State)
 정렬 공간 : ORDER BY 또는 GROUP BY 등의 정렬을 수행하기 위한 공간이며
해당 공간에서만 정렬이 완료된다면 이를 메모리 정렬이라고 한다.
해당 정렬 메모리 공간이 부족하다면 디스크를 이용
 세션 정보 : 서버 프로세스에 의해 추출된 결과 값을 전달하기 위해
필요한 유저 프로세스의 세션 정보를 저장
 커서 상태 정보 : 해당 SQL 파싱(Parsing) 정보가 저장되어 있는 주소를 저장
 변수 저장 공간 : SQL 문장에 바인드 변수(Bind Variable)를 사용 했을 경우
해당 바인드 변수를 저장하는 공간
Database security and management, WareValley.
http://www.WareValley.com
Oracle Instance : SGA (System Global Area)
 공용 메모리 영역으로 모든 사용자가 동일한 SGA를 사용
 DB Buffer Cache : 빠른 입출력을 위해서 Datafile을 읽어서 Block 단위로 저장해 놓는 Cache Memory
 Shared Pool
- Data Dictionary Cache : Oracle Dictionary 정보를 저장해두는 Cache Memory
- Library Cache : 사용자가 던진 SQL문과 Execution Plan을 저장해두는 Cache Memory
 Redo Log Buffer : Datafile 과 Controlfile에 가해지는 모든 변경 사항을 저장
 Large Pool : 선택적 Memory 영역으로, Backup, Parallel Processing, Redo Buffer 관리 등의 목적에 사용됨
 Java Pool : 선택적 Memory 영역으로, Oracle JVM에 접속해있는 모든 세션의 Java Code가 사용
 Stream Pool : 10g부터 지원되는 Oracle Stream (다른 DB로 Data 전달)에 사용
Redo
Log
BufferRECYCLE DEFAULT
Data Buffer Cache
SGA
(System Global Area)
Java Pool
Large Pool
Streams Pool
Library Cache
•SQL, SQL(recursive SQL)
•Parse Test
•Execution Plan
Data Dictionary Cache
•Row Cache
•Object Information
•Security
Shared Pool
Server
Process
Background
Process
Database security and management, WareValley.
http://www.WareValley.com
Shared Pool – Library Cache
 사용자가 실행시키는 SQL 문장을 저장 Library Cache
•SQL, SQL(recursive SQL)
•Parse Test
•Execution Plan
Data Dictionary Cache
•Row Cache
•Object Information
•Security
Shared Pool
SELECT * FROM Tbl WHERE ID = '1234'; -- e.g. Dynamic SQL
SELECT * FROM Tbl WHERE ID = ‘5678';
 위 2 SQL문은 다른 SQL문이라서 Shared SQL Pool에 따로 공간을 차지하게 된다.
 뿐만 아니라 SQL Parsing 도 따로하고, Execution Plan도 따로따로…
SELECT * FROM Tbl WHERE ID = :id; -- e.g. Static SQL
 한 번의 Parsing 으로 만들어진 Execution Plan을 계속해서 재사용 한다.
Database security and management, WareValley.
http://www.WareValley.com
Oracle Background Process
Background Process
PMON SMON DBWn CKPT LGWR ARCn etc
 User 연결 유무와 상관없이 항상 Background로 실행
 PMON (Process Monitor) : Server Process 관리. 잘못된 Process 파괴 및 자원해제, 잘못된 Transaction 문제 해결
 SMON (System Monitor) : DBMS의 CEO. 모든 작업 총관리 ( 임시 세그먼트 정리, 딕셔너리 관리, 재시작시 복구 담당)
 DBWn (Database Writer) : Memory 상의 변경이 일어난 Block을 디스크로 저장
 CKPT (Check Point) : 모든 Control File과 Data File의 해더를 최근의 체크포인트 정보로 갱신 (저장된 Data를 일치시키는 작업)
 LGWR (Log Writer) : 승인된 Transaction을 Redo Log File에 기록
 ARCn (Archiver) : Database가 작동하는 동안 백업 작업을 수행
 RECO (Recoverer Process) : 분산 시스템간의 Transaction 을 맞춰주는 역할
서울에 있는 은행과 부산에 있는 은행간에 이체 작업에서 물리적으로 다른 DB Server 간의 Two-phase Commit
(양쪽 모두 Prepare-phase 한 뒤, 둘 다 Commit 한 것이 확인되지 않으면 RECO가 Rollback 시킨다.)
Database security and management, WareValley.
http://www.WareValley.com
Database Writer
BEGIN TRANSACTION;
DELETE FROM Tbl1 WHERE ID < 200000;
COMMIT;
 위 실행문 중 가장 시간이 오래 걸리는 명령어는 ?
=> 다들 DELETE 라고 쉽게 말 할 것이다.
 그럼 COMMIT는 ?
=> 눈깜짝하기도 전에 끝 !
 만약 COMMIT을 하지 않고 Server를 Reboot 한다면 ?
=> 켜지는데 시간이 더 오래 걸린다.
일단 Disk에서는 지워지는 걸로…
COMMIT 하기 전에 Disk에서는 이미 지워진 상태
이미 Disk에서는 지워졌지만, 어딘가에서 읽어서
ROLLBACK 작업을 수행
Data Buffer Cache LRU 작동 설명
Dirty Buffer(더티 버퍼) 변경은 완료되었지만 디스크에 기록되지 않은 버퍼
Pinned Buffer(사용중 버퍼) 변경중인 버퍼
Free Buffer(프리 버퍼) 변경이 완료된 후 디스크에 기록된 버퍼
Crean(제거버퍼) 삭제대상

More Related Content

Viewers also liked

데이터베이스 시스템 chapter3_STG박하은
데이터베이스 시스템 chapter3_STG박하은데이터베이스 시스템 chapter3_STG박하은
데이터베이스 시스템 chapter3_STG박하은ETRIBE_STG
 
데이터베이스 시스템 chapter2_STG박하은
데이터베이스 시스템 chapter2_STG박하은데이터베이스 시스템 chapter2_STG박하은
데이터베이스 시스템 chapter2_STG박하은ETRIBE_STG
 
데이터베이스 시스템 chapter1_STG박하은
데이터베이스 시스템 chapter1_STG박하은데이터베이스 시스템 chapter1_STG박하은
데이터베이스 시스템 chapter1_STG박하은ETRIBE_STG
 
이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스
이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스
이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스Seunghwa Song
 
올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAP
올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAP올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAP
올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAPcho hyun jong
 
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1Seok-joon Yun
 
테드폴허브 오픈소스Vs엔터프라이즈
테드폴허브 오픈소스Vs엔터프라이즈테드폴허브 오픈소스Vs엔터프라이즈
테드폴허브 오픈소스Vs엔터프라이즈cho hyun jong
 
성능 좋은 SQL 작성법
성능 좋은 SQL 작성법성능 좋은 SQL 작성법
성능 좋은 SQL 작성법Devgear
 
하둡2 YARN 짧게 보기
하둡2 YARN 짧게 보기하둡2 YARN 짧게 보기
하둡2 YARN 짧게 보기beom kyun choi
 
Amazon web service simple diagram overview
Amazon web service simple diagram overviewAmazon web service simple diagram overview
Amazon web service simple diagram overviewJuyeon Yu
 
프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법중선 곽
 
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버Heungsub Lee
 
양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음
양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음
양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음Dongseo University
 
NoSQL Guide & Sample
NoSQL Guide &  SampleNoSQL Guide &  Sample
NoSQL Guide & SampleSangon Lee
 

Viewers also liked (16)

데이터베이스 시스템 chapter3_STG박하은
데이터베이스 시스템 chapter3_STG박하은데이터베이스 시스템 chapter3_STG박하은
데이터베이스 시스템 chapter3_STG박하은
 
데이터베이스 시스템 chapter2_STG박하은
데이터베이스 시스템 chapter2_STG박하은데이터베이스 시스템 chapter2_STG박하은
데이터베이스 시스템 chapter2_STG박하은
 
데이터베이스 시스템 chapter1_STG박하은
데이터베이스 시스템 chapter1_STG박하은데이터베이스 시스템 chapter1_STG박하은
데이터베이스 시스템 chapter1_STG박하은
 
이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스
이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스
이기종 멀티코어 프로세서를 위한 프로그래밍 언어 및 영상처리 오픈소스
 
올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAP
올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAP올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAP
올챙이(Tadpole for DB Tools)로 살펴보는 Eclipse RAP
 
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
 
테드폴허브 오픈소스Vs엔터프라이즈
테드폴허브 오픈소스Vs엔터프라이즈테드폴허브 오픈소스Vs엔터프라이즈
테드폴허브 오픈소스Vs엔터프라이즈
 
성능 좋은 SQL 작성법
성능 좋은 SQL 작성법성능 좋은 SQL 작성법
성능 좋은 SQL 작성법
 
하둡2 YARN 짧게 보기
하둡2 YARN 짧게 보기하둡2 YARN 짧게 보기
하둡2 YARN 짧게 보기
 
Amazon web service simple diagram overview
Amazon web service simple diagram overviewAmazon web service simple diagram overview
Amazon web service simple diagram overview
 
Zookeeper 소개
Zookeeper 소개Zookeeper 소개
Zookeeper 소개
 
프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법프로그래머가 알아야 하는 메모리 관리 기법
프로그래머가 알아야 하는 메모리 관리 기법
 
SPARK SQL
SPARK SQLSPARK SQL
SPARK SQL
 
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
 
양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음
양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음
양성봉 - 알기쉬운 알고리즘 - 1장알고리즘의첫걸음
 
NoSQL Guide & Sample
NoSQL Guide &  SampleNoSQL Guide &  Sample
NoSQL Guide & Sample
 

More from Seok-joon Yun

Retrospective.2020 03
Retrospective.2020 03Retrospective.2020 03
Retrospective.2020 03Seok-joon Yun
 
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image ConverterAWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image ConverterSeok-joon Yun
 
아파트 시세,어쩌다 머신러닝까지
아파트 시세,어쩌다 머신러닝까지아파트 시세,어쩌다 머신러닝까지
아파트 시세,어쩌다 머신러닝까지Seok-joon Yun
 
Pro typescript.ch07.Exception, Memory, Performance
Pro typescript.ch07.Exception, Memory, PerformancePro typescript.ch07.Exception, Memory, Performance
Pro typescript.ch07.Exception, Memory, PerformanceSeok-joon Yun
 
Doing math with python.ch07
Doing math with python.ch07Doing math with python.ch07
Doing math with python.ch07Seok-joon Yun
 
Doing math with python.ch06
Doing math with python.ch06Doing math with python.ch06
Doing math with python.ch06Seok-joon Yun
 
Doing math with python.ch05
Doing math with python.ch05Doing math with python.ch05
Doing math with python.ch05Seok-joon Yun
 
Doing math with python.ch04
Doing math with python.ch04Doing math with python.ch04
Doing math with python.ch04Seok-joon Yun
 
Doing math with python.ch03
Doing math with python.ch03Doing math with python.ch03
Doing math with python.ch03Seok-joon Yun
 
Doing mathwithpython.ch02
Doing mathwithpython.ch02Doing mathwithpython.ch02
Doing mathwithpython.ch02Seok-joon Yun
 
Doing math with python.ch01
Doing math with python.ch01Doing math with python.ch01
Doing math with python.ch01Seok-joon Yun
 
Pro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptPro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptSeok-joon Yun
 
C++ Concurrency in Action 9-2 Interrupting threads
C++ Concurrency in Action 9-2 Interrupting threadsC++ Concurrency in Action 9-2 Interrupting threads
C++ Concurrency in Action 9-2 Interrupting threadsSeok-joon Yun
 
Welcome to Modern C++
Welcome to Modern C++Welcome to Modern C++
Welcome to Modern C++Seok-joon Yun
 
[2015-07-20-윤석준] Oracle 성능 관리 2
[2015-07-20-윤석준] Oracle 성능 관리 2[2015-07-20-윤석준] Oracle 성능 관리 2
[2015-07-20-윤석준] Oracle 성능 관리 2Seok-joon Yun
 
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstatSeok-joon Yun
 
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4Seok-joon Yun
 

More from Seok-joon Yun (20)

Retrospective.2020 03
Retrospective.2020 03Retrospective.2020 03
Retrospective.2020 03
 
Sprint & Jira
Sprint & JiraSprint & Jira
Sprint & Jira
 
Eks.introduce.v2
Eks.introduce.v2Eks.introduce.v2
Eks.introduce.v2
 
Eks.introduce
Eks.introduceEks.introduce
Eks.introduce
 
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image ConverterAWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
 
아파트 시세,어쩌다 머신러닝까지
아파트 시세,어쩌다 머신러닝까지아파트 시세,어쩌다 머신러닝까지
아파트 시세,어쩌다 머신러닝까지
 
Pro typescript.ch07.Exception, Memory, Performance
Pro typescript.ch07.Exception, Memory, PerformancePro typescript.ch07.Exception, Memory, Performance
Pro typescript.ch07.Exception, Memory, Performance
 
Doing math with python.ch07
Doing math with python.ch07Doing math with python.ch07
Doing math with python.ch07
 
Doing math with python.ch06
Doing math with python.ch06Doing math with python.ch06
Doing math with python.ch06
 
Doing math with python.ch05
Doing math with python.ch05Doing math with python.ch05
Doing math with python.ch05
 
Doing math with python.ch04
Doing math with python.ch04Doing math with python.ch04
Doing math with python.ch04
 
Doing math with python.ch03
Doing math with python.ch03Doing math with python.ch03
Doing math with python.ch03
 
Doing mathwithpython.ch02
Doing mathwithpython.ch02Doing mathwithpython.ch02
Doing mathwithpython.ch02
 
Doing math with python.ch01
Doing math with python.ch01Doing math with python.ch01
Doing math with python.ch01
 
Pro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptPro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScript
 
C++ Concurrency in Action 9-2 Interrupting threads
C++ Concurrency in Action 9-2 Interrupting threadsC++ Concurrency in Action 9-2 Interrupting threads
C++ Concurrency in Action 9-2 Interrupting threads
 
Welcome to Modern C++
Welcome to Modern C++Welcome to Modern C++
Welcome to Modern C++
 
[2015-07-20-윤석준] Oracle 성능 관리 2
[2015-07-20-윤석준] Oracle 성능 관리 2[2015-07-20-윤석준] Oracle 성능 관리 2
[2015-07-20-윤석준] Oracle 성능 관리 2
 
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
 
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
[2015 07-06-윤석준] Oracle 성능 최적화 및 품질 고도화 4
 

[WareValley Orange DB Study][2015 03-20] Oracle architecture

  • 1. WareValley http://www.WareValley.com Database Audit and Protection [ DB 접근통제 ] Database Encryption [ DB 암호화 ] Database Vulnerability Assessment [ DB 취약점 분석 ] Database SQL Query Approval [ DB 작업결재 ] Database Performance Monitoring and Management [ DB 성능관리 및 개발 ] WareValley Oracle Architecture 오렌지팀 윤석준 선임연구원
  • 2. Database security and management, WareValley. http://www.WareValley.com Oracle Architecture User Process Listener Server Process User Process User Process User Process Server Process Server Process Server Process Instance SGA (System Global Area) Background Process Oracle Database Data Files Control Files Online Redo Log Offline Redo Log Feles Parameter FILE Password FILE PGA (Program Global Area) PGA (Program Global Area) PGA (Program Global Area) PGA (Program Global Area)
  • 3. Database security and management, WareValley. http://www.WareValley.com Oracle Memory Server Process Instance Background Process PGA (Program Global Area) SGA (System Global Area)  PGA (Program Global Area) - Process 혹은 Thread의 개별적인 메모리 공간 - 사용자마다 개별적으로 사용하는 공간  SGA (System Global Area) - Oracle Process 들이 접근하는 큰 공유 메모리 - Server Process 와 Background Process 가 공용으로 사용
  • 4. Database security and management, WareValley. http://www.WareValley.com Oracle Instance : PGA (Program Global Area) PGA 정렬 공간 (Sort Area) 변수 저장 공간 (Stack Space) 세션 정보 (Session Information) 커서 상태 정보 (Cursor State)  정렬 공간 : ORDER BY 또는 GROUP BY 등의 정렬을 수행하기 위한 공간이며 해당 공간에서만 정렬이 완료된다면 이를 메모리 정렬이라고 한다. 해당 정렬 메모리 공간이 부족하다면 디스크를 이용  세션 정보 : 서버 프로세스에 의해 추출된 결과 값을 전달하기 위해 필요한 유저 프로세스의 세션 정보를 저장  커서 상태 정보 : 해당 SQL 파싱(Parsing) 정보가 저장되어 있는 주소를 저장  변수 저장 공간 : SQL 문장에 바인드 변수(Bind Variable)를 사용 했을 경우 해당 바인드 변수를 저장하는 공간
  • 5. Database security and management, WareValley. http://www.WareValley.com Oracle Instance : SGA (System Global Area)  공용 메모리 영역으로 모든 사용자가 동일한 SGA를 사용  DB Buffer Cache : 빠른 입출력을 위해서 Datafile을 읽어서 Block 단위로 저장해 놓는 Cache Memory  Shared Pool - Data Dictionary Cache : Oracle Dictionary 정보를 저장해두는 Cache Memory - Library Cache : 사용자가 던진 SQL문과 Execution Plan을 저장해두는 Cache Memory  Redo Log Buffer : Datafile 과 Controlfile에 가해지는 모든 변경 사항을 저장  Large Pool : 선택적 Memory 영역으로, Backup, Parallel Processing, Redo Buffer 관리 등의 목적에 사용됨  Java Pool : 선택적 Memory 영역으로, Oracle JVM에 접속해있는 모든 세션의 Java Code가 사용  Stream Pool : 10g부터 지원되는 Oracle Stream (다른 DB로 Data 전달)에 사용 Redo Log BufferRECYCLE DEFAULT Data Buffer Cache SGA (System Global Area) Java Pool Large Pool Streams Pool Library Cache •SQL, SQL(recursive SQL) •Parse Test •Execution Plan Data Dictionary Cache •Row Cache •Object Information •Security Shared Pool Server Process Background Process
  • 6. Database security and management, WareValley. http://www.WareValley.com Shared Pool – Library Cache  사용자가 실행시키는 SQL 문장을 저장 Library Cache •SQL, SQL(recursive SQL) •Parse Test •Execution Plan Data Dictionary Cache •Row Cache •Object Information •Security Shared Pool SELECT * FROM Tbl WHERE ID = '1234'; -- e.g. Dynamic SQL SELECT * FROM Tbl WHERE ID = ‘5678';  위 2 SQL문은 다른 SQL문이라서 Shared SQL Pool에 따로 공간을 차지하게 된다.  뿐만 아니라 SQL Parsing 도 따로하고, Execution Plan도 따로따로… SELECT * FROM Tbl WHERE ID = :id; -- e.g. Static SQL  한 번의 Parsing 으로 만들어진 Execution Plan을 계속해서 재사용 한다.
  • 7. Database security and management, WareValley. http://www.WareValley.com Oracle Background Process Background Process PMON SMON DBWn CKPT LGWR ARCn etc  User 연결 유무와 상관없이 항상 Background로 실행  PMON (Process Monitor) : Server Process 관리. 잘못된 Process 파괴 및 자원해제, 잘못된 Transaction 문제 해결  SMON (System Monitor) : DBMS의 CEO. 모든 작업 총관리 ( 임시 세그먼트 정리, 딕셔너리 관리, 재시작시 복구 담당)  DBWn (Database Writer) : Memory 상의 변경이 일어난 Block을 디스크로 저장  CKPT (Check Point) : 모든 Control File과 Data File의 해더를 최근의 체크포인트 정보로 갱신 (저장된 Data를 일치시키는 작업)  LGWR (Log Writer) : 승인된 Transaction을 Redo Log File에 기록  ARCn (Archiver) : Database가 작동하는 동안 백업 작업을 수행  RECO (Recoverer Process) : 분산 시스템간의 Transaction 을 맞춰주는 역할 서울에 있는 은행과 부산에 있는 은행간에 이체 작업에서 물리적으로 다른 DB Server 간의 Two-phase Commit (양쪽 모두 Prepare-phase 한 뒤, 둘 다 Commit 한 것이 확인되지 않으면 RECO가 Rollback 시킨다.)
  • 8. Database security and management, WareValley. http://www.WareValley.com Database Writer BEGIN TRANSACTION; DELETE FROM Tbl1 WHERE ID < 200000; COMMIT;  위 실행문 중 가장 시간이 오래 걸리는 명령어는 ? => 다들 DELETE 라고 쉽게 말 할 것이다.  그럼 COMMIT는 ? => 눈깜짝하기도 전에 끝 !  만약 COMMIT을 하지 않고 Server를 Reboot 한다면 ? => 켜지는데 시간이 더 오래 걸린다. 일단 Disk에서는 지워지는 걸로… COMMIT 하기 전에 Disk에서는 이미 지워진 상태 이미 Disk에서는 지워졌지만, 어딘가에서 읽어서 ROLLBACK 작업을 수행 Data Buffer Cache LRU 작동 설명 Dirty Buffer(더티 버퍼) 변경은 완료되었지만 디스크에 기록되지 않은 버퍼 Pinned Buffer(사용중 버퍼) 변경중인 버퍼 Free Buffer(프리 버퍼) 변경이 완료된 후 디스크에 기록된 버퍼 Crean(제거버퍼) 삭제대상