achieving the holy grail of rolling database upgrades ... · pdf filerolling database...

21
Achieving the Holy Grail of Achieving the Holy Grail of Rolling Database Upgrades Rolling Database Upgrades: User Perspective September, 25 2008 Kenney Snell DBA UPS 1

Upload: vokhanh

Post on 31-Jan-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Achieving the Holy Grail of Achieving the Holy Grail of Rolling Database UpgradesRolling Database Upgrades: User Perspective

September, 25 2008

Kenney SnellDBA

UPS 11

Page 2: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

• UPS2

• UPS was founded by Jim Casey in Seattle Washington in 1907 • UPS has become an expert in transportation, growing from a small messenger

company to a leading provider of air, ocean, ground, and electronic services.• 9th Largest Airline in the world• UPS WorldportSM is the largest fully automated package handling facility in the

world and serves as the airlines all-points international air hub. UPS serves nearly 800 airports worldwide.

Page 3: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

WorldportSM, Louisville, Kentucky

• UPS3

Page 4: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

UPS Airlines 20th Anniversary

January 25, 1988• UPS Airlines is certified by the Federal Aviation Administration

February 1, 1988• UPS Airlines operates its first flights

4

Page 5: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

ObjectivesRolling Database Upgrade Process

Using the Transient Logical• Test the upgrade process in a UPS lab / development environment

• Integrate and certify the upgrade process in a UPS “real world”

application product test environment

• Document and add the upgrade process to our strategy for

performing database upgrades

• UPS 5

Page 6: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Agenda

Introduction

Business Case: Rolling Database Upgrade

Testing Environment: Rolling Database Upgrade (Transient)

Critical Tasks Failures / Fallback Options (Transient)

What we learned – UPS Application

• UPS 6

Page 7: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Business Case – Rolling Database Upgrade

15

4

55

4

0

10

20

30

40

50

60

Min

ute

s

10.2.0.3 to 10.2.0.4 10.2.0.4 to 11.1.0.6

Upgrade Rolling Upgrade

Total Application Downtime• Focus on High Availability and

Disaster Recovery• Unplanned AND Planned outages

• Planned Downtime Service Level Agreement (SLA)• Maximum allowed downtime for

any single event is 15 minutes

• Impossible to achieve using traditional methods when upgrading to Oracle 11g

• Rolling database upgrades achieve our SLA with time to spare

SLA

7• UPS

Page 8: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Testing Lab Environment

Equipment• Compaq DL-585-G2 servers • Red Hat Enterprise Linux 5.1 • HP Service Guard clustered database environmentOracle Binaries• Patchset Release Oracle 10.2.0.3 to 10.2.0.4 (64 bit)• Full Release Oracle 10.2.0.4 upgraded to 11.1.0.6 (64 bit)Databases• Data Guard (A B)• Streams (A E)Applications• Java 1.5 with Swingbench (Order entry application)

• UPS8

Page 9: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Testing Lab Environment

• UPS9

Application Server Tier Database Server Tier

Application Server Tier

Primary Site

Alternate Site

Clients

Clients

Primary

Physical Standby

Application

Application

Database: A Version: X

Database: B Version: X

Database Server Tier

REDO

Full Backups

Full Backups

LOGRep.C

D

Log Repository

Log Repository

Streams EA

B Streams E

Page 10: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Critical Tasks Failures / Fallback Options Using Transient Logical

Critical Tasks Failures Fallback Options

1. Conversion of the physical to logical (Database B) fails

Physical Standby Restore (Database B)

2. Upgrade logical Standby (Database B) fails

Downgrade or Flashback (Database B)

3. Testing Fails: application, data, database (Database B)

Physical Standby Restore (Database B)

4. B. Upgrade physical Standby (Database A) fails

Recreate Physical Standby from Backup

5. Testing Fails: application, data, database (Database A)

Downgrade

4. A. Conversion of Logical to Physical fails (Database A)

Recreate Physical Standby from Backup

• UPS10

Page 11: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

3. Application Testing / Verification Fails (B)

2008 • UPS11

A B

DG

Version: X

REDO

Version: X

Clients

1. Conversion (SQL Apply)

S1 S2

A B

Version: X Version: X +1

Clients

2. Upgrade B to X + 1

S1 S2

A B

DG

Version: X

REDO

Version: X + 1

Clients

3. Run in Mixed Mode

S1 S2

A B

DG

Version: X + 1

REDO

Version: X + 1

Clients

4. Switchover to B and Upgrade A to X + 1

S1 S2

FailureRestore Physical Standby

from Backups

Full Backups

Page 12: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Database, Site Failures / Fallback Options Using Transient Logical

Critical Tasks Failures Fallback Options

2. Primary (Database A) –Database or Site Failure

Failover to Database B and use Log Repository D

4. Primary (Database B) –Database or Site Failure

Failover to Database A and use Log Repository C

2008 • UPS12

Page 13: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

2. Primary Site Fails During Upgrade of B

A B

DG

Version: X

REDO

Version: X

Clients

1. Conversion (SQL Apply)

S1 S2

A B

Version: X Version: X +1

Clients

2. Upgrade B to X + 1

S1 S2

A B

DG

Version: X

REDO

Version: X + 1

Clients

3. Run in Mixed Mode

S1 S2

A B

DG

Version: X + 1

REDO

Version: X + 1

Clients

4. Switchover to B and Upgrade A to X + 1

S1 S2

D

Log Repository

REDO

2008 • UPS13

Failure

Failover to B

Register Logs (D)

into B

Clients

Recover B

Page 14: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

UPS Application Architecture

Application• Flight Operations and Scheduling• Runs in two data centers (800+ miles apart)

Equipment• PROLIANT DL585 G1 servers• Red Hat Enterprise Linux 4.X 64 bit• HP Service Guard clustered environment

Application Servers• 4 BEA Servers, 64 bit ( MQ / WLS 9.2)• JDBC Multi Data Source• Application (JVM)

Database Servers• 4 Database Servers, Oracle 10.2.0.3 64 bit• Data Guard (p100 p100b)• Streams (p100 P200), P200 –DG P200b

2008 • UPS14

Page 15: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

© 2008 Oracle 15

UPS Application / ArchitecturePrimary Data Center Alternate Data Center (DR)

Queues

MCSGuard

BEA Application Server

Server #1 Server #2 Queues

Server #3 DR Passive

MCSGuard

BEA Application Server

AIR – p100

BEA Application Server BEA Application Server

• AIR DR – p100b

Database Server

Data Guard

MCSGuard MCSGuard

MQ MQ Server #4 DR Passive

Server #7 Server #8

Database Server Database Server Database Server

Server #5 Server #6

url>...:@(...HOST= p100 </

url>...:@(...HOST= p100b </

Mainframe Systems

Mainframe Systems

• Reporting – p200

Streams

• Reporting DR – p200b

Streams

Data Guard

2008 • UPS15

Page 16: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

What we learned – UPS Application

• Tested a Rolling Upgrade with the UPS Application• Changed Application Database Connections

• From BEA’s Multi Data Source to Oracle’s servicesDatabase Triggers (startup and role change),Database Service, andConnect string uses primary and standby database VIPs with a single service name

• Used same application servers during the database switchover• Tested switchover with the application running

(no need to stop or restart the application)• Performed database upgrades in < 4 min. of application downtime

2008 • UPS16

Page 17: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

© 2008 Oracle 17

UPS Application / ArchitecturePrimary Data Center Alternate Data Center (DR)

Queues

MCSGuard

Server #1 Server #2 Queues

Server #3 DR Passive

MCSGuard

AIR – p100 • AIR DR – p100b

Database Server

Data Guard

MCSGuard MCSGuard

MQ MQ Server #4 DR Passive

Server #7 Server #8

Database Server Database Server Database Server

Server #5 Server #6

url>...:

@(...HOST= p100...HOST = p100b...Service = AIR </

url>...:

@(...HOST= p100...HOST = p100b...Service = AIR </

Mainframe Systems

Mainframe Systems

• Reporting – p200

Streams

• Reporting DR – p200b

Streams

Data Guard

ServiceAIR Triggers Service Triggers

BEA Application Server BEA Application Server BEA Application Server BEA Application Server

2008 • UPS17

Page 18: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

© 2008 Oracle 18

UPS Application / DG SwitchoverPrimary Data Center Alternate Data Center (DR)

Queues

MCSGuard

Server #1 Server #2 Queues

Server #3 DR Passive

MCSGuard

AIR – p100 • AIR DR – p100b

Database Server

Data Guard

MCSGuard MCSGuard

MQ MQ Server #4 DR Passive

Server #7 Server #8

Database Server Database Server Database Server

Server #5 Server #6

url>...:

@(...HOST= p100...HOST = p100b...Service = AIR </

url>...:

@(...HOST= p100...HOST = p100b...Service = AIR </

Mainframe Systems

Mainframe Systems

• Reporting – p200

Streams

• Reporting DR – p200b

Streams

Data Guard

ServiceAIR

TriggersService Triggers

BEA Application Server BEA Application Server BEA Application Server BEA Application Server

2008 • UPS18

Page 19: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Data Guard and Streams - Rolling Upgrade

• Tested Configuration included a Streams Data Capture target

• Streams metadata has unsupported data types for SQL APPLY• Anydata, ROWID, AQ$_* and

• Unsupported PL/SQL: DBMS_AQ

• Method: Transient Logical Standby• Updated Required Checkpoint SCN

• Stopped Streams Capture prior to Rolling Upgrade

• Register Archived Logs after converting Logical to Physical

• RMAN> CATALOG RECOVERY AREA;

• Restarted Streams Capture after Rolling Upgrade

2008 • UPS19

Page 20: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

Benefits: Rolling Database Upgrade

Proved the upgrade process works using a transient logical• Patchset Release - 10.2.0.3.0 to 10.2.0.4.0

• Full Release - 10.2.0.4.0 to 11.1.0.6.0

Configured the UPS application for database re-connectivity• Streamlines the DG and business application switchover

• Allows the business application to continue running which supports the SLA

Proved upgrade process works when Streams is part of the environment

Reduced application outage time to 4 minutes • Outage represents the DG Switchover

2008 • UPS20

Page 21: Achieving the Holy Grail of Rolling Database Upgrades ... · PDF fileRolling Database Upgrades: User Perspective September, ... Primary Site Fails During Upgrade of B A B DG Version:

© 2008 Oracle 21

Benefits: Application Outage Savings

15

4

55

4

0

10

20

30

40

50

60

Min

ute

s

10.2.0.3 to 10.2.0.4 10.2.0.4 to 11.1.0.6

Upgrade Rolling Upgrade

Total Application Downtime • Data Guard rolling database upgrades achieve our SLA with time to spare

SLA

21• UPS