Our developers just published a new version of AutoUpgrade. Head over to My Oracle Support and download version 21.1.1.
The version says 21, but it can still upgrade your databases to lower release. So, you should use this new version to upgrade to Oracle Database 19c as well.
What’s New
A total of 48 enhancements and bug fixes made it into the new release. It has been 35 working days since the last release (and that includes Thanksgiving week) which means that the team has put in – on average – close to 1,5 changes into AutoUpgrade every, single working day. I find that quite impressive. And it really supports our message that you should always use the latest version of AutoUpgrade.
In My Oracle Support note 2485457.1 you can find a complete change log. Also, you can also visit the 21c New Feature Guide for additional information.
Unplug/plug Upgrade
The first things that I would like to highlight is unplug/plug upgrade. Instead of upgrading an entire CDB, you can now choose to unplug one or many PDBs, plug them into a higher release CDB, and upgrade the individual PDBs.
How do you specify to upgrade only one PDB? Use target_cdb
and pdbs
?
upg1.sid=CDB1
upg1.pdbs=PDB3
upg1.source_home=/u01/app/oracle/product/12.2.0.1
upg1.target_home=/u01/app/oracle/product/19
upg1.target_cdb=CDB2
When doing unplug/plug upgrades you must be aware of the COMPATIBLE
setting in the higher release CDB. If COMPATIBLE
is higher, when the PDB plugs in, COMPATIBLE
will silently and automatically be raised by the CDB. This means that you lose the capability of doing downgrades and flashback database.
You can read more about unplug/plug upgrades in the documentation
AutoUpgrade and Oracle Data Guard
In addition, AutoUpgrade now detects that you are upgrading a primary database in a Data Guard setup. In that case, it will automatically defer redo log transport to the standby databases and disable the Data Guard broker. After the upgrade, the broker is automatically restarted, but you need to manually reconfigure the standby databases, and eventually re-enable redo log transport.
You might ask: Why don’t AutoUpgrade handle it all for me? This is to preserve your fallback capabilities. Even after a successful upgrade, you still might want to revert back to the old version. Let’s say your testing finds a critical issue. You might still have a restore point on the primary database, but what if – for some reason – flashing back fails? Then you still have your standby database which was disabled right before the upgrade.
You can read more about AutoUpgrade and Data Guard in the documentation.
More
A few hints for the interested reader to explore. Have a look at the config file option catctl_options
. You can use that to control the level of parallelism for a specific upgrade.
Also, if you don’t want AutoUpgrade to handle your network files (e.g. sqlnet.ora, tnsnames.ora) you disable it using manage_network_files
.
You can read more about those options in the documentation.
Conclusion
Get the latest version of AutoUpgrade and benefit from the many new features. Keep an eye out for additional blog posts that will dig deeper into the new features.
Hey Daniel
Any idea why this version says
[oracle@e03572 ~]$ java -jar autoupgrade.jar -version
Exception in thread “main” java.lang.UnsupportedClassVersionError: oracle/upgrade/autoupgrade/boot/Boot : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:443)
at java.net.URLClassLoader.access$100(URLClassLoader.java:65)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.net.URLClassLoader$1.run(URLClassLoader.java:349)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:348)
at java.lang.ClassLoader.loadClass(ClassLoader.java:430)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:326)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Thanks michael
LikeLike
Sorry found the issue , need java 8 đŸ™‚
LikeLike
Hi Mikey,
That’s right. It is one of the few requirements. You can always use the Java version that is in the Oracle Home. As of 12.1.0.2 the Oracle Homes come with a Java 8 embedded.
Regards,
Daniel
LikeLike
Is there any tips and trick or best practice MOS notes in regards to using AutoUpgrade. Not really getting anywhere with Oracle Support on how to somehow make our AutoUpgrade run ‘faster’.
LikeLike
Hi Edwin,
We gave a webinar last year called “How Low Can You Go? Zero Downtime Operations”. It has a section on how to make your upgrades run faster – also when using AutoUpgrade. I suggest that you check it out: https://dohdatabase.com/webinars.
You might also find that “Database Upgrade Internals – and so much more” has a few pointers as well.
Regards,
Daniel
LikeLike
Hi Daniel,
(I know this is not a current thread)
I am just starting with an upgrade from 12.1.0.2 non-CDB to Oracle 19 PDB (into existing CDB on separate host) and my 12.1.0.2 ORACLE_HOME has only java 6 installed:
$ $ORACLE_HOME/jdk/bin/java -version
java version “1.6.0_75”
Java(TM) SE Runtime Environment (build 1.6.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 20.75-b01, mixed mode)
Regards,
RĂ¼diger
LikeLike
Hi RĂ¼diger,
What platform are you on? Has the Oracle Home been patched? For what I know there should be Java 8 in a 12.1.0.2 Oracle Home, but clearly not the case there.
If you have a different java installed on your server, you can use that instead. You don’t have to use the one found in Oracle Home.
Regards,
Daniel
LikeLike
Hi Daniel,
we worked around by using the old preupgrade scripts at the source database.
Just FYI, the platform is SLES12 SP5, Oracle 12.1.0.2.0 and latest patch applied:
$ opatch lspatches
34086863;Database PSU 12.1.0.2.220719,Oracle JavaVM Component (JUL2022)
34057742;Database Patch Set Update : 12.1.0.2.220719 (34057742)
When searching on MOS, I found:
How to Display Properties and Identify the JDK Version Running in Oracle Database JVM (Doc ID 331673.1)
and near the bottom:
Oracle 12.1.0.x contains Java classes that are JDK 6 or JDK 7 compliant depending on the JDK that was installed and enabled (JDK 6 is default).
The workaround with the preupgrade script worked for us, so no problem, but from my experience it looks like autoupgrade cannot be used on 12.1 out of the box. It won’t be a problem if you upgrade on the same server with Oracle 19 installed on it, which then clearly offers java 8.
Regards
RĂ¼diger
LikeLike
Hi RĂ¼diger,
Thanks for the update.
Regards,
Daniel
LikeLike