Presentation joelperez thailand2014

35
Quick Start Guide Joel Pérez – Senior DBA Oracle Oracle ACE Director Oracle Database 12c: Manual Rolling Upgrade from Single Instance to RAC Bangkok, Thailand 2014

description

Presentation joelperez thailand2014

Transcript of Presentation joelperez thailand2014

Page 1: Presentation joelperez thailand2014

Quick Start Guide

Joel Pérez – Senior DBA OracleOracle ACE Director

Oracle Database 12c: Manual Rolling Upgrade from Single Instance to RAC

Bangkok, Thailand 2014

Page 2: Presentation joelperez thailand2014

Quick Start GuideAbout me

� Oracle Technology Network Expert “OTN” Expert 2003� First Latin American to be published as Expert on Oracle Web Site 2003� Oracle ACE 2004 & Oracle ACE Director 2012� Consulting Tasks, Conferences and activities related to, in over 50 countries around the world� More than 25 Oracle certifies� One of the first the OCM CloudAdministrator In the world� Articles Writer for OTN Spanish & OTN Portuguese with more than

40 Published Articles � Reviewer of Oracle Books�Oracle Speaker at many International Oracle Events� more and counting� …

Joel Pérez

Page 3: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Oracle Database 12c: Manual Rolling Upgrade from Single Instance to RAC

� What’s Rolling.. ?� Upgrade.. ? a.- A database Upgrade is called “Upgrade” because the data dictionary will get upgrated to a later version.. � Conversion from Single Instance to RAC.. ?� Zero Downtime.. ?� Real Case: Upgrade a database from 11g to 12c ( Single Instance to RAC in a Zero Downtime Fashion ). All Servers are based on Linux Operating System� Graphical & Code Steps

Page 4: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Let’s go to Start..

Page 5: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Full Database Backup

Production Database working in

Archive Log Mode

PROD

Page 6: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Full Database Backup

Archive Redo Log Backup

PROD

Page 7: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Full Database Backup

Archive Redo Log Backup

Controlfile Backup

PROD

Page 8: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Full Database Backup

Archive Redo Log Backup

Controlfile Backup

/u01/MyBackups

Where will be the Backup location ?

PROD

Page 9: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Full Database Backup ( 2:00pm – 2:30pm )

Archive Redo Log Backup

Controlfile Backup

/u01/MyBackups

PROD

Page 10: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Full Database Backup ( 2:00pm – 2:30pm )

Archive Redo log Backup >= 2:00pm ..

Controlfile Backup

/u01/MyBackups

PROD

Page 11: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Full Database Backup

Archive Redolog Backup

Controlfile Backup

( Whatever time after last 2 Steps )

/u01/MyBackups

PROD

Page 12: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel PérezInstalling RAC 12c

Linux Operating System in

All

Identical EndianFormats.. We can use

RMAN for the DB Carry

PROD

Page 13: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel PérezCreating Backup Directorie on a Node in RAC

PROD

/u01/ MyBackups

/u01/MyBackups

Page 14: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel PérezTransfering Backup Files

PROD

/u01/ MyBackups

/u01/MyBackups

Page 15: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel PérezCreating PROD db RAC

PROD

/u01/ MyBackups

/u01/MyBackups

PROD

DBCA Recommended

DB Directories

OCR File Entries

DB Configuration Files ( SPfiles, Pwfiles,.. )

Page 16: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Shuting Down PROD db RAC & Removing Controlfiles

PROD

/u01/ MyBackups

/u01/MyBackups

Controlfiles

PROD

Set DB Parameter

CLUSTER_DATABASE=FALSE

SCOPE=SPFILE

Page 17: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Removing Redo Logs Files

PROD

/u01/ MyBackups

/u01/MyBackups

Controlfiles

Redo Log Files PROD

Page 18: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Removing Datafiles

PROD

/u01/ MyBackups

/u01/MyBackups

Controlfiles

Redo Log Files

Datafiles

PROD

Page 19: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Restore Controlfiles

PROD

/u01/ MyBackups

/u01/MyBackups

PROD

No Mount

Page 20: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Startup mount / “Alter Database mount”

PROD

/u01/ MyBackups

/u01/MyBackups

PROD

Mount

Page 21: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Restore Database

PROD

/u01/ MyBackups

/u01/MyBackups

PROD

Mount

Restore Database

RMAN

Rolling in Progress…

Page 22: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Restore Database

PROD

/u01/ MyBackups

/u01/MyBackups

PROD

Mount

Restore Database

RMAN

Rolling in Progress…

Page 23: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Recovering Database

PROD

/u01/ MyBackups

/u01/MyBackups

PROD

Mount

Recovering Database

RMAN

Rolling in Progress…

Page 24: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Recovering Database

PROD

/u01/MyBackups

/u01/MyBackups

PROD

Mount

Recovering Database

RMAN

Recovering until the last

Archive Redo Log found

In the first ARL Backup..

Page 25: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Recovering Database

PROD

/u01/ MyBackups

/u01/MyBackups

PROD

Mount

Recovering Database

RMAN

Rolling in Progress…

Page 26: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Rolling Upgrade Core

PROD

/u01/MyBackups

/u01/MyBackups

PROD

Mount

1.- Take backup of

new ARLs regarding

the last ARL taken at

Previous backup on

them

2.- Transfer the new

gotten RMAN Backup

sets

3.- Catalog new

Taken backups

4.- Recover Again the

database until the

last ARL brought

& do it again until

reach the time of last

syncronization of

databases

Page 27: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel PérezRolling Upgrate Core

Single PROD db RAC PROD db

Full Database Backup Restore Database

ARL Backup (50…120)Recovering Database based

on ARL from 50 to 120

ARL Backup (121…200) Recovering Database based

on ARL from 121…200

and Repeat backup & Recovery of ARL

until reach the real break time to upgrade…

Page 28: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Following Steps to Complete the Task..

� SQL> Alter Database Open Resetlogs Upgrade;

� Upgrade DB Catalog with the new “Parallel Upgrade Utility”

Page 29: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

� Run the “Oracle Database Post-Upgrade Status Tool”

Page 30: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Run Script “utlrp.sql” to recompile invalid objects

Page 31: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

.

� Create an Undo Tablespace for each one of rest instances

� Change the Database Parameter “CLUSTER_DATABASE=true”

Page 32: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

.

�Add Log file groups in new “Threads” for rest of instances

Page 33: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez

Following Steps to Complete the Task..

And finally..�Shutdown Database and Start it Up function in RAC� And that’s all..� You’ve done a Zero Downtime Upgrade from Single to RAC

Page 34: Presentation joelperez thailand2014

Quick Start GuideDirect Contact:

� ACE Director Profile: https://apex.oracle.com/pls/otn/f?p=19297:4:1711390987197101::NO:4:P4_ID:157� OCM Profile: http://education.oracle.com/education/otn/JoelPerez.htm� Linked in: https://apex.oracle.com/pls/otn/f?p=19297:4:1711390987197101::NO:4:P4_ID:157

Joel PérezJoel PérezJoel PérezJoel Pérez

Page 35: Presentation joelperez thailand2014

Quick Start GuideJoel PérezJoel PérezJoel PérezJoel Pérez