ORA-65149: PDB name conflicts with existing service name in the CDB or the PDB

ORA-65149: PDB name conflicts with existing service name in the CDB or the PDB
Photo by Timelab Pro / Unsplash


After refreshing a database with a container database, you need to restore the refreshed name of the pluggable database to the expected in the non-prod environment. For this, you would first connect to the PDB and restart it on "open restrict" mode:

SQL> alter session set container=DBONEPDB;
Session altered. 
SQL> shutdown immediate; 
Pluggable Database closed. 

SQL> startup open restrict 
Pluggable Database opened.

Then, you would change the name from the name used in production ("DBONE") to the one not used in production ("NONPRODDB"):

SQL> alter pluggable database DBONE rename global_name to NONPRODDB;

This may show the following error:

ORA-65149: PDB name conflicts with existing service name in the CDB or the PDB

To resolve this, follow the next steps: