Tuesday, March 15, 2022

ORA-65149: PDB Name Conflicts With Existing Service Name

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



Issue:

Facing below service conflict error while creating new PDB (Pluggable database)

Error:

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

SQL> CREATE PLUGGABLE DATABASE ABC AS CLONE USING '/u01/app/oracle/ABC.xml';
CREATE PLUGGABLE DATABASE ABC AS CLONE USING '/u01/app/oracle/ABC.xml'
  *
ERROR at line 1:
ORA-65149: PDB name conflicts with existing service name in the CDB or the PDB

Verify existing services on CDB

set lines 300
set pages 200
col name for a30;
col PDB for a30;
select SERVICE_ID,NAME,PDB from cdb_SERVICES;


SERVICE_ID NAME                           PDB
---------- --------------------           ---------
         1 SYS$BACKGROUND                 CDB$ROOT
         2 SYS$USERS                      CDB$ROOT
         5 NEWCDBXDB                      CDB$ROOT
         6 NEWCDB                         CDB$ROOT
         3 ORADBXDB                       PDB1
         4 ORADB                          PDB1
         5 DB1DB1XDB                      PDB1
         6 DB1DB1                         PDB2
         7 DB1DMOXDB                      PDB3
    


As per above output ABC service already exists under PDB3 database.

To fix service conflict issue,Connect to PDB3 database and delete ABC service.

                   
SQL> alter session set container=PDB2;

Session altered.

SQL> exec dbms_service.delete_service('
DB1DMOXDB');

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

Now verify services and create PDB

SQL>set lines 300
set pages 200
col name for a30;
col PDB for a30;
select SERVICE_ID,NAME,PDB from cdb_SERVICES;

SERVICE_ID NAME                           PDB
---------- --------------------           ---------
         1 SYS$BACKGROUND                 CDB$ROOT
         2 SYS$USERS                      CDB$ROOT
         5 NEWCDBXDB                      CDB$ROOT
         6 NEWCDB                         CDB$ROOT
         3 ORADBXDB                       PDB1
         4 ORADB                          PDB1
         5 DB1DB1XDB                      PDB1
         6 DB1DB1                         PDB2
         7 DB1DMOXDB                      PDB3

SQL> CREATE PLUGGABLE DATABASE ABC AS CLONE USING '/u01/app/oracle/ABC.xml';


Pluggable database created.


Document Id - 
(Doc ID 2459056.1)

No comments: