Datapatch Failing on ORA-65108 (PDB$SEED): Applying Datapatch Manually
Problem
In a new 12c environment (which actually includes 18c and 19c, as per the 12c family), the datapatch failed on the following:
ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 1 ORA-65108: invalid use of a cursor belonging to another container kpdbaKillPdbSessions: Starting kill. 2019-01-29 07:09:21.486584 :kjcipctxinit(): (pid|psn)=(25|2): initialised and linked pctx 0x00007FFB1A7B49C8 into process list ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 1 ORA-65108: invalid use of a cursor belonging to another container
Solution
Here, it's failing for the PDB$SEED. When upgrading, there are phases where you need the seed opened read-write. However, in general, you don’t do that yourself. The scripts to run in each container are called through catcon.pl which, by default, opens the seed read-write and ensures that the initial open mode is restored at the end (even in the event of an error). So, how do you manually proceed?
- First, apply the datapatch to other PDBs using the -pdbs clause:
./datapatch -verbose -pdbs PDB1,PDB2
- Open PDB$SEED for Oracle scripts:
SYS@CDB$ROOT SQL> alter session set "_oracle_script"=true; Session altered. SYS@CDB$ROOT SQL> alter pluggable database pdb$seed open read write force; Pluggable database PDB$SEED altered.
- Apply the datapatch to the PDB$SEED:
$ORACLE_HOME/OPatch/datapatch -verbose -pdbs ‘PDB$SEED’
- Close PDB$SEED and mount it:
SYS@CDB$ROOT SQL> alter session set container=PDB$SEED Session altered. SYS@CDB$ROOT SQL> shutdown immediate Pluggable Database closed ++ From Root SYS@CDB$ROOT SQL> alter pluggable database PDB$SEED open read only;
I hope it helps, cheers!
Oracle Database Consulting Services
Ready to optimize your Oracle Database for the future?
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Oracle Database 12c Patching: DBMS_QOPATCH, OPATCH_XML_INV, and datapatch
Why It's Good Practice to Run Datapatch -prereq after Creating Database
Issues With Database Service Names Starting With Pluggable Database (PDB) Name
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.