8 Replies Latest reply: Aug 10, 2007 6:48 PM by FireFighter RSS

    10g: Clone database with DBCA silent option

    FireFighter
      Hello community,

      I have tried now for several times to make a clone of my existing database with DBCA and "-silent" option. I could improve my progress in cloning but now I always stick in the following error:

      But first, what I have done so far:

      1. Created a clone template of my Database with command:

      dbca -silent -createCloneTemplate -sourceSID DBORIGIN -templateName myTest.dbc -datafileJarLocation /tmp/oratest

      2. Create the clone-database by using the template from (1.) with command:

      dbca -silent -createDatabase -templateName myTest.dbc -cloneTemplate -gdbname DBCLONE -sid DBCLONE -datafileJarLocation /tmp/oratest -datafileDestination /oradata -responseFile NO_VALUE -characterset AL32UTF8

      Then the progress of execution is shown, it ends with a link to a log file. In this log file I can see the following contents:

      ==============================
      Copying database files
      DBCA_PROGRESS : 1%
      DBCA_PROGRESS : 3%
      DBCA_PROGRESS : 11%
      DBCA_PROGRESS : 18%
      DBCA_PROGRESS : 26%
      DBCA_PROGRESS : 33%
      DBCA_PROGRESS : 37%
      Creating and starting Oracle instance
      ORA-01503: CREATE CONTROLFILE failed
      ORA-00200: control file could not be created
      ORA-00202: control file: '/oradata/DBCLONE/<OMF_CONTROL_0>'
      ORA-27040: file create error, unable to create file

      DBCA_PROGRESS : 38%
      ORA-00210: cannot open the specified control file
      ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 4168
      ORA-06512: at line 1

      ORA-01507: database not mounted

      DBCA_PROGRESS : 40%
      DBCA_PROGRESS : 41%
      ORA-01503: CREATE CONTROLFILE failed
      ORA-00200: control file could not be created
      ORA-00202: control file: '/oradata/DBCLONE/<OMF_CONTROL_0>'
      ORA-27040: file create error, unable to create file

      ORA-01507: database not mounted

      DBCA_PROGRESS : 46%
      DBCA_PROGRESS : 47%
      ORA-01219: database not open: queries allowed on fixed tables/views only

      ORA-01507: database not mounted

      DBCA_PROGRESS : 52%
      ORA-01219: database not open: queries allowed on fixed tables/views only

      ORA-01507: database not mounted

      DBCA_PROGRESS : 53%
      DBCA_PROGRESS : 58%
      ORA-06550: line 1, column 7:
      PLS-00201: identifier 'DBMS_DATAPUMP_UTL.REPLACE_DEFAULT_DIR' must be declared
      ....
      ....
      and so on
      ....
      =====================================================

      I have no idea where the "<OMF_CONTROL_0>" comes from. It is nowhere included in my myTest.dbc-file. In my eyes, it looks like that DBCA tries to create the file exactly with this filename - and this fails on Solaris, sure...

      Here is, what I have in my template file "myTest.dbc" regarding the control files:

      =======================
      <ControlfileAttributes id="Controlfile">
      <maxDatafiles>100</maxDatafiles>
      <maxLogfiles>16</maxLogfiles>
      <maxLogMembers>3</maxLogMembers>
      <maxLogHistory>1</maxLogHistory>
      <maxInstances>8</maxInstances>
      <image name="o1_mf_2k1zmdmp_.ctl" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
      <image name="o1_mf_2k1zmdvo_.ctl" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
      </ControlfileAttributes>
      ====================================

      To be honest, it is the first time that i try to use the DBCA with all these "special" options, especially the silent mode.

      Does anyone have an idea what is going wrong in my case described here? What do I or could I change to come to a success clone?

      Maybe, you can tell me where I can find some kind of "how to" for creating a clone using the silent-option.

      Thanks a lot in advance for helping a newbie! ;-)
      Regards
      FireFighter
        • 1. Re: 10g: Clone database with DBCA silent option
          Madrid
          Ref. Oracle® Database Readme
          10g Release 2 (10.2)
          Part Number B14233-04


          40.3.2 Running Database Configuration Assistant (DBCA) in Silent Mode

          In Chapter 2, "Creating an Oracle Database", the following information should be included.

          Silent mode does not have a user interface (other than what you initially input on the command line) or user interaction. It outputs all messages, including information, errors, and warnings, to a log file.

          From the command line, enter the following to see all of the DBCA options that are available when using silent mode:

          dbca -help


          The following sections contain examples that illustrate the use of silent mode.

          DBCA Silent Mode Example 1: Creating a New Database To create a clone database, enter the following on the command line:

          % dbca -silent -createDatabase -templateName Transaction_Processing.dbc
          -gdbname ora10i -sid ora10i -datafileJarLocation
          /private/oracle10i/ora10i/assistants/dbca/templates -datafileDestination
          /private/oracle10i/ora10i/oradata -responseFile NO_VALUE
          -characterset WE8ISO8859P1

          DBCA Silent Mode Example 2: Creating a Seed Template To create a seed template, enter the following on the command line:

          % dbca -silent -createCloneTemplate -sourceDB ora10i -sysDBAUserName
          sys -sysDBAPassword change_on_install -templateName copy_of_ora10i.dbc
          -datafileJarLocation /private/oracle/ora10i/assistants/dbca/templates


          ~ Madrid.
          • 2. Re: 10g: Clone database with DBCA silent option
            FireFighter
            Thanks Madrid,

            I have already read this part of the Oracle documentation. :-)

            What I did was maybe not exactly, but nearly exactly the same. ;-)
            And also when I retry it exactly as described, I still get the same error as already described in my initial post.

            But after all, i can see one area where Oracle tries to refer to the "<OMF_CONTROL_0>" and <OMF_CONTROL_1>. It is included in the pfile "init.ora" which is created when creating the clone database by using my template:

            control_files=("/oradata/DBCLONE/<OMF_CONTROL_0>","/oradata/DBCLONE/<OMF_CONTROL_1>")

            And since Solaris could not create the files with these strange filenames, everything fails what comes after!

            I get more and more the feeling that this is either a problem of wrong configuration on my host or a bug on Solaris Sparc 64bit which didn't occur up to now.... ;-)

            Has anybody here ever tried to clone and to use the clone of a database with the documentation provided by Madrid??

            Still hoping for some hints concerning my problem....i will try to investigate it to give more details later on....

            Regards
            FireFighter

            Message was edited by:
            FireFighter
            • 3. Re: 10g: Clone database with DBCA silent option
              ViragSharma
              Check permission on /oradata/DBCLONE/ and "{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}"

              - Virag Sharma
              http://virag.sharma.googlepages.com
              • 4. Re: 10g: Clone database with DBCA silent option
                Madrid
                Ok, I see, file names like these control_files=("/oradata/DBCLONE/<OMF_CONTROL_0>","/oradata/DBCLONE/<OMF_CONTROL_1>")

                should be replaced by proper valid names. OMF stands for Oracle Managed files, you could either declare an explicit name or use the OMF for control files.

                This is a reference for OMF


                ~ Madrid.
                • 5. Re: 10g: Clone database with DBCA silent option
                  FireFighter
                  Hello,

                  finally I was successful in installing the clone of my DB. :-)

                  You remember that I had problems with the control files and these looked very strange:

                  control_files=("/oradata/DBCLONE/<OMF_CONTROL_0>","/oradata/DBCLONE/<OMF_CONTROL_1>")


                  The hint to check the permission in "/oradata" was a good one. The permissions were right all the time, but Oracle's DBCA was not able to create the sub-directory "DBCLONE". When I created it manually before installing the clone, the installation worked fine!

                  I'm still wondering about this because all other subdirectories were created automatically during running "dbca" (e.g. all subdirectories "DBCLONE" needed below the $ORACLE_BASE/admin/-directory like adump,bdump and so on...).

                  And i'm wondering about the names of the control files:
                  I expected that these strange OMF-names would be replaced by a "normal" file name. But "dbca" was able to create the files exactly with the names "<OMF_CONTROL_0>" and "<OMF_CONTROL_0>"...

                  As I had understood so far from OMF-concept, isn't the idea that Oracle takes care of file-naming instead of myself? I mean it can't be that I have to enter the template for DBCA and manually enter the control files names...

                  I'm still close to the thought that it be a bug that isn't documented until now. Maybe, when I have some time left I will open a service request at metalink.

                  If you are interested in this I will keep you informed on this topic. The other way round I stay interested in your opions and hints for using "dbca" to make and install a DB-clone.

                  Thanks again for you effort to help me as a rookie in Oracle. :-)

                  Regards
                  FireFighter
                  • 6. Re: 10g: Clone database with DBCA silent option
                    Madrid
                    As soon as you have something on this issue it would be very kind from you to share it with us.

                    Best Regards.
                    • 7. Re: 10g: Clone database with DBCA silent option
                      590064
                      Has anybody found the solution jet. I have the same problem with or without the silent mode.
                      What I've figured out is that the files (including the control files) are created but still got the error not connected to oracle after the instance try to restart.

                      Regards
                      • 8. Re: 10g: Clone database with DBCA silent option
                        FireFighter
                        Unfortunately, I haven't found the time to open a service request at Oracle. I try to rebuild what I have done on another test system. When I have all information complete, I will ask them what's happening, especially why the filename-masks for the control file(s) are not replaced but created with "strange" file name as it is in the template file ("<OMF_.....>".

                        I will keep you informed. Please do the same when one of you has any new information. Would be interesting for me the other way round.

                        Regards
                        Fire