If you already work with Oracle Multitenant 12.1 and plan to upgrade your container databases to Oracle 12.2 then be very careful with your PDB Service configuration. Here’s why:
We have planned to upgrade our existing container databases to oracle 12.2 as quickly as possible. The reason is simple: we want to use the features like hot cloning or flashback PDB. I started to test the upgrade of a CDB with more than 80 PDBs, and everything was looking fine … just till after the upgrade, when during the last step it was time to recompile all PDBs and change the status in dba_registry from “upgraded” to “valid”. That’s where the going really got tough!
In Multitenant environments you have to work with catcon.pl to execute actions in every PDB of a container. But catcon.pl is only the control script that guarantees that the SQL scripts are executed in every PDB. If the script is running in every PDB, the output will always be “success”, also if the executed script generates an error in every single PDB. To be sure everything is ok, you have to check the logs that are generated for every PDB. It’s only there you’ll find the detailed logged errors.
After the execution of the utlrp.sql over catcon.pl, I checked the utlrp.sql logs that were generated.
Cd $ORACLE_HOME/rdbms/admin $ORACLE_HOME/perl/bin/perl catcon.pl -n 16 -e -b utlrp -d '''.''' utlrp.sql vi utlrp1.log SQL*Plus: Release 18.104.22.168.0 Production on Tue Aug 8 16:34:58 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> Connected. SQL> 2 ERROR: ORA-44787: Service cannot be switched into.
I got an error, that oracle could not do an “alter session set container=pdb1”. Also if I tried to do it manually I got the same error. We were totally blocked and could not manage the PDBs.
I opened a high severity SR, but for more than 2 months Oracle could not find a solution. Mike Dietrich did a great job and took care that the SR got the right priority. In the meantime we also got the same error after creating a fresh CDB with dbca under 12.2. At this point it became clear that we didn’t only have an upgrade problem, but instead were facing a general problem with 12.2 CDBs!
Three days ago I finally found the solution … after more than two months: Oracle recommends, that you don’t use the PDB Default Service that will be generated automatically if you create a PDB.
We implemented a PDB Startup Trigger that disables the default service and starts up our Mobiliar Default Service.
Here’s the root of all evil:
In 12.1 you could disable that service without any problems, but if you do that in 12.2, you will not be able to switch into your PDBs! With 12.2, the recommendation is still to not use the default service – but don’t stop it … or you will run straight into the mentioned problem!