ORA-65353: The undo tablespace is missing from the XML metadata file.

ORA-65353: The undo tablespace is missing from the XML metadata file.

Generally, lower version non- CDB cannot be both converted and upgraded to a PDB at the same time.

Example: If 12c non-CDB should be upgraded to 19c PDB, then

  • Either upgrade 12c non-CDB to 19c non-CDB and then convert to PDB
  • Or convert 12c non-CDB to 12c PDB and then upgrade to 19c

Let us try anyways to convert a 12c non-CDB to 19c PDB

Source – 12c non-CDB ; Target – 19c PDB

SOURCE – Shutdown the source and open in read only mode to print the contents of non-CDB to xml file

=Xscalibal=>shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

=Xscalibal=>startup open read only;
ORACLE instance started.

Total System Global Area 1761607680 bytes
Fixed Size                  2925360 bytes
Variable Size             536874192 bytes
Database Buffers         1207959552 bytes
Redo Buffers               13848576 bytes
Database mounted.
Database opened.

=Xscalibal=>EXEC DBMS_PDB.DESCRIBE(pdb_descr_file => '/tmp/npdb.xml');

PL/SQL procedure successfully completed.


=Xscalibal=>shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

TARGET – Compatibility check failed in 19c PDB because the source is in 12c

SQL> SET SERVEROUTPUT ON;
DECLARE
compatible CONSTANT VARCHAR2(3) := CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY(pdb_descr_file => '/tmp/npdb.xml')
WHEN TRUE THEN 'YES'
ELSE 'NO'
END;
BEGIN
DBMS_OUTPUT.PUT_LINE(compatible);
END;
/SQL>   2    3    4    5    6    7    8    9
NO


PL/SQL procedure successfully completed.

There are lot of plugin violations related to upgrading the 12c non-cdb to 19c non-cdb

SQL> set lines 200 pages 1000
SQL> col NAME for a20
SQL> col CAUSE for a20
SQL> col MESSAGE for a20
SQL> col STATUS for a20
SQL> col ACTION for a20
SQL> SELECT name,cause,message,action,status FROM pdb_plug_in_violations;

NAME                 CAUSE                MESSAGE              ACTION               STATUS
-------------------- -------------------- -------------------- -------------------- --------------------
PDB$SEED             SQL Patch            '19.3.0.0.0 Release_ Call datapatch to in RESOLVED
                                          Update 1904101227' i stall in the PDB or
                                          s installed in the C the CDB
                                          DB but no release up
                                          dates are installed
                                          in the PDB

XSCALIBA             Non-CDB to PDB       PDB plugged in is a  Run noncdb_to_pdb.sq PENDING
                                          non-CDB, requires no l.
                                          ncdb_to_pdb.sql be r
                                          un.

XSCALIBA             PDB not Unicode      PDB not in Unicode ( Oracle recommends us PENDING
                                          AL32UTF8) character  ing Unicode (AL32UTF
                                          set. PDB character s 8) character set for
                                          et WE8MSWIN1252.      the database. Consi
                                                               der migrating the da
                                                               tabase to Unicode.

XSCALIBA             VSN not match        PDB's version does n Either upgrade the P PENDING
                                          ot match CDB's versi DB or reload the com
                                          on: PDB's version 12 ponents in the PDB.
                                          .1.0.2.0. CDB's vers
                                          ion 19.0.0.0.0.

XSCALIBA             OPTION               PDB's version is low Install the missing  PENDING
                                          er than CDB and PDB  components in the CD
                                          has more components  B or plug in to comp
                                          than the CDB, plug i atible CDB
                                          n is not allowed.

XSCALIBA             APEX                 APEX mismatch: PDB h Please contact Oracl PENDING
                                          as installed common  e Support.
                                          APEX. CDB has not in
                                          stalled APEX.

XSCALIBA             Parameter            CDB parameter sga_ta Please check the par PENDING
                                          rget mismatch: Previ ameter in the curren
                                          ous 1680M Current 16 t CDB
                                          96M

XSCALIBA             Parameter            CDB parameter compat Please check the par PENDING
                                          ible mismatch: Previ ameter in the curren
                                          ous '12.1.0.2.0' Cur t CDB
                                          rent '19.0.0'

XSCALIBA             Parameter            CDB parameter pga_ag Please check the par PENDING
                                          gregate_target misma ameter in the curren
                                          tch: Previous 560M C t CDB
                                          urrent 565M

XSCALIBA             CDB undo mode        Undo mode mismatch:  Either create an und PENDING
                                          PDB using SHARED und o tablespace in the
                                          o.  CDB using LOCAL  PDB or be aware that
                                          undo.                 the CDB will not lo
                                                               ok at undo in the PD
                                                               B.


10 rows selected.

Again apex mismatch due to lower version

SQL> CREATE PLUGGABLE DATABASE APDB USING '/tmp/npdb.xml'
  2  COPY
  3  FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/xscalibal/','/apps01/oradata/HYDRA1/');
CREATE PLUGGABLE DATABASE APDB USING '/tmp/npdb.xml'
*
ERROR at line 1:
ORA-65346: The PDB version is lower and components (APEX) are missing in CDB.

Removed apex itself from source

=Xscalibal=>select COMP_ID, VERSION, STATUS from CDB_REGISTRY where COMP_ID='APEX';

COMP_ID                        VERSION                        STATUS
------------------------------ ------------------------------ -----------
APEX                           4.2.5.00.08                    VALID

=Xscalibal=>col COMP_NAME for a20
=Xscalibal=>SELECT c.comp_name,c.version,con.name FROM cdb_registry c
  2         INNER JOIN v$containers con on (c.con_id = con.con_id)
  3         WHERE c.comp_name like '%Application E%';

COMP_NAME            VERSION                        NAME
-------------------- ------------------------------ ------------------------------
Oracle Application E 4.2.5.00.08                    xscaliba
xpress

=Xscalibal=>@?/apex/apxremov_con

PL/SQL procedure successfully completed.

Performing installation in multitenant container database in the background.
The installation progress is spooled into apxremov*_con*.log files.

Please wait...

catcon: ALL catcon-related output will be written to apxremov1_con_catcon_12797.lst
catcon: See apxremov1_con*.log files for output generated by scripts
catcon: See apxremov1_con_*.lst files for spool files, if any
validate_script_path: sqlplus script apxremov1.sql does not exist or is unreadable
catconExec: empty Path returned by validate_script_path for
    SrcDir = 0, FileName = apxremov1.sql
catcon.pl: Unexpected error encountered in catconExec; exiting

catcon: ALL catcon-related output will be written to apxremov2_con_catcon_13009.lst
catcon: See apxremov2_con*.log files for output generated by scripts
catcon: See apxremov2_con_*.lst files for spool files, if any
validate_script_path: sqlplus script apxremov2.sql does not exist or is unreadable
catconExec: empty Path returned by validate_script_path for
    SrcDir = 0, FileName = apxremov2.sql
catcon.pl: Unexpected error encountered in catconExec; exiting


Installation completed. Log files for each container can be found in:

apxremov*_con*.log

You can quickly scan for ORA errors or compilation errors by using a utility
like grep:

grep ORA- *.log
grep PLS- *.log

=Xscalibal=>@?/apex/apxremov.sql
...Removing Application Express

Session altered.


PL/SQL procedure successfully completed.


no rows selected


PL/SQL procedure successfully completed.


Session altered.


PL/SQL procedure successfully completed.


Session altered.


no rows selected


User dropped.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

...Application Express Removed

********************************************************************
** You must exit this SQL*Plus session before running apexins.sql **
********************************************************************

Again re-exported the data to xml file

=Xscalibal=>EXEC DBMS_PDB.DESCRIBE(pdb_descr_file => '/tmp/npdb.xml');

PL/SQL procedure successfully completed

Atlast, there is a missing undo tablespace in xml file because, non-cdb does not have local undo but in pdb, local undo is a separate concept.

SQL> CREATE PLUGGABLE DATABASE APDB USING '/tmp/npdb.xml'
  2  COPY
  3  FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/xscalibal/','/apps01/oradata/HYDRA1/newpdb');
CREATE PLUGGABLE DATABASE APDB USING '/tmp/npdb.xml'
*
ERROR at line 1:
ORA-65353: The undo tablespace is missing from the XML metadata file.

Leave a Reply

%d bloggers like this: