진화하는데이터베이스 oracle 11g nf - dbguide.net§„화하는데이터베이스–oracle...

45
진화하는 데이터베이스 Oracle 11g NF 류점수 컨설턴트 ([email protected]) Technical Solution Consulting 한국 오라클 주식회사

Upload: lenguyet

Post on 27-May-2018

248 views

Category:

Documents


0 download

TRANSCRIPT

진화하는 데이터베이스 – Oracle 11g NF

류점수 컨설턴트 ([email protected])

Technical Solution Consulting

한국 오라클 주식회사

2Copyright© 2009, Oracle. All rights reserved.

Introduction

Manage ‘Change’

Real Application Testing

High Availability

Data management

New Technologies for Performance

Etc

Agenda

<Insert Picture Here>

3Copyright© 2009, Oracle. All rights reserved.

ORACLE : The Database Market Leader

Oracle

48.6%

IBM

20.7%

Microsoft

18.1% Other

12.6%

Source: Gartner DataQuest July 2008, based on

Total Software Revenue

Oracle

59.5%

IBM

16.9%

Microsoft

15.1% Other

8.5%

Source: IDC 2008, Korea DBMS Market Share by vendors,

2008 H1

Copyright© 2009, Oracle. All rights reserved.

Innovative Technologies

Oracle 2

Oracle 5

Oracle 6

Oracle 7

Oracle 8

Oracle 8i

Oracle 9i

Oracle 10g

1977 2007

Audit Vault

Database Vault

Grid Computing

Automatic Storage Mgmt

Self Managing Database

XML Database

Oracle Data Guard

Real Application Clusters

Flashback Query

Virtual Private Database

Built in Java VM

Partitioning Support

Built in Messaging

Object Relational Support

Multimedia Support

Data Warehousing Optimizations

Parallel Operations

Distributed SQL & Transaction Support

Cluster and MPP Support

Multi-version Read Consistency

Client/Server Support

Platform Portability

Commercial SQL Implementation

5Copyright© 2009, Oracle. All rights reserved.

New Paradigm : Oracle 11g

6Copyright© 2009, Oracle. All rights reserved.

Top Customer’s Concerns

Increasing Rate of Change and Pressure to Move Faster

Rate of Change

Cost

24/7 Availability

Complexity

Business Value

Security

Compliance

Alignment

Process integration

Outsource

0 10 20 30 40 50 60

Biggest Pressure

Second Biggest Pressure

응답비율

Source : Gartner (December 2006)

7Copyright© 2009, Oracle. All rights reserved.

Lifecycle of Change Management

Make Change

Set Up TestEnvironments

Test

Diagnose & Resolve Problems

Identify Patches & Workarounds

Diagnose & Manage Problems

Provision for Production

8Copyright© 2009, Oracle. All rights reserved.

Lifecycle of Change ManagementNew Change Assurance Capabilities

Capture andReplay Workload

Set Up TestEnvironments

Detect and TunePerformance Changes

Package Incidentsfor Support

Online ‘Hot’ Patching

Configure and Maintain Production System

Provision - Upgrade or Clone

9Copyright© 2009, Oracle. All rights reserved.

How to Manage Change

Real Application Testing

- Database Replay

- SQL Performance Analyzer

Using Standby Database (Active Data Guard)

Physical standby Snapshot standby

Go testing

Easy back

Rec

10Copyright© 2009, Oracle. All rights reserved.

<Insert Picture Here>

Manage ‘Change’

*

* The New Paradigm ;

Oracle Database 11g Manage Change

* Real Application Testing

The Best Solution for Managing Change !

11Copyright© 2009, Oracle. All rights reserved.

What is Real Application Testing

실제 운영 DB의 부하를 테스트 환경에서 재생함으로써,

변화된 상황(테스트 환경)을 미리 분석·진단하고 보완하는 솔루션

예측 가능한 변경관리를 통해 시스템 변경의 Risk 효율성

Enterprise Edition Option

2 Feature

- Database Replay (DB Replay)

- SQL Performance Analyzer (SPA)

12Copyright© 2009, Oracle. All rights reserved.

Database Replay

Analysis & Reporting

실제 운영DB의 부하를 테스트 환경에서 재생

운영환경이관전, 잠재적불안정성을찾고, 분석, 해결

Capture Workload in Product

- 실제부하와관련된모든정보(SQL,Timing, Concurrency)에 대한

녹화 파일 생성

- 녹화 파일을 테스트 시스템으로 이동

Replay Workload in Test

- 테스트 시스템에 필요한 변경 사항 반영후 녹화된 실제 부하 파일 재생

- Commit 순서 보장

Analyze & Report

- 에러, 데이터 불일치, 성능저하 등

<Insert Picture Here>

13Copyright© 2009, Oracle. All rights reserved.

Database Replay

PRODUCTION TEST

부하로드

파일

캡처 재생

Replay Driver

Replay에는응용프로그램

환경이필요없음

변경된테스트환경

clients

Middle Tier

Application 독립적인 실제 테스트 환경 구축

Capture ReplayAnalysis &

ReportingProcess

14Copyright© 2009, Oracle. All rights reserved.

Supported Changes

Changes

Unsupported

Changes Supported

•Database Upgrades, Patches

•Schema, Parameters

•RAC nodes, Interconnect

•OS Platforms, OS Upgrades

•CPU, Memory

•Storage

•Etc.

ClientClient

…Client

Middle Tier

Storage

Recording of External Client

Requests

15Copyright© 2009, Oracle. All rights reserved.

Database Replay Summary Report

16Copyright© 2009, Oracle. All rights reserved.

0

20

40

60

80

Tim

e T

ak

en

(D

ays)

Install & Setup Understand

Application

Usage

Identify Key

Transactions

Generate

Workload

Run Test

DB Replay

LoadRunner2

20

54

80

2420

DB Replay: ½ month

LoadRunner: 7 ½ months

Total Testing Time

500

Comparison of LoadRunner & DB Replay

Testing e-Business Suite

Copyright© 2009, Oracle. All rights reserved.

To:From:

Why DB Replay?

Complete workflowsPartial workflows

Low riskHigh risk

AutomatedManual intensive

Production workloadsArtificial workloads

Days of developmentMonths of development

150

Days

10

Days

17

18Copyright© 2009, Oracle. All rights reserved.

SQL Query Workload상의 변경 효과에 촛점

Capture SQL in Production

- 일정한주기동안 SQL workload를자동 Capture

- SQL text, plan, 바인드변수, 실행 통계등을 Capture (10gR2로부터 Capture가능)

- Capture한 SQL workload를 테스트시스템으로이동

Replay SQL in Test

- 변경 전후의 SQL을 replay

- performance 비교, 분석

- 성능 저하된 SQL을 SQL Tunning Advisor를 이용해 SQL profile변경 등으로 Performace

증가

SQL Performance Analyzer

<Insert Picture Here>

19Copyright© 2009, Oracle. All rights reserved.

SQL Performance Analyzer

……

ClientClient

…Client

Capture SQL

Middle Tier

Storage

Oracle DB

Re-execute SQL Queries

Production Test

Use SQL Tuning Advisor to tune regression

Optimzer 통계 및 Parameter 변화

Application Upgrade : 테이블 디자인변경, Index변화, SQL튜닝 등

OS, H/W, DB 환경 변화

20Copyright© 2009, Oracle. All rights reserved.

Compare Performance

Pre-Change Environment

Replay Production SQL and Gather Stats

Make Change

Post-Change Environment

Replay SQL

Tune SQL

Tuned Environment

SQL Tuning Advisor

Replay SQL

Replay Order

21Copyright© 2009, Oracle. All rights reserved.

SPA Report : Find Regressed SQL with SPA

22Copyright© 2009, Oracle. All rights reserved.

Real Application Testing Value

Value

- 테스트 비용 절감

- 테스트 품질 증가

Business Benefit

- 보다 빠른 기술 채택

- 보다 낮은 Risk

Remediate

Test

Deploy

Change

Solution for the Agile Business

23Copyright© 2009, Oracle. All rights reserved.

<Insert Picture Here>

High Availability

* Active Data Guard

Leading Maximum Availability

& used to Managing Change *

24Copyright© 2009, Oracle. All rights reserved.

Oracle Data Guard?

Oracle의 DR Solution으로, 재해, 에러, 데이터파손등모든장애로부터데이타베이스를보호하여 Service가계속되도록하는 Solution.

Online

Redo log

Standby

Redo Log

Datafile

Datafile

Production Stand-by

Log 자동전송전송된 REDO

Log 정보를쓴다

Failover

25Copyright© 2009, Oracle. All rights reserved.

VS. Traditional DR

Control

Files fil

Online

Logs

Archive

Logs

Flashback

Logs

Data

Files

SYSTEM

USER

TEMP

UNDO

Production DBMS Standby DBMS

Control

Files fil

Online

Logs

Archive

Logs

Flashback

Logs

Data

Files

SYSTEM

USER

TEMP

UNDO

Updates

Network I/O

Remote Mirroring

26Copyright© 2009, Oracle. All rights reserved.

Control

Files fil

Online

Logs

Archive

Logs

Flashback

Logs

Data

Files

SYSTEM

USER

TEMP

UNDO

Production DBMS Standby DBMS

Network I/O

Updates

Control

Files fil

Standby

Redo Logs

Archive

Logs

Flashback

Logs

Data

Files

SYSTEM

USER

TEMP

UNDO

7X less

data

volume*

27X fewer

network

I/Os*

Data Guard just Transport Redo

VS. Traditional DR

Control

Files fil

Online

Logs

Archive

Logs

Flashback

Logs

Data

Files

SYSTEM

USER

TEMP

UNDO

Production DBMS Standby DBMS

Network I/O

Updates

Apply

7X less

data

volume*

27X fewer

network

I/Os*

27Copyright© 2009, Oracle. All rights reserved.

Application, Backups, Reports run on production only

Traditional Physical Standby Databases

Why Called ‘Active’ Data Guard in 11g?

Standby Production

28Copyright© 2009, Oracle. All rights reserved.

Redo 적용과동시에 Physical Standby 에서 Read-Only Query가가능- Query 결과의정합성보장

- 모든데이터형식적용가능하나, Logical Standby와 같은 DML작업은불가

Test를통한 Manage Change

Why Called ‘Active’ Data Guard in 11g?

Physical Standby의실시간질의

StandbyProduction Test Change!

29Copyright© 2009, Oracle. All rights reserved.

Back out

Changes

Physical Standby Apply

Logs

Snapshot Standby Perform

Testing

Open

Database

Continuous Redo Shipping

Snapshot Standby를 이용한 테스트 환경구축

Physical Standby Snapshot Standby

- 테스트를위해쓰기가능하게 Open

- alter database convert to snapshot standby;

Physical Standby로복귀용이- 테스트자료자동제거

- alter database convert to physical standby;

Data 유실없는테스트유지

기타- 본래의 DR기능외에도과부하가걸릴수 있는

Reporting 용도로사용할수 있음.

- Index구조변경, SQL 튜닝등 Application테스트

수행활용

30Copyright© 2009, Oracle. All rights reserved.

StandbyStandbyTime

3

1. Convert to Snapshot Standby

2. Use Snapshot Standby

3. Convert to Physical Standby

Apply Archive Logs

Standby

Standby

Time

Read/Write Read/Write Read/Write

1 2

…Replay Driver

Replay Driver

Apply Redo

Use With Real Application Testing

31Copyright© 2009, Oracle. All rights reserved.

queries queries

Active Data Guard Reader Farm

Production

Database

queriesupdates

Standby

Database

Using Oracle RAC

DR included *

queries queries

Example With RAC

32Copyright© 2009, Oracle. All rights reserved.

<Insert Picture Here>

Automatic System

Management

* Automatic performance Tunning &

Database Management

*

33Copyright© 2009, Oracle. All rights reserved.

Auto-Tuning

Advisory

Instrumentation

Self-Managing Database

34Copyright© 2009, Oracle. All rights reserved.

Untunable

PGA

Free

Buffer cache

Large pool

Shared pool

Java pool

Streams pool

SQL Areas

Other SGA

SGA Target

PGA Target

Buffer cache

Large pool

Shared pool

Java pool

Streams pool

SQL Areas

Other SGA

Untunable

PGA

Free

OLTP BATCH BATCH

Buffer cache

Large pool

Shared pool

Java pool

Streams pool

Other SGA

SQL Areas

Untunable

PGA

10g &1 1g 11g

Memory Target

SGA Target

PGA Target

Automatic Memory Tuning

35Copyright© 2009, Oracle. All rights reserved.

Well-tuned SQL

Packaged

AppsCustomizable

Apps

Advisor Report

Automatic SQL Tuning

Index, Stats, Structure Analysis

Test Execute

SQL Profiles

Implement

Automatic

High-Load SQL

AWR

Nightly

SQL Profiling

Manual

Automatic SQL Tunning

응답시간, 처리량, 처리주기등을기준으로

과부하 SQL을 자동선별

SQL Profile생성으로 SQL 자동튜닝

튜닝한 plan이성능 향상되었는지검증하기

위한자동테스트 실행

자동구현및 실행

잘못된구조,오래된통계, 빈약한구조의 SQL

자동리포팅

36Copyright© 2009, Oracle. All rights reserved.

SQL Tuning in Oracle Database 10g

Workload

SQL Tuning

Candidates

SQL Tuning Advisor

ADDM

AWR

one hour

Generate

Recommendations

DBA

Invoke

Advisor

Implement

DBA

자동화된 것들도 있으나,

여전히 DBA는 필요하다

Evaluate

Recommendations

DBA

37Copyright© 2009, Oracle. All rights reserved.

Automatic SQL Tuning in Oracle 11g

It’s Automatic!

Choose

Candidate

SQLone

week

Workload

SQL Tuning

Candidates

Test SQL ProfilesImplement

SQL Profiles

Generate

Recommendations

AWRDBA

View Reports

/ Control

Process

38Copyright© 2009, Oracle. All rights reserved.

Animated SQL Monitor (11gR2)

39Copyright© 2009, Oracle. All rights reserved.

Self-Diagnostic Engine

Database-Level ADDM

Instance-Level ADDMs

Node 1 Node 2 Node 3

ADDM for RAC

RAC 전반에걸친진단

매시간자동기동

Cluster Level의분석- Global Cache Interconnect 이슈

- Lock Manager 폭주이슈

- Global Resource 경합(IO bandwidth, hot block 등)

- high-Load SQL in Global

- Instance Response time 저하문제등

40Copyright© 2009, Oracle. All rights reserved.

Index, MV Analysis

Well-Designed

Schema

SQL Workload

Packaged

Apps

Customizable

Apps

Access Advisor

Index, MV Advice

Partition

Analysis

Partition

Advice

Access Advisor를통한 Partition Advise

- Parititioning 기법권고

(Range/Range Key, Interval/Interval Key,

Hash/Hash Key)

- Table, Index, MView에 대한 Partition advise

- 전체 query와 DML workload에서 query 성능

이증가하도록고려

Automatic Interval Partition 생성- 첫번째 Insert 시

- Date나 Number 타입의일정한 Interval

- Range 파티션테이블을 Interval로 전환가능

- 하나의테이블에서 Range와 Interval 공존가능

Easy Partition Management

41Copyright© 2009, Oracle. All rights reserved.

Duplicate

Bug?

Yes

EM Support Workbench:

Apply Patch or Workaround

Repair Advisors

No

EM Support Workbench:

Package Incident &

Configuration Information

Repair Advisors

Auto Incident Creation

First-Failure Capture

Critical

Error

Alert DBA

Targeted Health Checks

1 2

34

Reduce Time to Problem Resolution

Automatic Diagnostic Workflow

Automatic Diagnostic

Repository

DBA

DBADBA

42Copyright© 2009, Oracle. All rights reserved.

Etc : Online Changes

빠른컬럼(default value) 추가- dafault 값을모든 row에 update할 필요없음

- 테이블컬럼추가시 관련된 Object 의 재컴파일필요없음

Invisible Index

- 생성완료혹은테스트완료전 Index 사용을못하게…

DML 중단없는 Index 생성

더쉬워진 online 상의테이블 DDL

- 실행중인 DML문이 Abort 대신 wait하게 처리가능

기타패키지에프로시져추가시연관된 Object 역시재컴파일필요없음

<Insert Picture Here>

43Copyright© 2009, Oracle. All rights reserved.

Etc : Online Patching of One-off Patches

Rolling patches

- Oracle은 이미클러스터환경하에이를지원

The Next Major release :

Oracle instance의 다운타임없이 online 패치가

가능하게함

- Opatch로 통합

- 많은 one-off 패치가온라인상에서가능

- 추가적으로 CPU(Critical Patch Updates)패치가능기대

44Copyright© 2009, Oracle. All rights reserved.

*

Summary

Oracle Database 11g는

환경변화에손쉽게대응할수 있는여러기술들을제공합니다.

안전하고도실용적인 DR Solution을 제공합니다.

보다자동화되고, 발전된관리기능으로

운영환경변화에손쉽게대처할수 있게하고,

관리비용을절감해드립니다.

*

45Copyright© 2009, Oracle. All rights reserved.

Q U E S T I O N S

A N S W E R S