Вы находитесь на странице: 1из 17

1

Seminar: Oracle Database

Ngi trnh by: ng Xun Duy

Copyright 2009, Oracle. All rights reserved.


Ni dung

Kin trc Oracle Database


Best Practice khi trin khai Oracle Database
Monitor v Tuning Oracle Database

1-2 Copyright 2009, Oracle. All rights reserved.


Phn 1: Kin trc Oracle Database

1-3 Copyright 2009, Oracle. All rights reserved.


Oracle Database Server Architecture:
Overview

Instance
PGA
Server
process Memory Structures
(System Global Area)

Server
Process Structures

User
process

Database (Storage Structures)


Client

1-4 Copyright 2009, Oracle. All rights reserved.


Instance: Database Configurations

Nonclustered System Clustered System

I1
I1 I2 I3
I2

D1

D2

Local D
Storage

Shared Storage

1-5 Copyright 2009, Oracle. All rights reserved.


Oracle Database Memory Structures

Program Global Area (PGA) PGA


Stack User Stack User
Space Global Space Global
Area Area
Server Server
process 1 process 2

KEEP
Database buffer pool
Redo log
Shared pool buffer
buffer
cache RECYCLE
buffer pool
Streams nK buffer
Large pool Java pool
pool cache

System Global Area (SGA)

1-6 Copyright 2009, Oracle. All rights reserved.


Program Global Area (PGA)

PGA Cursor Sort Hash


Area Area
State
Stack User
Create Bitmap Area
Space Global User Session
Area Data Bitmap Merge Area
Server
process 1
SQL
Working Areas

KEEP
Database buffer pool
Redo log
Shared pool buffer
buffer
cache RECYCLE
buffer pool
Streams nK buffer
Large pool Java pool
pool cache

System Global Area (SGA)

1-7 Copyright 2009, Oracle. All rights reserved.


Process Structures

Instances (ASM and Database separate)

System Global Area (SGA)


PGA
Server Background processes
process
Required: DBWn CKPT LGWR SMON PMON RECO

Listener Optional: ARCn ASMB RBAL Others

Grid Infrastructure Processes


(ASM and Oracle Restart)
User ohas ocssd diskmon
process

orarootagent oraagent cssdagent

1-8 Copyright 2009, Oracle. All rights reserved.


Database Storage Architecture

Control files Data files Online redo log files

Parameter file Backup files Archived redo log


files

Password file Alert log and trace files

1-9 Copyright 2009, Oracle. All rights reserved.


Logical and Physical Database Structures

Logical Physical

Database

Tablespace Data file

Segment
Storage System
SAN NFS
Extent
NAS ASM
Exadata RAW
Oracle data File System
block

1 - 10 Copyright 2009, Oracle. All rights reserved.


Starting Up an Oracle Database Instance:
NOMOUNT

OPEN
STARTUP

MOUNT

NOMOUNT

Instance
started
SHUTDOWN

1 - 11 Copyright 2009, Oracle. All rights reserved.


Establishing Net Connections

To make a client or middle-tier connection, Oracle Net requires


the client to know the:
Host where the listener is running
Port that the listener is monitoring
Protocol that the listener is using
Name of the service that the listener is handling

Names resolution

1 - 12 Copyright 2009, Oracle. All rights reserved.


Phn 2: Best Practice khi trin khai Oracle

1 - 13 Copyright 2009, Oracle. All rights reserved.


Best Practice (OS + Storage)

Cu hnh /u01 trn SAN v tch bit vi root (/).


Cu hnh tnh nng HugePages i vi Server c RAM ln
Cu hnh lu tr trn ASM.
Cn cu hnh 3 diskgroup c bn:
t Voting, OCR sang 1 diskgroup ring ti thiu 3 a, mi
a 5G, c Redanduncy l NORMAL hoc HIGH, AU Size
1M.
1 Diskgroup cha d liu, Redanduncy l EXTERNAL, AU
Size cho diskgroup ti thiu l 4M.
1 Diskgroup cha archive log v backup, Redundancy l
External, AU Size ti thiu l 4M.
Ngoi ra, nn t Redo log sang 1 diskgroup c tc cao
nht.

1 - 14 Copyright 2009, Oracle. All rights reserved.


Best Practice (Database)

Kch hot Archive log mode v t script xa archive log.


Cp pht sn dung lng cho cc tablespace quan trng
Thi gian u, TEMP v UNDO tablespace theo kiu
Autoextend.
Bt chc nng flashback.
iu chnh cc tham s quy nh SGA, PGA, Memory
iu chnh kch thc v s lng cc Redo log group.
iu chnh cc tham s db_files, sessions, processes,
open_cursors.
Cu hnh gi tr cc tham s db_create_file_dest,
db_recovery_file_dest, db_recovery_file_dest_size.

1 - 15 Copyright 2009, Oracle. All rights reserved.


Phn 3: Monitor v Tuning Database

1 - 16 Copyright 2009, Oracle. All rights reserved.


Cng c

Toad
AWR
ADDM
OSWatcher

1 - 17 Copyright 2009, Oracle. All rights reserved.

Вам также может понравиться