How to Resolve ORA-15173: entry 'pdbseed' does not exist in directory

  • by

There're two operations that you might see ORA-15173.

  1. Creating a Multitenant Database
  2. Creating a Pluggable Database

ORA-15173 in DBCA

Saw errors when creating a 19c RAC database by DBCA like the following.

[oracle@primary01 ~]$ vi $ORACLE_BASE/cfgtoollogs/dbca/ORCLCDB/trace.log_2020-10-13_19-42-05PM
...
ORA-19504: failed to create file "+DATA01/ORCLCDB/pdbseed/sysaux01.dbf"
ORA-17502: ksfdcre:4 Failed to create file +DATA01/ORCLCDB/pdbseed/sysaux01.dbf
ORA-15173: entry 'pdbseed' does not exist in directory 'ORCLCDB'

Of course, the whole database creation failed.

Rationale

This is because we choose NOT to use Oracle-Managed File (OMF) for the RAC database, RMAN cannot find the existing directory to restore data files. (Is it a bug?)

Solutions

You can either choose to use OMF during database creation, or using asmcmd mkdir to create necessary directories by grid in advance. For example:

[grid@primary01 ~]$ asmcmd mkdir +DATA/ORCLCDB
[grid@primary01 ~]$ asmcmd mkdir +DATA/ORCLCDB/pdbseed
[grid@primary01 ~]$ asmcmd mkdir +DATA/ORCLCDB/ORCLPDB

The format of directory is:

+<disk_group_name>/<cdb_name>/<pdb_name>

As you can see, we created a folder named PDBSEED for PDB$SEED, the template of pluggable databases.

There's a successful example of creating a 19c RAC database by DBCA without using OMF.

ORA-15173 in Creating PDB

Tried to clone a remote PDB to local, but it failed with ORA-15173:

SQL> create pluggable database ORCLPDB from ORCLPDB@link_to_orclpdb file_name_convert=('ORCLCDB1','ORCLCDB2') parallel 16;
create pluggable database ORCLPDB from ORCLPDB@link_to_orclpdb file_name_convert=('ORCLCDB1','ORCLCDB2') parallel 16
*
ERROR at line 1:
ORA-65169: error encountered while attempting to copy file
+DATA/ORCLCDB1/ORCLPDB/tbs1_01.dbf
ORA-19504: failed to create file "+DATA/ORCLCDB2/ORCLPDB/tbs1_01.dbf"
ORA-17502: ksfdcre:4 Failed to create file
+DATA/ORCLCDB2/ORCLPDB/tbs1_01.dbf
ORA-15173: entry 'ORCLPDB' does not exist in directory 'ORCLCDB2'

The error message clearly showed that it can not find the local folder to store data files from the remote PDB.

Usually, creating a new directory for the new PDB won't be a problem for single-instance databases, but for ASM that stores non-OMF (Oracle-Managed Files) data files, it's a problem.

Solution

To solve ORA-15173, you have to create the directory in advance and manually.

[grid@primary01 ~]$ asmcmd mkdir +DATA/ORCLCDB2/ORCLPDB

Now we can try to clone the PDB again.

SQL> create pluggable database ORCLPDB from ORCLPDB@link_to_orclpdb file_name_convert=('ORCLCDB1','ORCLCDB2') parallel 16;

Pluggable database created.

Leave a Reply

Your email address will not be published. Required fields are marked *