Thursday, 4 December 2014

ORA-65005: missing or invalid file name pattern for file ORA-01276: Cannot add file



This situation is valid for Oracle 12c Multitenant architecture, Pluggable databases and OMF. Please read the blog item in detail to understand the cause.



We prepared a template database :

    SQL> select file_name from dba_data_files;
    FILE_NAME
    +DATA/PDBTemplate/system.273.829388755
    +DATA/PDBTemplate/sysaux.272.829388715
    +DATA/PDBTemplate/users.268.829388341
    +DATA/PDBTemplate/apex_space.271.829388439
    +DATA/PDBTemplate/edge_010_data.266.829388045

So we wanted to allow the developers to clone the database to test changes. But we encountered a problem :
    SQL> create pluggable database Developer from PDBTemplate file_name_convert = (Developer, PDBTemplate);
    create pluggable database
    *
    ERROR at line 1:
    ORA-01276: Cannot add file +DATA/PDBTemplate/system.273.829388755.

File has an Oracle Managed Files file name. Therefore it looks like the OMF file naming causes us some problems. We corrected the problem with this :

    SQL> create pluggable database Developer from PDBTemplate file_name_convert =
    (
    ・DATA/PDBTemplate/system.273.829388755',・DATA/Developer/system01.dbf・
    ・DATA/PDBTemplate/users.268.829388341',・DATA/Developer/users01.dbf・
    ・DATA/PDBTemplate/sysaux.272.829388715',・DATA/Developer/sysaux01.dbf・
    ・DATA/PDBTemplate/edge_010_data.266.829388045',・DATA/Developer/edge_01.dbf・
    ・DATA/PDBTemplate/apex_space.271.829388439',・DATA/Developer/apex_space01.dbf・
    ); 2 3 4 5 6 7 8
    create pluggable database olakits from ola file_name_convert =
    *
    ERROR at line 1:
    ORA-65005: missing or invalid file name pattern for file -
    /u00/oracle/oradata/PCDB/OLA/temp01.dbf

But It seems that I have forgotten to add temp file

    SQL> create pluggable database olakits from ola file_name_convert =
    (
    ・DATA/PDBTemplate/system.273.829388755',・DATA/Developer/system01.dbf・
    ・DATA/PDBTemplate/users.268.829388341',・DATA/Developer/users01.dbf・
    ・DATA/PDBTemplate/sysaux.272.829388715',・DATA/Developer/sysaux01.dbf・
    ・DATA/PDBTemplate/edge_010_data.266.829388045',・DATA/Developer/edge_01.dbf・
    ・u00/oracle/oradata/PDBTemplate/temp01.dbf・ ・DATA/Developer/temp01.dbf・
    );

Pluggable database created.

It seems everything is OK

No comments:

Post a Comment