oracle database 12c upgrade tools and best practices from oracle support agrim pandit principal...

38

Upload: magnus-park

Post on 16-Dec-2015

232 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,
Page 2: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support

Agrim PanditPrincipal Software EngineerOracle Software SupportSeptember 30, 2014

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 3: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 3

Safe Harbor StatementThe following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Page 4: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 4

Program Agenda

Why Upgrade ?

Overview and Concept

Upgrade Tools and Best Practices

Useful References for Upgrade

1

2

3

4

Page 5: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 5

Why Upgrade To 12c Release 1 ?

Useful and Desirable FeaturesImprove PerformancePotential Cost SaverEasy Administration

Premier Support until July 2018Extended Support until July 2021

Save Extended Support Fee Patchset, PSU,SPU and other Bug fixes are available

New Features

Increase Support Length

Premier Support

Benefits of upgrading the database

Page 6: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 6

Upgrade Vs Migration

UPGRADE

─ The process of changing the data dictionary contents of a database to reflect a newer release─ No User or Application data will be touched or modified ─ Independent of the size of the database ─ Major Release Upgrade : Upgrading from 11.2 to 12.1 ─ Patchset Upgrade :Upgrading from 12.1.0.1 to 12.1.0.2

─ Move to new OS ,hardware and character set conversation.─ Dependent on the size of the database

MIGRATION

Page 7: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 7

Upgrade Methods DBUA (Recommended)

Manual Upgrade

Expdb/Impdp

Page 8: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 8

12c Upgrade Path Direct or Indirect Path

Page 9: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 9

Upgrade DocumentationDocumentation :http://www.oracle.com/technetwork/database/enterprise-edition/documentation/index.html

Page 10: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 10

Upgrade CompanionMOS Note 1462240.1 Oracle 12cR1 Upgrade Companion

Page 11: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 11

Upgrade bloghttps://blogs.oracle.com/UPGRADE/

Page 12: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 12

OTN upgrade pagehttp://otn.oracle.com/goto/upgrade

Page 13: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 13

Certification Database Sever and Platform certification

Page 14: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 14

Software DownloadLocations

http://www.oracle.com/us/downloads/index.html

https://edelivery.oracle.com

https://support.oracle.com

Page 15: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 15

Install the latest SoftwareReduce patching downtime:

─ Install the LATEST PATCHSET or BASE RELEASE

─ Apply the latest PATCH SET UPDATE for Unix and BUNDLE PATCH for Windows

─ Install the Binaries in new Oracle home . Recommended: OUT OF PLACE

─ Apply Interim Patches for Known issue

─ Patchset is complete installation software from 11.2.0.2 Onwards

─ The first PSU for 12.1.0.2 will be released on October 2014

Note 1454618.1 : Quick Reference to Patch Numbers for Database PSU, SPU(CPU), Bundle Patches and Patchsets

Page 16: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 16

Upgrade Grid InfrastructureUpgrade Grid Infrastructure BEFORE upgrading the Oracle Database

Note 1579762.1 How to Upgrade to Oracle Grid Infrastructure 12c Release 1 and Known Issues

Oracle Grid Infrastructure Home

Oracle Database Server Home

Install the Grid Infrastructure in NEW Oracle home ( Out-of Place Upgrade)

Page 17: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 17

Pre Upgrade ChecklistSource Oracle home

Invalid database OBJECTS in SYS and SYSTEM schemaInvalid database COMPONENTS SYS and SYSTEM does not have DUPLICATE OBJECTSCLUSTER_DATABASE is set to FLASE

HIDDEN parameter and EVENTS DEPRECATED parameter OBSOLETE database COMPONENTSRECYCLE BIN objects

Gather Statistics Preserve Statistics Backup of the Database

VALIDATE

REMOVE

CREATE

Page 18: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 18

New Pre-Upgrade Information Tool :preupgrd.sql Upgrade SQL Automation

─ preupgrd.sql is introduced in 12c R1 ─ It has replaced utlu<nnn>i.sql─ Runs in the source Database ─ Generates Fix up scripts

─ preupgrade_fixups.sql─ postupgrade_fixups.sql

Page 19: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 19

-preupgrade.log - preupgrade_fixups.sql - postupgrade_fixups.sql

Logs generated by preupgrd.sql

Prepare Source database Run Preupgrade Tool on the Source Database

Source DB Target DB

Copy preupgrd.sql &

Utluppkg.sql

Execute preupgrd.sql

Location: $ORACLE_BASE/cfgtoollogs/<SID>/preupgrade

Page 20: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 20

Preupgrade Checks

Compatible Parameter Check $ORACLE_BASE/cfgtoollogs/<SID>/preupgrade/preupgrade.log $ORACLE_BASE/cfgtoollogs/<SID>/preupgrade/preupgrade_fixups.sql

OCM user existence check

Gather dictionary statistics

Page 21: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 21

Remove Obsolete Components

$emctl stop dbcontrol SQL> @ ?/rdbms/admin/emremove.sql$emctl stop dbcontrol SQL> @ ?/rdbms/admin/emremove.sql

─ Enterprise Manager Database Control Repository is superseded in 12c By EM Express─ Remove EM repository─ It will be automatically removed during the catuppst.sql post-upgrade phase.

─ Remove Oracle UltraSearch before doing the upgrade ─ Oracle UltraSearch does not exist in Oracle Database 11.2 and onwards ─ For Oracle Database 10.2

SQL> @ ?/ultraserach/admin/wk0deinst.sql SYS password ‘‘ ‘‘SQL> @ ?/ultraserach/admin/wk0deinst.sql SYS password ‘‘ ‘‘

Page 22: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 22

Oracle Label Security

SQL> @ ?/rdbms/admin/olspreupgrade.sqlSQL> @ ?/rdbms/admin/olspreupgrade.sql

─ Essential Step if Oracle Label Security and/or Database Vault was already in the database before upgrade─ Execute olspreupgrde.sql in source Database

─ Prepares the move of AUD$ table from SYSTEM to SYS.─ Processes the audit records to minimize downtime.─ Move records to an interim temporary table.

Page 23: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 23

Time Zone VersionPre or Post Upgrade Actions

─ Default Time Zone Version 12c R1 is DST V18─ If Time Zone version at source database HIGHER than target database

─ Apply the Time Zone patch on target to match the source database version

─ If Time Zone version at source database LOWER than target database ─ Time Zone conversion need to be done post upgrade.

─ Most Recent Time Zone version is DST V22─ Time Zone definitions in $OH/oracore/zoneinfo

Note 1585343.1 Scripts to automatically update the RDBMS DST (timezone) version in an 11gR2 or 12cR1 database

Page 24: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 24

Backup the Database ─ Take a backup of the Database. ─ Always create a valid and complete online backup with RMAN─ Test the restore and the recovery at least once.─ Make sure your fallback strategy covers during and after cases

Page 25: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 25

Compatible Parameter─ Minimum COMPATIBLE parameter for 12c is 11.0.0. ─ Leave COMPATIBLE at the original value for a week before changing to 12.0.0.─ No way back once COMPATIBLE set to 12.0.0

Compatible 11.0.0 or higher is MUST

Compatible remain to 11.x.x

Downgrade NOT possible

Downgrade possible

SQL> alter system set compatible = '12.0.0' scope=spfile;SQL> Shutdown immediate ;SQL> conn / as sysdbaSQL> startup

SQL> alter system set compatible = '12.0.0' scope=spfile;SQL> Shutdown immediate ;SQL> conn / as sysdbaSQL> startup

─ Database restart is required to change the COMPATIBLE parameter later

Page 26: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 26

Diagnostic Collection Script (dbupgdiag.sql)Note 556610.1: Script to Collect DB Upgrade/Migrate Diagnostic Information (dbupgdiag.sql)

Page 27: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 27

New Upgrade Utility : catctl.plcatctl.pl

─ It is introduced in Oracle database server 12c R1─ It loads the data dictionary and components in PARALLEL─ Default Parallelism 4 ─ Maximum Parallelism 8

catctl.pl supported options

Page 28: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 28

12c UpgradeStart the Database in UPGRADE mode using the 12c binaries

• Exit the sqlplus

Page 29: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 29

12c Upgrade Parallelism • Start the upgrade on the Shell with catctl.pl with PARALLEL option .

Page 30: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 30

12c Upgrade Logs

Upgrade is running with 8 Parallel processes

Total DB components upgrade time

─ Default log location is current working directory─ Use –l parameter to specify the log location─ One log file for each thread

Page 31: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 31

Post Upgrade ChecklistTarget Oracle home

$ORACLE_HOME/rdbms/admin/utlrp.sql$ORACLE_HOME/rdbms/admin/utlu121s.sql

TIMEZONE version

SPFILE for PFILE Gather STATISTICSBACKUP of the database

EXECUTE

UPGRADE

CREATE

Page 32: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 32

Post Upgrade Fixups

TimeZone Version Check

Gather Fixed Objects Statistics

$ORACLE_BASE/cfgtoollogs/<SID>/preupgrade/preupgrade.log $ORACLE_BASE/cfgtoollogs/<SID>/preupgrade/postupgrade_fixups.sql

Page 33: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 33

Verify Upgrade Logs─ Review Upgrade logs and traces

─ DBUA logs $ORACLE_BASE /cfgtoollogs/DBUA/<SID>/upgrade<n>─ If ORACLE_BASE is set

$ORACLE_BASE /cfgtoollogs/DBUA/<SID>/upgrade<n>

─ If ORACLE_BASE is NOT set $ORACLE_HOME /cfgtoollogs/DBUA/<SID>/upgrade<n>

─ Manual upgrade logs ─ Location Specified using - l parameter of catctl.pl ─ Current working directory

─ Check alert_SID.log

─ utlu121s.sql output

Page 34: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 34

Verify Upgrade ─ New successful upgrade status for CATALOG and CATPROC component

─ Run the utlrp.sql to change the status to VALID

Page 35: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 35

Upgrade Status Summary Tool :utlu121s.sql

Page 36: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 36

Useful References for Upgrade Note 1462240.1 Oracle 12c Upgrade CompanionNote 1515747.1 Oracle Database 12c Release 1 (12.1) Upgrade New FeaturesNote 1493645.1 Oracle Database 12c Release 1 (12.1) DBUA : Understanding New Changes With All New 12.1 DBUANote 1516557.1 Complete Checklist for Upgrading to Oracle Database 12c Release 1 (12.1) using DBUANote 1503653.1 Complete Checklist for Manual Upgrades to Oracle Database 12c Release 1 (12.1)Note 1516616.1 Oracle Database 12c Release 1 (12.1) DBUA in Silent mode

Page 37: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 37

Page 38: Oracle Database 12c Upgrade Tools and Best Practices from Oracle Support Agrim Pandit Principal Software Engineer Oracle Software Support September 30,