Applications

Expand all | Collapse all

EBS 12.1.3 with 19c database - cloning and pdb rename issue

  • 1.  EBS 12.1.3 with 19c database - cloning and pdb rename issue

    Posted 11-23-2020 09:40
    Hey all,

    I have a on-premise R12.1.3 environment on RHEL that I have recently upgraded to use a 19c database following "Interoperability Notes: Oracle E-Business Suite Release 12.1 with Oracle Database 19c (Doc ID 2580629.1)".

    Now I have been trying to clone that environment to another set of servers following Cloning Oracle E-Business Suite Release 12.1 with Multitenant Database using Rapid Clone (Doc ID 2560690.1).  My current issue however is I when I get to step

    4.1.6 Restore and Start the Target Database

    My current issue however is I when I get to step 4 when I go to rename the PDB after using rman to clone the CDB/PDB.
    4. If the PDB name needs to be changed, execute the following steps to rename the PDB.

    I am getting this error which if I check I can see is based on the services$ listed in the source CDB.
    ERROR at line 1:
    ORA-65174: invalid or conflicting name in service xxxx found in the pluggable database

    A suggestion was to try the 'as clone' clause so tried that but then got this datafile error:
    *
    ERROR at line 1:
    ORA-01537: cannot add file '/u10/oradata/XXX/db/apps_st/data/system01.dbf' -
    file already part of database

    So anybody have any experience here?  Also why does it suggest 'If the PDB name needs to be changed" I mean why wouldn't it?




    ------------------------------
    Mark Schlechte
    DBA
    City of Regina
    Regina SK
    ------------------------------


  • 2.  RE: EBS 12.1.3 with 19c database - cloning and pdb rename issue

    Posted 11-24-2020 08:16

    Hi Mark,

     

    We are on 12c, but also on PDBs. The PDB name cannot be the same as the CDB name. 

    Below are the steps we follow to rename the CDB and PDB after cloning.

     

    Step 1) Set Container Database Name

     

    Correct the container name from SID to SIDCDB to avoid

    "ORA-65042: name is already used by an existing container"

    when attempting to change PDB name to SID.

     

    $ sqlplus / as sysdba

     

    SQL> select name, open_mode from v$database;

     

    NAME      OPEN_MODE

    --------- --------------------

    SID       READ WRITE

     

    SQL> select * from global_name;

     

    GLOBAL_NAME

    --------------------------------------------------------------------------------

    SID.PRVPRDRS.CDMSVCN01.ORACLEVCN.COM

     

    SQL> alter database rename global_name to SIDCDB.PRVPRDRS.ABCVCN01.ORACLEVCN.COM;

     

    Database altered.

     

    SQL> select * from global_name;

     

    GLOBAL_NAME

    --------------------------------------------------------------------------------

    SIDCDB.PRVPRDRS.ABCVCN01.ORACLEVCN.COM

     

    Step 2) Set Pluggable Database Name

     

    SQL> show pdbs

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             2 PDB$SEED                       READ ONLY  NO

             3 SRCSID                         READ WRITE NO

     

    SQL> alter session set container=SRCSID;

     

    Session altered.

     

    SQL> shu immediate

    Pluggable Database closed.

    SQL> startup open restrict

    Pluggable Database opened.

     

    SQL> alter pluggable database SRCSID rename global_name to SID;

     

    Pluggable database altered.

     

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             3 SID                            READ WRITE YES

     

    Step 3) Restart Pluggable Database

     

    Take PDB out of RESTRICTED mode to allow normal database connections.

     

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             3 SID                            READ WRITE YES

    SQL> shu immediate

    Pluggable Database closed.

    SQL> startup

    Pluggable Database opened.

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             3 SID                            READ WRITE NO

     

    Hope that helps,

    Pat

     






  • 3.  RE: EBS 12.1.3 with 19c database - cloning and pdb rename issue

    Posted 11-24-2020 09:14
    Thanks for the reply Pat I wasn't even thinking that there could be people with 12c and multitentant setups.  This is all new to me still.
    In my case I have used rman to clone the source CDB/PDB to my target which is a new CDB but still has the source PDB name if that makes sense.
    So CDB1/PDB1 to CBD2/PBD1.

    The guide for 19c says to do this:
    4. If the PDB name needs to be changed, execute the following steps to rename the PDB. <--- Why wouldn't it need to be changed?
    $ sqlplus / as sysdba
    SQL> alter pluggable database "<SOURCE PDB NAME>" close;
    SQL> alter pluggable database "<SOURCE PDB NAME>" unplug into '<ORACLE_HOME>/dbs/<SOURCE PDB NAME>.xml';
    SQL> drop pluggable database "<SOURCE PDB NAME>";
    SQL> create pluggable database "<NEW PDB NAME>" using '<ORACLE_HOME>/dbs/<SOURCE PDB NAME>.xml' NOCOPY SERVICE_NAME_CONVERT=('ebs_<SOURCE PDB NAME>','ebs_<TARGET PDB NAME>'); <-- this is what fails for me
    SQL> alter pluggable database "<TARGET PDB NAME>" open read write;

    I will review what you have provided with respect to the PDB and see if I can make that work thanks.

    ------------------------------
    Mark Schlechte
    DBA
    City of Regina
    Regina SK
    ------------------------------



  • 4.  RE: EBS 12.1.3 with 19c database - cloning and pdb rename issue

    Posted 11-24-2020 11:00
    Hi Mark,

    Ha, ha, welcome to the club! 

    BTW, we used RMAN "DUPLICATE DATABASE TO SID", perhaps we should have used  "DUPLICATE DATABASE TO SIDCDB"???

    Patricia

    ------------------------------
    Patricia Turner
    Manager, Database Administration
    CDM Smith Inc.
    Boston MA
    -
    ------------------------------



  • 5.  RE: EBS 12.1.3 with 19c database - cloning and pdb rename issue

    Posted 11-24-2020 16:54
    Well glad to part of a club of any kind!
    Thinking I may need to reclone my db to get setup again.
    So just to confirm in your example SID=CDB and you clone it to your other server and then change/rename it?
    I am using ' duplicate target database to CDB2' to get my new CDB setup which comes with the existing PDB.
    So CDB1/PDB1 gets cloned as CDB2/PDB1 in my current setup so is that different than yours or not?

    ------------------------------
    Mark Schlechte
    DBA
    City of Regina
    Regina SK
    ------------------------------



  • 6.  RE: EBS 12.1.3 with 19c database - cloning and pdb rename issue

    Posted 11-25-2020 09:56

    Hi Mark,

     

    In your case, since you are on 19c, the steps might be a little different based on the guides.  Try this note: Renaming 19c PDB Fails With "ORA-65174: invalid or conflicting name in service" (Doc ID 2682761.1)".  Maybe there are some clues in the source and target settings and specifically the XML file. In any case, the queries below may be helpful in comparing what you see with what we see.

    In our case, assume:

    Source Name = PROD

    Target Name = TEST

     

    Source Details:

    [oracle@proddb:/home/oracle]

    $ sqlplus / as sysdba

     

    SQL> select name, open_mode from v$database;

     

    NAME      OPEN_MODE

    --------- --------------------

    PRODCDB   READ WRITE

     

    SQL> select * from global_name;

     

    GLOBAL_NAME

    --------------------------------------------------------------------------------

    PRODCDB.PRVPRDRS.ABCCVCN01.ORACLEVCN.COM

     

    SQL> show con_name

     

    CON_NAME

    ------------------------------

    CDB$ROOT

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             2 PDB$SEED                       READ ONLY  NO

             3 PROD                           READ WRITE NO

     

    SQL> alter session set container=PROD;

     

    Session altered.

     

    SQL> select name from v$services order by name;

     

    NAME

    ----------------------------------------------------------------

    PROD_ebs_patch

    prod

     

    RMAN restore using:

    DUPLICATE DATABASE TO TEST BACKUP LOCATION '/backups/PROD/DB' nofilenamecheck;

    Probably should be TESTCDB, but currently using TEST.

     

    Step 1) Set Container Database Name on Target

     

    Correct the container name from TEST to TESTCDB to avoid

    "ORA-65042: name is already used by an existing container"

    when attempting to change PDB.

     

    [oracle@testdb:/home/oracle]

    $ sqlplus / as sysdba

     

    SQL> select name, open_mode from v$database;

     

    NAME      OPEN_MODE

    --------- --------------------

    TEST       READ WRITE

     

    SQL> select * from global_name;

     

    GLOBAL_NAME

    --------------------------------------------------------------------------------

    TEST.PRVPRDRS.ABCCVCN01.ORACLEVCN.COM

     

    SQL> alter database rename global_name to TESTCDB.PRVPRDRS.ABCCVCN01.ORACLEVCN.COM;

     

    Database altered.

     

    SQL> select * from global_name;

     

    GLOBAL_NAME

    --------------------------------------------------------------------------------

    TESTCDB.PRVPRDRS.ABCCVCN01.ORACLEVCN.COM

     

    Step 2) Set Pluggable Database Name

     

    SQL> show pdbs

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             2 PDB$SEED                       READ ONLY  NO

             3 PROD                           READ WRITE NO

     

    SQL> alter session set container=PROD;

     

    Session altered.

     

    SQL> shu immediate

    Pluggable Database closed.

    SQL> startup open restrict

    Pluggable Database opened.

     

    SQL> alter pluggable database PROD rename global_name to TEST;

     

    Pluggable database altered.

     

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             3 TEST                            READ WRITE YES

     

    Step 3) Restart Pluggable Database

     

    Take PDB out of RESTRICTED mode to allow normal database connections.

     

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             3 TEST                            READ WRITE YES

    SQL> shu immediate

    Pluggable Database closed.

    SQL> startup

    Pluggable Database opened.

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             3 TEST                            READ WRITE NO

     

    Target Details:

    [oracle@testdb:/home/oracle]

    $ sqlplus / as sysdba

     

    SQL> select name, open_mode from v$database;

     

    NAME      OPEN_MODE

    --------- --------------------

    TEST       READ WRITE

     

    SQL> select * from global_name;

     

    GLOBAL_NAME

    --------------------------------------------------------------------------------

    TESTCDB.PRVPRDRS.ABCCVCN01.ORACLEVCN.COM

     

    SQL> show con_name

     

    CON_NAME

    ------------------------------

    CDB$ROOT

    SQL> show pdbs;

     

        CON_ID CON_NAME                       OPEN MODE  RESTRICTED

    ---------- ------------------------------ ---------- ----------

             2 PDB$SEED                       READ ONLY  NO

             3 TEST                           READ WRITE NO

     

    SQL> alter session set container=TEST;

     

    Session altered.

     

    SQL> select name from v$services order by name;

     

    NAME

    ----------------------------------------------------------------

    TEST_ebs_patch

    test

     

    Hope that helps,

    Patricia






  • 7.  RE: EBS 12.1.3 with 19c database - cloning and pdb rename issue

    Posted 11-25-2020 10:47
    Wow, thanks for the detailed reply Patricia.  I do have an SR open and I just wasn't really getting anywhere with it but now that it is escalated (as I need to get this sorted out so I can update prod) I am getting some better feedback so I will see what they say there and also refer to what you have provided.
    I was able to create my cloned pdb from the xml file by not using the 'service_name_convert' syntax so just re-cloning again to verify what actually works again.

    ------------------------------
    Mark Schlechte
    DBA
    City of Regina
    Regina SK
    ------------------------------