Professional Documents
Culture Documents
Server 1
Instance ‘A’
Database
‘A’
y 多主機
y 共享儲存設備
y 需安裝叢集軟體
(Clusterware )
– HP MC/Service
Server 1 Server 2 Guard
Instance ‘A’ – IBM HACMP
– Sun Cluster
– Linux Cluster
Database
‘A’
• Active/Passive模式
y 備援主機平常閒
置(無法提供服務
給前端使用者)
Server 1 Server 2
Instance ‘A’ y 資料庫系統回復
時間較長
y 系統無法負荷時,
Database 無法以增加主機
‘A’ 方式達到延展性,
只能擴充單台主
Restart single instance on Server 2 機本身配備
需在第二台主機重新啟動資料庫
7
Host-based Mirroring
Primary Application Secondary
Site Access Site
Database
Server
y 備援主機閒置
Volume Manager /
Specialized Host-based y 資料傳輸時雙方主
Driver Mirroring 機負載較重
y 佔據網路頻寬
y 資料傳輸效能不好
y 資料庫系統回復時
間長
Storage
Array
8
Hardware Mirroring
Primary Application Secondary
Site Access Site
Database
Server
y 備援主機閒置
y 佔據較大網路頻寬
y 兩邊資料完全相同
(正確與錯誤都抄)
y 資料庫系統回復時
Hardware-based
間長
Mirroring
Storage
y 價格昂貴
Array
9
Oracle Real Application Clusters 架構
• Active/Active
• H/W 及 S/W
handle
Server 1 Server 2
Instance ‘A’ Instance ‘A’
Database
‘A’
Protect
SERVER failure from
- your SERVER
database failures
remains available
透過備援來保護資料庫主機
主機當機 , 但是另一台主機與資料庫持續運作
10
Capacity Planning …
3 6 9 12 15 18 21 24
Months
… vs Capacity on Demand
y Initial workload with RAC
W
300%
o
r
200%
k
l
100%
o
d
3 6 9 12 15 18 21 24
Months
… etc …
3 6 9 12 15 18 21 24
Months
… etc …
New
Newserver
serveradded
added
to cluster is
to cluster is
purchased
purchasedat
y Scaling out with RAC present
presentday
at
dayprices
prices
W
300%
o
r
200%
k
l
100%
o
d
3 6 9 12 15 18 21 24
Months
June 2001 ~ Dec 2005
15
Real Application Clusters: Proven
16
Oracle 10g RAC 效益
y Preserves your investment(保障現有的投資)
– Start small, grow incrementally
– Availability AND Scalability
y Brings reliability to your applications(提高應用程
式的可靠度)
– Makes all applications “unbreakable”
– Fastest Failover from System Failures
y Easy to Align with Business Priorities(依企業成長
來投資硬體資源)
17
References
18
RAC Customer References
(High Tech)
y 茂德
– 9i; MES; 3 node
y 友達
– 9i; Data Warehouse, MES, ERP; HP(HP-UX), 3 x 2-node
y 奇美
– 9i; MES, IBM(AIX, Linux), 3 x 2-node
y 力特光電
– 9i; ERP&MES(桃園), MES(南科); 2 x 2-node (桃園廠亦有
Data Guard)
19
RAC Customer References
(Retail)
公司名稱 系統說明 系統平台 備註
統一超商 後台財務系統 2 Node
四平興業 ERP HP 2 Node, Linux
PC HOME 電子商務 2 Node, Linux
富邦媒體科技 電視購物 IBM, 2 Node, 4*4
(MOMO)
20
RAC Customer References
(Transportation)
公司名稱 系統說明 系統平台 備註
台鐵 售票系統(第三 2 Node, 8*8
代語音系統)
台北捷運 GIS HP, 2 Node, 2*2
長榮海運 ERP IBM, 2 Node
21
RAC Customer References
(Healthcare)
公司名稱 系統說明 系統平台 備註
三軍總醫院 HIS NT,2 Node
亞東醫院 HIS 2 Node, Linux 10g
萬芳醫院 HIS Sun, 2 Node
22
RAC Customer References
(Government)
公司名稱 系統說明 系統平台 備註
財政部財稅中心 稅籍資料 HP SD (7/1), 2
Node
星動科技 電子交易平台 IBM, 2 Node
23
RAC Customer References
公司名稱 系統說明 系統平台 備註
台灣寬頻(有線 MIS IBM, 2Node
電視)
新光保全 安全監控平台 IBM, 2 Node * 4
24
Competition – SQL Server
25
Federated Databases
y 維護問題
– 資料分配及整合問題(MD, Table Join,Trigger)
– DB Server 需分開備份
– Lost Node ? Add Node ?
y 效能問題
– User A connect Local data , OK
– User A connect remote Data ,Poor Performances
y 不同 Database
Server, 不同資
料庫檔案
y 資料分散於不
同資料庫, 透
Data Data Data Data 過磁碟連接可
A-E F-K L-S T-Z 以互通
26
Competition – DB2
27
Shared Nothing Databases
y 維護問題
– 資料分配及整合問題(MD, Table Join,Trigger)
– DB Server 需分開備份
– Lost Node ? Add Node ?
y 效能問題
– Query need to be broadcasted to all the node
– For OLAP , not for OLTP
y 單一 Database
Server
y 資料分散於不
同磁碟
28
Agenda(議程)
y Real Application Cluster (叢集資料庫)
y Data Guard(資料守護神)
y Partition(資料庫的資料分割技術)
y Data On-Line Recovery (資料即時回復功
能)
y Automatic Storage Management(自動儲存
管理)
y Q&A
Oracle 10g Data Guard (資料守護神)
Primary Server Standby Server
運作資料庫主機 備援資料庫主機
Clients
Log Data
運作中
資料庫
Production Data Guard Broker Standby 備援資料
Database Database 庫
31
Oracle 10g Data Guard 架構 (資料守護神)
Physical Standby
Database
Sync or Async
Redo Shipping Backup
Production
Database Redo Apply
DIGITAL DATA STORAGE
Network
Broker
Logical Standby
Transform Database Open for
Redo to SQL Reports
SQL
Apply
Additional
Indexes & MVs
32
Oracle 10g Data Guard(資料守護神)
Standby Databases 用途
Read-Only / Read-Write
(可唯讀或完整存取模式)
Standby Reporting (
Server 報表伺服器
)
Backups(
Tape
備份)
備援主機同時 執行數個 備
Primary Standby 援資料庫的任務(此備援主
Database Database 機需有足夠的硬體架構)
備援區
34
Oracle 異地備援解決方案- Data Guard效益
y 建置成本低
– 異地端只需要資料庫硬體及軟體費用,不需額外費用
y 具備異地備援及資料庫備援的解決方案
y 具備雙向的異地備援機制
– 原有資料庫與異地備援資料庫可以角色互換
y 異地備援資料庫端可作為
– 資料庫備份用途
– 報表資料庫伺服器
y 比其他異地備援解決方案使用更少的網路頻寬
35
Agenda(議程)
y Real Application Cluster (叢集資料庫)
y Data Guard(資料守護神)
y Partition(資料庫的資料分割技術)
y Data On-Line Recovery (資料庫資料即時
回復功能)
y Automatic Storage Management(自動儲存
管理)
y Q&A
What is the Partitioning ?(資
料分割技術)
應用系統角度:
Application 所有資料集中於單一 Table資
SQL 料
Sales
Jan Mar
Feb 資料庫管理員角度:
所有資料分散於許多小的
Table, 易於管理,增加查詢效
能
When to use Partitioning?(何時
使用資料分割技術)
y 適用於不同的應用系統:
– OLTP(線上交易) & Internet Computing(網際網路交易系統)
– Data Warehousing & Data Marts (資料倉儲系統)
y 適用於資料大或成長快速資料
– 資料量大之歷史交易性資料(歷史性資料-客戶交易資料)
– 依時間成長快速資料(庫存交易資料,傳票資料,銷售交易資料
,採購細項資料)
y 應用系統需求
– 加快批次處理速度
– 順序將歷史資料 Partition 移出資料庫並加入新的Partition
Partitioning in Oracle
Database
Hash
1 1000 2000
Composite Sub -1
Sub-1
Composite Sub -2
Sub-2
Sub -3
Sub-3
Sub -4 ...
Sub-4
39
Oracle Database Partitioning
y Range, Hash, Composite, List 方法
台北 中壢 台中 高雄
1∼3月
原始資料 (orderdate)
4∼6月
(orderdate)
7∼9月
(orderdate)
10∼12月
(orderdate)
40
Partition 增進查詢效能
1∼3月
(orderdate)
5月份銷售 4∼6月
資料 (orderdate)
10∼12月
SELECT sal FROM sales (orderdate)
WHERE sdate >= to_date(‘2000-05-01’,’YYYY-MM-DD’)
AND sdate <= to_date(‘2000-05-31’,’YYYY-MM-DD’);
41
Oracle Partitioning 效益
y 降低管理資料庫系統成本
– 分門別類的管理大量資料
– 提高系統可用性
– 依時間順序將歷史資料轉出及轉入
y 增加資料庫運作效益
– 提昇資料庫查詢效能,
– 延長機器升級時間(Migration)
Agenda(議程)
y Real Application Cluster (叢集資料庫)
y Data Guard(資料守護神)
y Partition(資料庫的資料分割技術)
y Data On-Line Recovery (資料庫資料即時
回復功能)
y Automatic Storage Management(自動儲存
管理)
y Q&A
Human Error (人為疏忽)
Human
Errors
Other
Downtime
y Goal is to quickly analyze and repair
– For Localized damage (單一筆資料錯誤)
y Example – deleted wrong order
(刪除單一筆交易資料,修改訂單單價)
– For Widespread damage (區域性錯誤)
y Example – batch job deletes this month’s orders
(刪除整個月訂單, 透過批次作業修改 數個相關
Table)
44
Flashback Database
y A new strategy for point in time recovery
y Flashback Log captures old versions of
changed blocks
– Think of it as a continuous backup
– Replay log to restore DB to time
Disk Write
– Restores just changed blocks
45
Flashback 分類及說明
回復層級 回復狀況 對應 FlashBack 指令
Database 資料庫層級 刪除使用者,清除 FlashBack Database
Table,透過批次方式
Customer 異動數個 Table
46
Flashback Time Navigation
y Flashback Query (查詢之前某一時間點的資料)
– Query all data at point in time
Select * from Emp AS OF ‘2:00 P.M.’
where …
47
Agenda(議程)
y Real Application Cluster (叢集資料庫)
y Data Guard(資料守護神)
y Partition(資料庫的資料分割技術)
y Data On-Line Recovery (資料庫資料即時
回復功能)
y Automatic Storage Management(自動儲存
管理)
y Q&A
Automatic Storage Management
y Eliminates need for conventional
file system and volume manager (
不需要檔案系統及磁碟卷冊管理 for
Oracle)
y Capacity on demand (儲存資源依
需求增加或刪除)
– Add/drop disks online
y Automatic I/O load balancing(自動
的 I/O 寫入平衡)
– Stripes data across disks to
balance load
– Best I/O throughput
Automatic Storage
Management y Automatic mirroring (磁碟鏡射)
49
Automatic Storage Management
TODAY ASM
Tables Tables
Tablespace Tablespace
0010 0010 0010 0010 0010
Files 0010 0010 0010 0010 0010
Files
File System File System ASM
Logical Vols Logical Vols
Disks Disk Group
50
ASM – How it Works
y No volumes: just a pool of
storage
y Partitions total disk space
into uniform sized
megabyte units
Automatic Storage
Management
51
ASM – How it Works
y No volumes: just a pool of
storage
y Partitions total disk space
into uniform sized
megabyte units
y Efficient, online add/remove
of disk with automatic
rebalancing
Automatic Storage
Management
52
ASM – How it Works
y No volumes: just a pool of
storage
y Partitions total disk space
into uniform sized
megabyte units
y Efficient, online add/remove
of disk with automatic
rebalancing
Automatic Storage
Management
53
ASM 效益
Lower management costs(減少儲存設備管理成本)
– Doing more with less
– Automation of manual tasks
y Improved resource utilization(增進資源使用率)
– Consolidation
– Increase performance
y Reduced downtime(減少 downtime 時間)
– Fewer unplanned outages
– Optimized provisioning
54
Q U E S T I O N S
A N S W E R S
The End
56