Professional Documents
Culture Documents
Oracle Active Data Guard Rolling Upgrade
Oracle Active Data Guard Rolling Upgrade
Joydip Kundu
Director, Software Development - Oracle
1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Agenda
2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
My Oracle Support Note 949322.1
Database Rolling Upgrades
Database A Database B
Install new Oracle version in separate
homes on A & B, set guaranteed Physical
PROD synchronize
STBY
restore point (GRP) on A
Temporarily convert B to use SQL synchronize Logical
Apply, upgrade and sync PROD
STBY
4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Introducing
Kalyan Kallepally
Senior Database Administrator
5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Upgrade Databases With Minimal
downtime
Oracle Open World - 2012
by
Kalyan Kallepally
Senior Database Administrator
Wellcome Trust Sanger Institute
Cambridge, UK
kalyan.kallepally@sanger.ac.uk
Who am I
• Working as Senior Database Administrator at
– Wellcome Trust Sanger Institute
• 10+ years of experience in Oracle (8-11gr2)
• 5+ years of experience in MySQL, SQL Server
• Recently started blogging
– www.dbakalyan.wordpress.com
– You can reach me on dba_kkk@yahoo.co.uk
Wellcome Trust Sanger Institute
Production
Database Backup
11.1.0.6 DR Site
Oracle Home (11.1.0.6)
Physical Standby
Sync or Async Database
Redo shipping Redo
apply ASM
Redo Logs
Primary
Database Backup
11.1.0.6 DR Site
Oracle Home (11.1.0.6)
Physical Standby
Sync or Async Database
• Disable Broker Redo shipping Redo
apply ASM
• Enable Flashback Redo Logs
Primary
Database Backup
11.1.0.6 DR Site
Oracle Home (11.1.0.6)
Logical Standby
Physical Standby
Sync or Async Database
Redo shipping Redo
• Convert the DR physical standby to apply ASM
Primary
Database Backup
11.1.0.6
11.2.0.3 DR Site
Oracle Home (11.1.0.6) Logical Standby
Sync or Async Database
Redo shipping
• Install new version of Oracle ASM
Primary
Database Backup
SQL
ASM Oracle Home (11.1.0.6)
apply
Broker
Transform
11.2.0.3 DR Site
Redo to SQL
Oracle Home (11.1.0.6)
Sync or Async Logical Standby
Redo shipping Database
• Plan for switch over to LSTBY
ASM
• Stop the redo transmission to PSTBY Redo Logs
Online SQL
• Up to this point absolutely there is no Redo Logs apply
Logical Standby
Database Backup
SQL
ASM
apply Oracle Home (11.1.0.6)
Broker
Transform
11.2.0.3 DR Site
Redo to SQL
Oracle Home (11.1.0.6) Primary
Sync or Async
Redo shipping Database
• LSTBY (previous Primary) is in a
ASM
Transient state
Online
• It is Running lower version than primary Redo Logs
Physical Standby
Logical Standby
Database
Database Backup
Redo
SQL
ASM apply
apply Oracle Home (11.1.0.6)
Broker
Transform
11.2.0.3 DR Site
Redo to SQL
(11.1.0.6)
Oracle Home (11.2.0.3) Primary
Sync or Async
Redo shipping Database
• Flashback LSTBY to guaranteed restore
ASM
point and shut down
Online
• Install new oracle version Redo Logs
Physical Standby
Database Backup
ASM Redo
Oracle Home (11.1.0.6)
apply Online
Redo Logs Broker
Redo Logs
11.2.0.3 DR Site
Oracle Home (11.1.0.6)
(11.2.0.3) Primary
Sync or Async
Redo shipping Database
• Wait for physical standby to be upgraded Redo
apply ASM
via the redo stream
Redo Logs
Online
• At this point you have a second Redo Logs
ASM Oracle
OracleHome
Home(11.2.0.3)
(11.1.0.6)
Online Broker
Redo Logs
11.2.0.3 DR Site
(11.2.0.3)
Oracle Home (11.1.0.6) Physical Standby
Sync or Async
Redo shipping Database
• Install new database home on other Redo
apply ASM
standbys
Redo Logs
• Mount PSTBY from new home
• Flashback database to guaranteed
restore point OracleHome
Oracle Home(11.2.0.3)
(11.1.0.6)
Read Write Clients Read Only Clients
11.1.0.6
11.2.0.3 Local Site
Physical Standby
Redo Database
apply
ASM
Redo Logs
11.2.0.3 Sync or Async
Redo shipping
Primary
Database Backup
ASM
Oracle
OracleHome
Home(11.2.0.3)
(11.1.0.6)
Online Broker
Redo Logs
11.2.0.3 DR Site
Oracle Home (11.1.0.6)
(11.2.0.3) Physical Standby
Sync or Async
Redo shipping Database
• Enable the redo transmission to Redo
apply ASM
local PSTBY to catch up to new
Redo Logs
incarnation
• PSTBY will be upgraded via redo
stream Oracle
OracleHome
Home(11.2.0.3)
(11.1.0.6)
• Enable Broker
Read Write Clients Read Only Clients
11.2.0.3 Local Site
Physical Standby
Redo Database
apply
ASM
Redo Logs
11.2.0.3 Sync or Async
Redo shipping
Primary
Database Backup
ASM
Oracle
OracleHome
Home(11.2.0.3)
(11.1.0.6)
Online Broker
Redo Logs
11.2.0.3 DR Site
Oracle Home (11.1.0.6)
(11.2.0.3) Physical Standby
Sync or Async
Redo shipping Database
• Drop guaranteed restore points Redo
apply ASM
• Rolling upgrade has Finished and
Redo Logs
databases are back in the original
positions
• With very minimal interruptions OracleHome
Oracle Home(11.2.0.3)
(11.1.0.6)
Pros & Cons
Regular /Conventional Upgrade Rolling Upgrade using Transient LSTBY
• Upgrade using DBUA/CLI • Down time is required for only
(50mins) switchover (reduced by 98% -
• Upgrade using datapump - 5mins)
Complete Down time required • Standbys are automatically
for exports, scp & imports
(approx 3 hrs) upgraded
– Manually recreate standbys • Fail safe options at each step
after the upgrade • Down time is independent of
• Errors at any stage can database size
increase down time
Caveats
• Need to upgrade grid/ASM before the database upgrade
• Need to manually update the OCR (srvctl) registries
• If Upgrading from 11gR1 to 11gR2 then move the database
spfile from $OH/dbs to ASM - if not, DBUA will fail
• If the “compatible” parameter is changed after LSTBY upgrade
- database cannot be rolled back
• To change the “compatible” parameter after the upgrade
- another downtime is needed
References
• http://www.oracle.com/technetwork/database/features/availability/maa-
wp-11g-transientlogicalrollingu-1-131927.pdf
• http://www.oracle.com/technetwork/database/features/availability/maa-
wp-11g-upgrades-made-easy-131972.pdf
Over to Larry
Thank you
Just How Many Steps Is That?
30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
But Wait! There’s More!
31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
And finally
32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Agenda
33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
DBMS_ROLLING: Concepts
34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
DBMS_ROLLING: Concepts
Leading Group
– Need to identify the Master Database (LGM) during Specification
– LGM starts as a Physical Standby, converted into a Logical Standby
(START), and then becomes the primary database (SWITCHOVER)
– Other databases in the Leading Group protect the LGM
– LGM responsibility transferrable on failure
Trailing Group
– Contains the original primary database (Trailing Group Master)
– Other databases in the Trailing Group protect the TGM
– TGM responsibility transferrable on failure
35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Data Guard Simple Rolling Upgrades
Simple, Reliable, Repeatable Database Rolling Upgrades
36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Goal
Simple, Reliable, Repeatable
37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Upgrading The Database Software
38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
What Kind Of Changes Can Be Made?
First Release Examples
39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
New Data Type Support
Eliminating Barriers to Utilizing Database Rolling Upgrade
Advanced Data Type Support
– XML OR
– Binary XML
– Securefile Deduplication
– Objects/Collections (includes SDO_GEOMETRY, DICOM)
– New Support for Oracle-Supplied Features
DBFS
AQ
Oracle Text
XDB
40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Process – Planning & Setup Phase
41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Process - Execution Phase
Call DBMS_ROLLING.START_PLAN
– Configures primary and standby databases participating in the upgrade
42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Planning Phase
Current Configuration
Configuration – OOW2012
Physical standby database in Protection Mode: MaxAvailability
Configuration Status:
Broker Controlled SUCCESS
DGMGRL>
43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Planning Phase
Start the Planning Process
NAME CURVAL
Sets up default parameters ------------------------
ACTIVE_SESSIONS_TIMEOUT
------------------------
3600
ACTIVE_SESSIONS_WAIT 0
– 2 for each database BACKUP_CTLFILE rolling_change_backup.f
DICTIONARY_LOAD_TIMEOUT 3600
25 rows selected.
44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Planning Phase
Reconfigure Redo Transport
is disabled.
45 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Planning Phase
Examining Parameters of the Plan
SQL>
BOS and CHI protect CAM
– CHI Primary
BOS and CAM protect CHI
46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Planning Phase
Build the Plan when ready
DBA_ROLLING_PLAN
47 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Start Phase
Start the Process
operation. DBUN
----------
ROLE
---------
ENGINE_STATUS
--------------
UPDATE_PROG
-----------
bos PRIMARY NOT APPLICABLE NOT STARTED
– When complete, the configuration cam LOGICAL RUNNING NOT STARTED
chi PHYSICAL RUNNING NOT STARTED
possesses a fully configured
SQL> select revision, status, phase
transient logical standby 2 from dba_rolling_status;
Still no outage
1 READY SWITCH PENDING
48 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Start Phase
Perform the changes
49 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Switchover Phase
Switchover!
50 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Finish Phase
Finish the change
51 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
A Sample Walkthrough - Finish Phase
Re-enable the Broker and switchover
Configuration Status:
SUCCESS
52 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Agenda
53 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
DBMS_ROLLING: Key Features
54 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Current Structure
Behind the Scenes New Structure
Database A Database B
Sets guaranteed restore point
Synchronize – redo apply Physical
(GRP) on A and B PROD
STBY
55 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Now How Many Steps?
56 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.
Resources
• OTN HA Portal:
http://www.oracle.com/goto/availability
• Maximum Availability Architecture (MAA):
http://www.oracle.com/goto/maa
• MAA Blogs:
http://blogs.oracle.com/maa
• Exadata on OTN:
http://www.oracle.com/technetwork/database/exadata/index.html
• Oracle HA Customer Success Stories on OTN:
http://www.oracle.com/technetwork/database/features/ha-casestudies-
098033.html
Graphic Section Divider
58 Copyright © 2012, Oracle and/or its affiliates. All rights reserved Confidential – Oracle Restricted.