7 Replies Latest reply: Apr 30, 2013 4:57 AM by okKarol RSS

    STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat

    okKarol
      Hi There,
      I Need help with Standby SetUp

      Oracle 11.2.0.3/Linux

      I've a Standby and I need to move it into another folder
      So :
      1 - Created the controlfile to trace from the Stby db
      2 - I've Disable my Dataguard Configuration
      3 - Shutdown my Standby Instance
      4 - Move all standby datafiles into new folder
      5 - Startup the Standby database unsing the controlfile trace :

      I get the following Error message :
      ORA-01079: ORACLE database was not properly created, operation aborted

      -- The following commands will create a new control file and use it
      -- to open the database.
      -- Data used by Recovery Manager will be lost.
      -- Additional logs may be required for media recovery of offline
      -- Use this only if the current versions of all online logs are
      -- available.
      -- WARNING! The current control file needs to be checked against
      -- the datafiles to insure it contains the correct files. The
      -- commands printed here may be missing log and/or data files.
      -- Another report should be made after the database has been
      -- successfully opened.
      -- After mounting the created controlfile, the following SQL
      -- statement will place the database in the appropriate
      -- protection mode:
      -- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
      STARTUP NOMOUNT
      CREATE CONTROLFILE REUSE DATABASE "CMOVP" NORESETLOGS ARCHIVELOG
      MAXLOGFILES 16
      MAXLOGMEMBERS 3
      MAXDATAFILES 100
      MAXINSTANCES 8
      MAXLOGHISTORY 5840
      LOGFILE
      GROUP 1 (
      '/mcelnetapp/mcelnetapp/data1/oracle/CMOVP/redo01g1.log',
      '/mcelnetapp/mcelnetapp/data2/oracle/CMOVP/redo02g1.rdo'
      ) SIZE 100M BLOCKSIZE 512,
      GROUP 2 (
      '/mcelnetapp/data1/oracle/CMOVP/redo01g2.log',
      '/mcelnetapp/data2/oracle/CMOVP/redo02g2.rdo'
      ) SIZE 100M BLOCKSIZE 512,
      GROUP 3 (
      '/mcelnetapp/data2/oracle/CMOVP/redo02g3.log',
      '/mcelnetapp/data1/oracle/CMOVP/redo01g3.rdo'
      ) SIZE 100M BLOCKSIZE 512
      -- STANDBY LOGFILE
      -- GROUP 4 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g4.rdo' SIZE 100M BLOCKSIZE 512,
      -- GROUP 5 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g5.rdo' SIZE 100M BLOCKSIZE 512,
      -- GROUP 6 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g6.rdo' SIZE 100M BLOCKSIZE 512,
      -- GROUP 7 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g7.rdo' SIZE 100M BLOCKSIZE 512
      DATAFILE
      '/mcelnetapp/data2/oracle/CMOVP/system01.dbf',
      '/mcelnetapp/data2/oracle/CMOVP/sysaux01.dbf',
      '/mcelnetapp/data2/oracle/CMOVP/undotbs01.dbf',
      '/mcelnetapp/data1/oracle/CMOVP/users01.dbf',
      '/mcelnetapp/data1/oracle/CMOVP/example01.dbf',
      '/mcelnetapp/data1/oracle/CMOVP/AGENTCOMM01.dbf',
      '/mcelnetapp/data2/oracle/CMOVP/ASCAS01.dbf',
      '/mcelnetapp/data1/oracle/CMOVP/ZAP01.dbf'
      CHARACTER SET AL32UTF8
      ;
      -- Commands to re-create incarnation table
      -- Below log names MUST be changed to existing filenames on
      -- disk. Any one log file from each branch can be used to
      -- re-create incarnation records.
      -- ALTER DATABASE REGISTER LOGFILE '/archives/CMOVP/stby/1_1_762083164.arc';
      -- ALTER DATABASE REGISTER LOGFILE '/archives/CMOVP/stby/1_1_810397891.arc';
      -- Recovery is required if any of the datafiles are restored backups,
      -- or if the last shutdown was not normal or immediate.
      RECOVER DATABASE
      -- Set Database Guard and/or Supplemental Logging
      ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
      -- All logs need archiving and a log switch is needed.
      ALTER SYSTEM ARCHIVE LOG ALL;
      -- Database can now be opened normally.
      ALTER DATABASE OPEN;
      -- Commands to add tempfiles to temporary tablespaces.
      -- Online tempfiles have complete space information.
      -- Other tempfiles may require adjustment.
      ALTER TABLESPACE TEMP ADD TEMPFILE '/mcelnetapp/data1/oracle/CMOVP/temp01.dbf'
      SIZE 7120M REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
      -- End of tempfile additions.


      What's is going wrong ?

      Thxs for your Help.
        • 1. Re: STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat
          Mahir M. Quluzade
          okKarol wrote:
          Hi There,
          I Need help with Standby SetUp
          >
          Oracle 11.2.0.3/Linux

          I've a Standby and I need to move it into another folder
          So :
          1 - Created the controlfile to trace from the Stby db
          2 - I've Disable my Dataguard Configuration
          3 - Shutdown my Standby Instance
          4 - Move all standby datafiles into new folder
          5 - Startup the Standby database unsing the controlfile trace :

          I get the following Error message :
          ORA-01079: ORACLE database was not properly created, operation aborted

          -- The following commands will create a new control file and use it
          -- to open the database.
          -- Data used by Recovery Manager will be lost.
          -- Additional logs may be required for media recovery of offline
          -- Use this only if the current versions of all online logs are
          -- available.
          -- WARNING! The current control file needs to be checked against
          -- the datafiles to insure it contains the correct files. The
          -- commands printed here may be missing log and/or data files.
          -- Another report should be made after the database has been
          -- successfully opened.
          -- After mounting the created controlfile, the following SQL
          -- statement will place the database in the appropriate
          -- protection mode:
          -- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
          STARTUP NOMOUNT
          CREATE CONTROLFILE REUSE DATABASE "CMOVP" NORESETLOGS ARCHIVELOG
          MAXLOGFILES 16
          MAXLOGMEMBERS 3
          MAXDATAFILES 100
          MAXINSTANCES 8
          MAXLOGHISTORY 5840
          LOGFILE
          GROUP 1 (
          '/mcelnetapp/mcelnetapp/data1/oracle/CMOVP/redo01g1.log',
          '/mcelnetapp/mcelnetapp/data2/oracle/CMOVP/redo02g1.rdo'
          ) SIZE 100M BLOCKSIZE 512,
          GROUP 2 (
          '/mcelnetapp/data1/oracle/CMOVP/redo01g2.log',
          '/mcelnetapp/data2/oracle/CMOVP/redo02g2.rdo'
          ) SIZE 100M BLOCKSIZE 512,
          GROUP 3 (
          '/mcelnetapp/data2/oracle/CMOVP/redo02g3.log',
          '/mcelnetapp/data1/oracle/CMOVP/redo01g3.rdo'
          ) SIZE 100M BLOCKSIZE 512
          -- STANDBY LOGFILE
          -- GROUP 4 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g4.rdo' SIZE 100M BLOCKSIZE 512,
          -- GROUP 5 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g5.rdo' SIZE 100M BLOCKSIZE 512,
          -- GROUP 6 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g6.rdo' SIZE 100M BLOCKSIZE 512,
          -- GROUP 7 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g7.rdo' SIZE 100M BLOCKSIZE 512
          DATAFILE
          '/mcelnetapp/data2/oracle/CMOVP/system01.dbf',
          '/mcelnetapp/data2/oracle/CMOVP/sysaux01.dbf',
          '/mcelnetapp/data2/oracle/CMOVP/undotbs01.dbf',
          '/mcelnetapp/data1/oracle/CMOVP/users01.dbf',
          '/mcelnetapp/data1/oracle/CMOVP/example01.dbf',
          '/mcelnetapp/data1/oracle/CMOVP/AGENTCOMM01.dbf',
          '/mcelnetapp/data2/oracle/CMOVP/ASCAS01.dbf',
          '/mcelnetapp/data1/oracle/CMOVP/ZAP01.dbf'
          CHARACTER SET AL32UTF8
          ;
          -- Commands to re-create incarnation table
          -- Below log names MUST be changed to existing filenames on
          -- disk. Any one log file from each branch can be used to
          -- re-create incarnation records.
          -- ALTER DATABASE REGISTER LOGFILE '/archives/CMOVP/stby/1_1_762083164.arc';
          -- ALTER DATABASE REGISTER LOGFILE '/archives/CMOVP/stby/1_1_810397891.arc';
          -- Recovery is required if any of the datafiles are restored backups,
          -- or if the last shutdown was not normal or immediate.
          RECOVER DATABASE
          -- Set Database Guard and/or Supplemental Logging
          ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
          -- All logs need archiving and a log switch is needed.
          ALTER SYSTEM ARCHIVE LOG ALL;
          -- Database can now be opened normally.
          ALTER DATABASE OPEN;
          -- Commands to add tempfiles to temporary tablespaces.
          -- Online tempfiles have complete space information.
          -- Other tempfiles may require adjustment.
          ALTER TABLESPACE TEMP ADD TEMPFILE '/mcelnetapp/data1/oracle/CMOVP/temp01.dbf'
          SIZE 7120M REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
          -- End of tempfile additions.


          What's is going wrong ?

          Thxs for your Help.
          Hi,

          I think you must use following steps



          1. Create parameter file for standby database : SQL> create pfile='/u01/pfileStandby.ora';
          2. Chage this paramter file, control_files location.
          3. Disable Redo Apply
          4. Shut immediate
          5. Copy standby control file, and datafile and redo log files, temprary files to your new location .
          6.Starup mount pfile=''/u01/pfileStandby.ora';
          7.1 Alter system set standby_file_management=MANUAL;
          7.2 Rename datafiles, logfiles, tempfiles.
          8. Start Redo Apply .

          Regards
          Mahir M. Quluzade
          • 2. Re: STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat
            okKarol
            Hi

            Txs for your Reply,

            Your solution seems corresponding to the cas I want to move my standby and my Primary database datafiles.

            But the Case here is :

            After creating successfuly my standby I need to move the datafiles into anotjher folder.
            Question ?
            Do I need to Recreate my Standby?
            or
            Can I move the datafiles using the Controlfile to Trace as with a normal Database?

            Thxs
            • 3. Re: STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat
              DK2010
              Hi,

              You can check the below link, May it Help you

              http://learnwithme11g.wordpress.com/2012/02/20/renaming-a-datafile-in-a-physical-standby-environment/
              • 4. Re: STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat
                Mahir M. Quluzade
                okKarol wrote:
                Hi

                Txs for your Reply,

                Your solution seems corresponding to the cas I want to move my standby and my Primary database datafiles.

                But the Case here is :

                After creating successfuly my standby I need to move the datafiles into anotjher folder.
                Question ?
                Do I need to Recreate my Standby?
                No, not need recrearte. If you created standby database success, then you can use my steps for change datafiles to an other folder.
                And don't forget changes db_file_name_convert, and log_file_name_convert parameters for new folder.
                or
                Can I move the datafiles using the Controlfile to Trace as with a normal Database?
                I think yes, really I didn't use this way for standby. I think you must add REUSE option for log files in your script.


                Regards
                Mahir M. Quluzade
                • 5. Re: STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat
                  okKarol
                  That's The Begining of my controlfile.trace

                  STARTUP NOMOUNT
                  CREATE CONTROLFILE REUSE DATABASE "CMOVP" NORESETLOGS ARCHIVELOG
                  MAXLOGFILES 16
                  MAXLOGMEMBERS 3
                  MAXDATAFILES 100
                  MAXINSTANCES 8
                  MAXLOGHISTORY 5840
                  LOGFILE
                  GROUP 1 (
                  '/mcelnetapp/data1/oracle/CMOVP/redo01g1.log',
                  '/mcelnetapp/data2/oracle/CMOVP/redo02g1.rdo'
                  ) SIZE 100M BLOCKSIZE 512,
                  GROUP 2 (
                  '/mcelnetapp/data1/oracle/CMOVP/redo01g2.log',
                  '/mcelnetapp/data2/oracle/CMOVP/redo02g2.rdo'
                  ) SIZE 100M BLOCKSIZE 512,
                  GROUP 3 (
                  '/mcelnetapp/data2/oracle/CMOVP/redo02g3.log',
                  '/mcelnetapp/data1/oracle/CMOVP/redo01g3.rdo'
                  ) SIZE 100M BLOCKSIZE 512
                  -- STANDBY LOGFILE
                  -- GROUP 4 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g4.rdo' SIZE 100M BLOCKSIZE 512,
                  -- GROUP 5 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g5.rdo' SIZE 100M BLOCKSIZE 512,
                  -- GROUP 6 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g6.rdo' SIZE 100M BLOCKSIZE 512,
                  -- GROUP 7 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g7.rdo' SIZE 100M BLOCKSIZE 512
                  DATAFILE
                  '/mcelnetapp/data2/oracle/CMOVP/system01.dbf',
                  '/mcelnetapp/data2/oracle/CMOVP/sysaux01.dbf',
                  '/mcelnetapp/data2/oracle/CMOVP/undotbs01.dbf',
                  '/mcelnetapp/data1/oracle/CMOVP/users01.dbf',
                  '/mcelnetapp/data1/oracle/CMOVP/example01.dbf',
                  '/mcelnetapp/data1/oracle/CMOVP/AGENTCOMM01.dbf'
                  CHARACTER SET AL32UTF8
                  ;

                  and when I run It I getthe following error :

                  ERROR at line 1:
                  ORA-01503: CREATE CONTROLFILE failed
                  ORA-01192: must have at least one enabled thread

                  So I Try another move :

                  I Upafte my initCMOVP.ora file and I comment the line :
                  -- DG_BROKER_START=TRUE
                  And I startup my standby database using the new initCMOVP

                  STARTUP NOMOUNT PFILE='$ORACLE_HOME/dbs/initCMOVP.ora'
                  CREATE CONTROLFILE REUSE DATABASE "CMOVP" NORESETLOGS ARCHIVELOG
                  MAXLOGFILES 16
                  MAXLOGMEMBERS 3
                  MAXDATAFILES 100
                  MAXINSTANCES 8
                  MAXLOGHISTORY 5840
                  .
                  .
                  .
                  Etc Etc Etc
                  I get the Same error

                  Shall I understand the following conclusion :
                  Simply, it isn't possible to rename local standby datafiles withoung renaming it in the primary site,
                  in other terms,
                  We can't never ever recreate the standby using the controlfile to trace?

                  Rgds
                  Carlos

                  Edited by: okKarol on Apr 29, 2013 5:39 AM
                  • 6. Re: STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat
                    Mahir M. Quluzade
                    okKarol wrote:
                    That's The Begining of my controlfile.trace

                    STARTUP NOMOUNT
                    CREATE CONTROLFILE REUSE DATABASE "CMOVP" NORESETLOGS ARCHIVELOG
                    MAXLOGFILES 16
                    MAXLOGMEMBERS 3
                    MAXDATAFILES 100
                    MAXINSTANCES 8
                    MAXLOGHISTORY 5840
                    LOGFILE
                    GROUP 1 (
                    '/mcelnetapp/data1/oracle/CMOVP/redo01g1.log',
                    '/mcelnetapp/data2/oracle/CMOVP/redo02g1.rdo'
                    ) SIZE 100M BLOCKSIZE 512,
                    GROUP 2 (
                    '/mcelnetapp/data1/oracle/CMOVP/redo01g2.log',
                    '/mcelnetapp/data2/oracle/CMOVP/redo02g2.rdo'
                    ) SIZE 100M BLOCKSIZE 512,
                    GROUP 3 (
                    '/mcelnetapp/data2/oracle/CMOVP/redo02g3.log',
                    '/mcelnetapp/data1/oracle/CMOVP/redo01g3.rdo'
                    ) SIZE 100M BLOCKSIZE 512
                    -- STANDBY LOGFILE
                    -- GROUP 4 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g4.rdo' SIZE 100M BLOCKSIZE 512,
                    -- GROUP 5 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g5.rdo' SIZE 100M BLOCKSIZE 512,
                    -- GROUP 6 '/mcelnetapp/data1/oracle/CMOVP/Stbyredo01g6.rdo' SIZE 100M BLOCKSIZE 512,
                    -- GROUP 7 '/mcelnetapp/data2/oracle/CMOVP/Stbyredo01g7.rdo' SIZE 100M BLOCKSIZE 512
                    DATAFILE
                    '/mcelnetapp/data2/oracle/CMOVP/system01.dbf',
                    '/mcelnetapp/data2/oracle/CMOVP/sysaux01.dbf',
                    '/mcelnetapp/data2/oracle/CMOVP/undotbs01.dbf',
                    '/mcelnetapp/data1/oracle/CMOVP/users01.dbf',
                    '/mcelnetapp/data1/oracle/CMOVP/example01.dbf',
                    '/mcelnetapp/data1/oracle/CMOVP/AGENTCOMM01.dbf'
                    CHARACTER SET AL32UTF8
                    ;

                    and when I run It I getthe following error :

                    ERROR at line 1:
                    ORA-01503: CREATE CONTROLFILE failed
                    ORA-01192: must have at least one enabled thread

                    So I Try another move :

                    I Upafte my initCMOVP.ora file and I comment the line :
                    -- DG_BROKER_START=TRUE
                    And I startup my standby database using the new initCMOVP

                    STARTUP NOMOUNT PFILE='$ORACLE_HOME/dbs/initCMOVP.ora'
                    CREATE CONTROLFILE REUSE DATABASE "CMOVP" NORESETLOGS ARCHIVELOG
                    MAXLOGFILES 16
                    MAXLOGMEMBERS 3
                    MAXDATAFILES 100
                    MAXINSTANCES 8
                    MAXLOGHISTORY 5840
                    .
                    .
                    .
                    Etc Etc Etc
                    I get the Same error

                    Shall I understand the following conclusion :
                    Simply, it isn't possible to rename local standby datafiles withoung renaming it in the primary site,
                    in other terms,
                    We can't never ever recreate the standby using the controlfile to trace?

                    Rgds
                    Carlos

                    Edited by: okKarol on Apr 29, 2013 5:39 AM
                    Really I testing now, I can't create as you.
                    Then I think you must my steps, best practice.


                    Thanks
                    Mahir M. Quluzade
                    • 7. Re: STANDBY ISSUE : ORA-01079: ORACLE database was not properly created, operat
                      okKarol
                      Thats nice to know.

                      Thxs for testing

                      rgds
                      carlos