AutoUpgrade and Plug In to a CDB – with a single command (and video)

I have to confess, this feature is out and available for quite a while. But only unofficially. AutoUpgrade can upgrade and plug in a non-CDB into a CDB. But it lacked flexibility. And we didn’t test it a lot. Hence, you could find it documented in our Hands-On Lab instructions. And we did this exercise with you already in our sold-out labs at OOW 2019 as well. But since a week and a bit, it is officially supported: AutoUpgrade and Plug In to a CDB – with a single command (and video).

AutoUpgrade and Plug In to a CDB - with a single command (and video)

Photo by William Daigneault on Unsplash

Create your CDB at first

AutoUpgrade does not only upgrade your database. It can plug it into a CDB as well. With one single command. You will have to precreate this CDB. And please, pay close attention to the components you select to avoid plugin issues. The easiest approach is to create a CDB with all options. If you do this, make sure the PDB$SEED gets only the options you really want in future PDBs you provision. But personally I’d recommend to check your current non-CDB’s DBA_REGISTRY for the existing COMP_ID. And select these for your CDB as well.

These blog posts may help you to take the right choices when you create your CDB.

What does AutoUpgrade do?

Until Oracle Database 19c, AutoUpgrade at first will upgrade your database – and then plug it in. This is the more safer approach as we have a proven fallback for the upgrade part. So if anything goes wrong during the upgrade, AutoUpgrade allows you to seamless fallback within minutes. But with the future releases after Oracle 19c, this will chance. When the non-CDB architecture is gone, we can’t upgrade at first to a higher release than 19c as you’d have a non-CDB then. So for future releases, AutoUpgrade then will plug in at first, and then trigger the upgrade and conversion.

AutoUpgrade and Plug In to a CDB - with a single command (and video)

Please download always the newest AutoUpgrade tool from MOS Note: 2485457.1. And study the blog post series about the various considerations, pitfalls and fallback topics regarding the non-CDB to PDB conversion.

Which are the new parameters?

In order to allow you the plugin, we add now these three parameters to AutoUpgrade:

AutoUpgrade and Plug In to a CDB - with a single command (and video)

You find them in the Oracle Database 19c Upgrade Guide.

The command for AutoUpgrade stays exactly the same – you need to add only at least target_cdb to your config file specifying the SID of the CDB you precreated.

The other two parameters are optional. When you leave out target_pdb_copy_option, NOCOPY will be used. I’d recommend to you the parameter instead if you can have the duplicate disk space. Otherwise make sure you have a working backup. And remember Schroedinger’s Backup theorem: The condition of any backup is unknown until a restore is attempted. Let me add that you should try to recover as well to sleep well at night. And thanks to Luiza Nowak and the POUG for this cool t-shirt πŸ™‚

And thanks to my team mates who added the target_pdb_name option to give your non-CDB a new name. This is your chance – but you could rename it afterwards as well if needed.

We received already some enhancement requests – so more flexibility may be added soon.

My config file

Please find here the config file I was using for the demo:




If you’d like to repeat this exercise with our Hands-On Lab, you need to copy a newer version of the autoupgrade.jar into it at first.

Watch the video

If you’d like to see it live and in action, you may watch this video. In case you would like to watch the technical demo only, without explanation about how AutoUpgrade works, then please use this link instead as the demo starts at 4:45 min into the video.

Music provided by:


More Information and Links


Share this: