Datafile on Standby Database is created under incorrect directory

(Doc ID 2346623.1)

Last updated on JANUARY 14, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

Symptoms

This problem may happen on CDB (Container Database) with Data Guard + OMF (Oracle Managed Files).
When new PDB is created on Primary Database, new PDB is also created on Standby Database.

If datafiles are located under ASM, file path is specified by naming method of OMF.
File path defined by OMF contains GUID as follows.
So all datafiles of specific PDB should be located under same file path which has GUID.

* Expected File Path

SQL> select con_id, file#, name from v$datafile where con_id = (select pdb_id from cdb_pdbs where pdb_name='PDB1') order by 1,2;

CON_ID FILE# NAME
---------- ---------- --------------------------------------------------------------------------------
5 152 +DATA/DGS1221/5B3A68CAD71F5A0AE0536538A8C0C7BC/DATAFILE/system.401.957082251
5 153 +DATA/DGS1221/5B3A68CAD71F5A0AE0536538A8C0C7BC/DATAFILE/sysaux.375.957082263
5 154 +DATA/DGS1221/5B3A68CAD71F5A0AE0536538A8C0C7BC/DATAFILE/undotbs1.419.957082279
5 155 +DATA/DGS1221/5B3A68CAD71F5A0AE0536538A8C0C7BC/DATAFILE/pdb1tbs.395.957082289
5 156 +DATA/DGS1221/5B3A68CAD71F5A0AE0536538A8C0C7BC/DATAFILE/testtbs.399.957082311

But on Standby Database, some data files are located under different file path as follows.
At this case, tablespace PDB1TBS(file#160) and TESTBS(file#161) are created under wrong file path.

* Unexpected File Path

SQL> select con_id, file#, name from v$datafile where con_id = (select pdb_id from cdb_pdbs where pdb_name='PDB1') order by 1,2;

CON_ID FILE# NAME
---------- ---------- --------------------------------------------------------------------------------
6 157 +DATA/DGS1221/5B3A70869D385D01E0536538A8C0E6B3/DATAFILE/system.401.957082377
6 158 +DATA/DGS1221/5B3A70869D385D01E0536538A8C0E6B3/DATAFILE/sysaux.419.957082389
6 159 +DATA/DGS1221/5B3A70869D385D01E0536538A8C0E6B3/DATAFILE/undotbs1.395.957082405
6 160 +DATA/DGS1221/5B3A29801C513925E0536538A8C0D113/DATAFILE/pdb1tbs.408.957082415
6 161 +DATA/DGS1221/5B3A29801C513925E0536538A8C0D113/DATAFILE/testtbs.374.957082435


And at above case, "show pdbs" command does not show existing PDB name on Standby Database.
But cdb_pdbs view show all existing PDB on Standby Database.

Changes

This problem may happen  on CDB (Container Database) with Data Guard + OMF.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms