How to Check PDB is compatible with a new CDB

To test if a PDB is compatible with a new CDB before plugging it in, use the DBMS_PDB.CHECK_PLUG_COMPATIBILITY function in the target CDB. This function checks for incompatibilities like patch levels, character sets, database options, and the COMPATIBLE parameter setting.

Generate a PDB Description File (XML): Before you can run the check, you must have an XML metadata file that describes the PDB. This is usually created during the unplugging process from the source CDB or by using DBMS_PDB.DESCRIBE.
Access to Target CDB: You need SYSDBA privileges on the target CDB.

— On Source CDB

BEGIN
DBMS_PDB.DESCRIBE(
pdb_descr_file => '/tmp/pdb_description.xml',
pdb_name => 'YOUR_PDB_NAME');
END;
/
 $ grep -v "<parameter>" /tmp/pdb_description.xml > /tmp/pdb_description.xml_no_param.xml 

— On Target CDB

SET SERVEROUTPUT ON
DECLARE
compatible CONSTANT VARCHAR2(3) :=
CASE DBMS_PDB.CHECK_PLUG_COMPATIBILITY(
pdb_descr_file => '/tmp/pdb_description.xml',
pdb_name => 'NEW_PDB_NAME')
WHEN TRUE THEN 'YES'
ELSE 'NO'
END;
BEGIN
DBMS_OUTPUT.PUT_LINE('Is the future PDB compatible? ==> ' || compatible);
END;
/

Check for Violations

COLUMN MESSAGE FORMAT A60
COLUMN STATUS FORMAT A10
SELECT NAME, TYPE, MESSAGE, STATUS FROM PDB_PLUG_IN_VIOLATIONS
ORDER BY TIME;