3 Replies Latest reply on Feb 18, 2020 11:28 AM by Ashish Kr Mahanta

    Upgraded from 11g to 18c || not able to convert non-cdb to pdbs

    Ashish Kr Mahanta

      Hi All,

       

      Recently, 11g database is upgraded to 18c. Now, I want to convert non-cdb to pdbs. I am using the below link to move forward.

       

      https://oracle-base.com/articles/12c/multitenant-migrate-non-cdb-to-pdb-12cr1

       

      My db version - 18.3.0.0

      O/s Linux - Red Hat Enterprise Linux Server release 7.7 (Maipo)

       

      testdb is my 11g's original database.

       

      Steps -

       

      export ORACLE_SID=testdb

      sqlplus / as sysdba

       

      SHUTDOWN IMMEDIATE;

      STARTUP OPEN READ ONLY;

       

      BEGIN

        DBMS_PDB.DESCRIBE(

          pdb_descr_file => '/u01/testdb.xml');

      END;

      /

       

       

       

      Shutdown the non-CDB database.

      export ORACLE_SID=testdb 
      sqlplus / as sysdba 
      SHUTDOWN IMMEDIATE;

       

      Connect to an existing CDB and create a new PDB using the file describing the non-CDB database. Remember to configure the FILE_NAME_CONVERT parameter to convert the existing files to the new location.

      export ORACLE_SID=cdb1 
      sqlplus / as sysdba 

      SQL> CREATE PLUGGABLE DATABASE pdb6 USING '/u01/testdb.xml'
      COPY FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/testdb/', '/u05/app/oracle/oradata/cdb1/pdb1/'); 


      CREATE PLUGGABLE DATABASE pdb6 USING '/u01/testdb.xml'
      *
      ERROR at line 1:
      ORA-01034: ORACLE not available
      Process ID: 0
      Session ID: 0 Serial number: 0

       

       

       

      Here, error message is as per the behavior of oracle but I am not able to understand what steps doing wrong? Please assist me the steps for converting non-cdb to pdb's.

       

      Regards,

      Ashish Kumar Mahanta

        • 1. Re: Upgraded from 11g to 18c || not able to convert non-cdb to pdbs
          Ashish Kr Mahanta

          Sorry, pdb1 was changed instead of pdb6.

          This time, I opened the testdb database and tried doing the below steps again but getting same error.

           

          SQL> startup open read only
          ORACLE instance started.

          Total System Global Area 2466248392 bytes
          Fixed Size                  8660680 bytes
          Variable Size             603979776 bytes
          Database Buffers         1845493760 bytes
          Redo Buffers                8114176 bytes
          Database mounted.
          Database opened.
          SQL> exit
          Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
          Version 18.3.0.0.0
          [oracle@einoradbtest03 pdb1]$ export ORACLE_SID=cdb1
          [oracle@einoradbtest03 pdb1]$ echo $ORACLE_SID
          cdb1
          [oracle@einoradbtest03 pdb1]$ sqlplus / as sysdba

          SQL*Plus: Release 18.0.0.0.0 - Production on Tue Feb 18 07:52:13 2020
          Version 18.3.0.0.0

          Copyright (c) 1982, 2018, Oracle.  All rights reserved.

          Connected to an idle instance.

           

           

          SQL> CREATE PLUGGABLE DATABASE pdb1 USING '/u01/testdb.xml'
            2   COPY FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/testdba/', '/u05/app/oracle/oradata/cdb1/pdb1/');
          CREATE PLUGGABLE DATABASE pdb1 USING '/u01/testdb.xml'
          *
          ERROR at line 1:
          ORA-01034: ORACLE not available
          Process ID: 0
          Session ID: 0 Serial number: 0

          SQL>

          • 2. Re: Upgraded from 11g to 18c || not able to convert non-cdb to pdbs
            dohdatabase-Oracle

            Hi Ashish,

             

            Have you verified that the CDB is actually open? Try to execute:

            export ORACLE_SID=cdb1
            sqlplus / as sysdba
            SELECT open_mode FROM v$database;
            

             

            Also, you could see in the alert log the status of the database.

             

            The CDB must be open in order for you to create new PDBs or plug-in existing ones.

             

            Finally, please consider upgrading to Oracle Database 19c. It is the release with long-term support. Patching ends in March 2023 but can be extended to March 2026. Oracle Database 18c will be out of support in June 2021.

             

            Regards,

            Daniel

            • 3. Re: Upgraded from 11g to 18c || not able to convert non-cdb to pdbs
              Ashish Kr Mahanta

              Hi,

              You are correct. Without CDB, pdb cannot able to accommodate inside cdb. But on that link, it is not mentioned, that's why I also skipped.

               

              I will create cdb and then try the same steps and acknowledge here.

              Thanks