Upgrade / Migration

A change in Oracle 12.2 and 19c with MV Refresh Stats Collection

It’s not easy for me to put the topic into a searchable title for this blog post. The feature or change I will write about today came in actually with Oracle Database 12.2.0.1. But since many of you will move directly from Oracle 11.2.0.4 or 12.1.0.2 to 19c, the Long Term Support release, it may affect you as well. So let me explain a change in Oracle 12.2 and 19c with MV Refresh Stats Collection.

 

A customer story

The local Support team asked me a few weeks ago whether I have heard …

Continue reading...

Pitfall: Upgrade to 21c fails when ORDIM is present but no SDO

You may have read my previous blog post about Upgrading a non-CDB to Oracle Database 21c. And I referred to a potential Pitfall: Upgrade to 21c fails when ORDIM is present but no SDO. In this blog post I would like to explain how to avoid this pitfall beforehand and explain what needs to be done.

Pitfall: Upgrade to 21c fails when ORDIM is present but no SDO

Photo by Sara Codair on Unsplash

What’s the problem?

In my previous blog post I showed you the ideal and normal way. But during my tests I came across an issue I was not aware of – and I simply had no …

Continue reading...

Upgrading a non-CDB to Oracle Database 21c with AutoUpgrade

Yesterday I wrote about the installation of Oracle Database 21c on Linux. But today it is time for Upgrading to Oracle Database 21c with AutoUpgrade.

Upgrading a non-CDB to Oracle Database 21c with AutoUpgrade

Photo by Arjun MJ on Unsplash

AutoUpgrade

You may have heard it already from us and other colleagues, but we can’t repeat it often enough: There is only one recommended tool to upgrade your databases – and this is AutoUpgrade.

In my 21c home, I’m checking the deployed version of AutoUpgrade at first:

[CDB3] oracle@hol:/u01/app/oracle/product/21/rdbms/admin
$ java -jar autoupgrade.jar -version
build.hash 57ab246
build.version 21.1.3
build.date 2021/04/21 13:32:13
build.max_target_version 21
build.supported_target_versions 12.2,18,19,21
build.type production

Now please …

Continue reading...

Upgrade fails with ORA-20001 during datapatch run

I encountered this issue now multiple times in my own environment. And I searched MOS and tried different things. But I couldn’t solve it yet. My Upgrade fails with ORA-20001 during datapatch run – and I’d like to show you how to bring the upgrade to an successful end.

Upgrade fails with ORA-20001 during datapatch run

Photo by chuttersnap on Unsplash

It all starts with an upgrade

In my lab environment I upgrade two databases often in parallel. An 11.2.0.4 database and a 12.2.0.1. The 11.2.0.4 upgrades always flawless. But the 12.2.0.1 occasionally fails. This is the screen AutoUpgrade is showing me – but this is not …

Continue reading...

Upgrade Testing – Online Clone a PDB to 19c

In the past I wrote some articles about cloning PDBs to new environments. And I added a post about RELOCATE as well. But I realized that I have no specific blog post about a very typical scenario: Upgrade Testing – Online Clone a PDB to 19c.

Upgrade Testing - Online Clone a PDB to Oracle 19c

Photo by Jørgen Håland on Unsplash

My Setup

I have an Oracle 12.2.0.1 CDB with a PDB, and another Oracle 19.6.0 CDB. I will hot clone the PDB from 12.2.0.1 to the higher version CDB, and then upgrade the PDB.

Upgrade Testing - Online Clone a PDB to Oracle 19c

The motivation to do it this way is to allow testing for the application …

Continue reading...

Upgrade PDBs with RELOCATE – How does it work?

Today Roy and I received a question from a colleague about the RELOCATE feature in Multitenant. And I’d like to shed some light and this topic a bit more. Upgrade PDBs with RELOCATE – How does it work?

Upgrade PDBs with RELOCATE - How does it work?

Photo by Sebastian Pena Lambarri on Unsplash

RELOCATE and UPGRADE?

At first, it looks very promising to me. RELOCATE uses the HOT CLONE functionality of Multitenant but then relocates the PDB from one to another CDB. You need to fulfill a few important requirements, for instance:

  • Local Undo must be enabled in both CDBs
    • This limits the technique to at least Oracle
Continue reading...

Improved preupgrade.jar for Oracle 12.2 and 18c

My team mates are really quick. We received an information early this week about a missing or wrong DV check in the preupgrade – and they implemented it within a day or so. The September 2018 version of the improved preupgrade.jar for Oracle 12.2 and 18c is available for download.

Improved preupgrade.jar for Oracle 12.2 and 18c

What’s new in this version:

  • It adds a recycle bin check when the autofixup for dictionary statistics is run
  • And it updates DV_AUDIT_CLEANUP  to 11.2.0.4

Improved preupgrade.jar for Oracle 12.2 and 18c

Please find the new September versions of:

  • Oracle 12.2.0.1 preupgrade.jar – build 17
    • There’s issue with “creating directories”
Continue reading...

Oracle Database 18.3.0 Upgrade on premises

Oracle Database 18.3.0 Upgrade on premisesAs Oracle Database 18c is now available on Linux on premises, I blogged about the installation already. And the next logical step is the Oracle Database 18.3.0 Upgrade on premises. In this case I will show an upgrade on the command line from Oracle 11.2.0.4 to Oracle 18.3.0. A DBUA upgrade will follow in a separate blog post later.

Oracle Database 18.3.0 Upgrade on premises

Before you can start with the upgrade, you may download the software first, and then install it:

If …

Continue reading...

Upgrade Oracle 12.2.0.1 to Oracle Database 18c on-premises

Upgrade Oracle 12.2.0.1 to Oracle Database 18c on-premisesI’m currently refreshing our Hands-On Lab and will exchange Oracle 12.2.0.1 with Oracle 18.2.0. This blog post series is about how to Upgrade to Oracle 12.2.0.1 to Oracle Database 18c on-premises. There are other blog posts available you may use by yourself if you plan to refresh the lab by yourself until we uploaded a newer version. And it’s actually a good exercise.

For Multitenant upgrades from Oracle 12.1.0.2 to Oracle 12.2.0.1 you may read this:

Continue reading...

List of PREUPGRADE checks executed by preupgrade.jar

List of PREUPGRADE checks executed by preupgrade.jar

Most of you may not care about the checks our Pre Upgrade Check tool preupgrade.jar does. But some may. Especially in cases where you plan to run a command line upgrade unattended via a script. Therefore this List of PREUPGRADE checks executed by preupgrade.jar may help you.

List of PREUPGRADE checks executed by preupgrade.jar

As a result of a joint initiative between our Upgrade Development team and the Support group dealing with upgrade-related SRs we released this MOS Note:

Purpose of the new MOS note is to give you a complete list …

Continue reading...

Minimum Supported Version for Database Upgrades

This question comes up very often: What is the minimum supported version for database upgrades? Or a question I received today: “I have an Oracle 10.2.0.4 database, can I upgrade directly to Oracle 11.2.0.4?”

Usually I have to dig into my old slides from the past to give a definite answer. And of course, the Database Upgrade Guide of each version has the same information somewhere as well. Therefore I’d like to summarize the releases supported for direct database upgrades since Oracle 11.2.0.4 below.

Upgrade?

When I speak about database upgrades, I mean you’ll use either the command line

Continue reading...

What happens to components with OPTION OFF status during upgrade?

What happens to components with OPTION OFF status during upgrade?In the newer releases of Oracle database you may see components with status OPTION OFF in the database’s registry. But what happens to components with OPTION OFF status during upgrade? Will those stay on the old release?

What happens to components with OPTION OFF status during upgrade?

You may have a quick look into your DBA_REGISTRY (or CDB_REGISTRY). I used the check_components.sql script.

COMP_ID	COMP_NAME			   SCHEMA	STATUS	   VERSION
-------- ---------------------------------- ------------ ---------- ------------
CATALOG	Oracle Database Catalog Views	   SYS		VALID	   12.1.0.2.0
CATJAVA	Oracle Database Java Packages	   SYS		VALID	   12.1.0.2.0
CATPROC	Oracle Database Packages and Types SYS		VALID	   12.1.0.2.0
JAVAVM	
Continue reading...

September 2017 releases of preupgrade.jar and preupgrd.sql are available

On a regular basis the Database Upgrade Team releases new and improved versions of the preupgrade tools via a MyOracle Support note. And it’s time again: the September 2017 releases of preupgrade.jar and preupgrd.sql are available for download.

September 2017 releases of preupgrade.jar and preupgrd.sql are available

Please ALWAYS download the most recent versions of preupgrade.jar for upgrades to Oracle Database 12.2 and preupgrd.sql (including utluppkg.sql) for Oracle Database 12.1.0.2 upgrade from MOS Note: 884522.1. The version you’ll download is way newer than the version you’ll get with the base installation.

preupgrade.jar – Rel.7 – September 2017

Please …

Continue reading...

Why does the upgrade of PDB$SEED always take longer?

Upgrading the PDB$SEED takes always longer than any other container.
What is the reason for an upgrade of the PDB$SEED taking so much longer in a real world environment?

How does an upgrade with Oracle Multitenant work?

Upgrading the PDB$SEED takes always longerI have written several blog posts in the past about the different techniques to upgrade an Oracle Multitenant environment:

  1. Upgrade Everything At Once
  2. Upgrade via Unplug/Plug/Upgrade

The interesting case happens in the “Everything At Once“. The PDB$SEED takes significantly longer to upgrade than any other container.

Upgrading the PDB$SEED takes always longer?

Quick recap: The PDB$SEED is the (I call it) blueprint

Continue reading...

New version of preupgrade.jar (build 5) is available

There’s a new and improved version of the preupgrade.jar (build 5 – May 2017) available for download from MyOracle Support:

The same note will get you access also to the most recent builds of preupgrd.sql for upgrades to Oracle Database 12.1 and utlu112i.sql for the unlikely event you’ll have to upgrade a database to Oracle 11.2.0.4.

Please always exchange the version getting installed by default with the version we offer via MOS Note:884522.1 as the downloadable version is usually much newer and improved over the one getting deployed …

Continue reading...

Issue with 2k and 4k db_block_size – ORA-1450 when upgrading to Oracle 12.2.0.1

Recently we got alerted by a customer and a colleague from Italy about an issue with the upgrade from Oracle 12.1.0.x to Oracle 12.2.0.1 if – and only if – your database got created with 2k or 4k db block size.

Problem

If your database got created with 2k or 4k db block size, and you attempt an upgrade from any upgrade-supported Oracle version to Oracle Database 12.2.0.1 the upgrade – regardless of DBUA or catctl.pl – will fail with an ORA-1450: maximum key length (1478) exceeded.

Analysis

In the catupgrd0.log – regardless of using the DBUA or …

Continue reading...

Can I restart a failed Multitenant Upgrade as well?

A while back I did blog about the new -R option of the parallel upgrade tool catctl.pl in Oracle Database 12.2.

And in case you will do a real Multitenant upgrade and fail – as it happened to me today due to “no space left on device” (no audit files could be written anymore) I tried the -R option as well based on Joe’s (our lead catctl.pl developer) recommendation:

$ $ORACLE_HOME/perl/bin/perl catctl.pl -n 6 -R -l /home/oracle/mike2 catupgrd.sql

Argument list for [catctl.pl]
Run in                c = 0
Do not run in         
Continue reading...

Upgrade Everything at Once – Multitenant Upgrade from Oracle 12.1 to 12.2

I did blog about this topic a while back.

Theory is nice but it’s a big difference when you do it the first time with a non-lab deployment at a customer with a real Multitenant database with almost 100 PDBs.Then you learn that neither the documentation nor my previous blog post contain all the necessary steps.

My test setup

I have a simple deployment of just 5 PDBs. But it will showcase with my limited compute capabilities how the process should work.

SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- 
Continue reading...

Multiple hop upgrades? Execute the matching preupgrade scripts for each hop

We discussed an interesting upgrade case last week together with our upgrade colleagues in Support – and learned the double-hop (or triple-hop) upgrade case is not described in the documentation somewhere.

What is a multiple-hop upgrade?

Triple Jump

Triple Jump – Willie Banks – Olympics 1988 Seoul

Actually this describes the case where somebody can’t upgrade directly and has to do several upgrades in a sequence to reach the targeted release. For example, you start of with an Oracle 10.2.0.3 database – and your targeted release is Oracle 12.2.0.1 . A direct upgrade is not possible. I would opt now for Data …

Continue reading...

Upgrade to Oracle Database 12.2 and Converting it into an 12.2 PDB (plugin)

2 customers requested a bit more explanation on how to:
Convert and Plugin an Oracle 12.1 non-CDB database into an Oracle 12.2 container database

Cool, I like that 🙂 I will do this right away and use the approach to Upgrade first, then Plugin afterwards.

Upgrading an Oracle 12.1.0.2 database to Oracle 12.2.0.1

First the preupgrade.jar must be executed – please download always the most recent version from MOS Note:884522.1 as the version we publish is usually newer including important improvements (and fixes) than the version you’ll get with the release drop. We are working on including always the …

Continue reading...

Upgrade to Oracle Database 12.2 – New MOS Notes

Some very helpful MOS Notes got published regarding the upgrade to Oracle Database 12.2.0.1:

Furthermore check regularly for Known Issues and Alerts – currently the note has no content but exists already:

Cheers
–Mike…

Continue reading...

February 2017 version of PREUPGRD.SQL is available

The new version of the preupgrd.sql (including the utluppkg.sql package) in its February 2017 version is available for download from MOS Note:884522.1.

New Preupgrd.sql - MOS Note 884522.1

If you are going to upgrade to Oracle Database 12.1.0.2 please exchange your current preupgrd.sql/utluppkg.sql either in ?/rdbms/admin or in the location of the source system you’ve copied it to with the new version.

–Mike…

Continue reading...

Create a database with NON-DEFAULT Time Zone

One requirement of Transportable Tablespaces (and of course Full Transportable Export/Import as well) is to have identical database character sets AND identical time zone settings.

Problem

Source database has a lower time zone setting than the default target database in the destination home.

Lets assume you’d like to migrate an Oracle 11.2.0.4 off IBM AIX and migrate it into Oracle 12.1.0.2 on an Exadata meaning Oracle Linux 6. The source time zone version if it has never been upgraded would be TZ V14 – whereas the new Oracle 12.1.0.2 database you’d create would get TZ V18 by default.

Time Zone Setting Oracle Database

Solution 1

Continue reading...

New PREUPGRADE.JAR is available – MOS 884522.1

As promised – and thanks to everybody from the Database Upgrade Development Team – the new preupgrade.jar for Oracle Database 12.2 is available:

And of course the previous preupgrd.sql with the package utlupkkg.sql and the old utlu112i.sql for upgrade to Oracle 11.2.0.4 (which I wouldn’t do anymore) are available as well.

New Preupgrd.sql - MOS Note 884522.1

Please ALWAYS use the version downloaded from this MOS note as this version is much newer and better than the version getting shipped due to code freeze dates. And you will recognize that the new preupgrade.jar is now identical …

Continue reading...

Upgrades to Oracle Database 12.2.0.1 (and Downgrades)


Oracle Database 12c Release 2 (12.2) is available now in the Oracle Cloud
in DBCS and ECS in both NAS and EMEA zones, as well as being available on Exadata Express Cloud Service. The Oracle Database 12.2 documentation should be published later today.

Just to note down, the versions supporting direct upgrade either with catctl.pl on the command line or with DBUA are:

  • Oracle Database 11.2.0.3
  • Oracle Database 11.2.0.4
  • Oracle Database 12.1.0.1
  • Oracle Database 12.1.0.2

Direct Upgrade to Oracle Database 12.2

No direct upgrades are supported from versions below Oracle Database 11.2.0.3.

For versions older than Oracle Database 11.2.0.3 other tools such as Data Pump or …

Continue reading...