0

I have two systems - SYS1, SYS2(stand alone). On both is running an oracle 19c database. I want to create a plugable database from SYS1 and want to plug in the SYS2 database.

I created the pluggable db in read only mode with the sql developer generated script:

BEGIN
    EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE "SYS1DB" CLOSE IMMEDIATE';
    EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE "SYS1DB" OPEN READ ONLY';
    EXECUTE IMMEDIATE 'CREATE PLUGGABLE DATABASE "SYS2DB" FROM "SYS1DB"
      STORAGE UNLIMITED TEMPFILE REUSE
     FILE_NAME_CONVERT=NONE';
    EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE "SYS1DB" CLOSE IMMEDIATE';
    EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE "SYS1DB" OPEN READ WRITE';
END;

I copied the files (xml,pdb) via USB Stick (because of the stand alone) to my SYS2.

In my SYS2 system I want to plug in the files with:

CREATE PLUGGABLE DATABASE "SYS2DB" USING 'SYS2DB.XML'
  SOURCE_FILE_NAME_CONVERT=NONE
  NOCOPY
  STORAGE UNLIMITED TEMPFILE REUSE;

Then i get this error:

ORA-65139: Mismatch Between XML Metadata File And Data File "path/to/file"
for value afn (125 in the plug XML file, 18 in the data file)
*Cause Either the XML metadata file or the data file was corrupt
*Action Verify that the XML file and the data file are consistent as of the point when the unplug was done and retry the operation

WHen I fix all the afn values in my xml file (for testing reasons), I get this error:

ORA-65139: Mismatch Between XML Metadata File And Data File "path/to/file" for value createscnbas (455193957 in the plug XML file, 455205365 in the data file)

I also tried to plugin the files in my SYS1 database, and this works without errors. I also created in my SYS2 Database pluggable files, and plugin them again in my SYS2 database, this works also.

Why do I get these errors, i am not changing files content, when I copy the files from SYS1 to SYS2.

2
  • @nbk what u mean? i copy the generated xml file to the other system.
    – ca2510fl
    Commented Jun 27 at 10:45
  • i testet it, the xml was found, otherwise there is an another error. the ORA-65139 comes only when a xml file was found and the values are diffrent.
    – ca2510fl
    Commented Jun 27 at 12:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.