13 Replies Latest reply: Feb 20, 2013 8:48 PM by user11982706 RSS

    ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type

    user11982706
      OS Version : AIX 6.1
      DB Version : 11.2.0.1

      I am duplicating database and got below error:
      contents of Memory Script:
      {
         Alter clone database open resetlogs;
      }
      executing Memory Script
      
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-00601: fatal error in recovery manager
      RMAN-03004: fatal error during execution of command
      RMAN-10041: Could not re-create polling channel context following failure.
      RMAN-10024: error setting up for rpc polling
      RMAN-10005: error opening cursor
      RMAN-10002: ORACLE error: ORA-03114: not connected to ORACLE
      RMAN-03002: failure of Duplicate Db command at 02/16/2013 17:20:02
      RMAN-03015: error occurred in stored script Memory Script
      RMAN-06136: ORACLE error from auxiliary database: ORA-01092: ORACLE instance terminated. Disconnection forced
      ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
      Process ID: 44040326
      Session ID: 65 Serial number: 3
      Error is because in target database undo tablespace is UNDOTBS_NEW and in auxiliary database undo tablespace name in init file is UNDOTBS. I followed the meatlink doc 433992.1 which suggest following steps to recover from above error:

      1) edit the parameter UNDO_MANAGEMENT to "MANUAL"
      2) start database again
      3) drop the UNDO tablespace
      4) recreate UNDO tablespace which matches to name in init file.
      5) shutdown & start DB again.

      Now, i edited init file and tried to start DB and got following error:
      oracore@cph-core-db01-s $ sqlplus /nolog
      
      SQL*Plus: Release 11.2.0.1.0 Production on Sat Feb 16 17:22:11 2013
      
      Copyright (c) 1982, 2009, Oracle.  All rights reserved.
      
      SQL> conn sys as sysdba
      Enter password:
      Connected to an idle instance.
      SQL> startup
      ORACLE instance started.
      
      Total System Global Area 4275781632 bytes
      Fixed Size                  2213632 bytes
      Variable Size             822085888 bytes
      Database Buffers         3439329280 bytes
      Redo Buffers               12152832 bytes
      Database mounted.
      ORA-01113: file 1 needs media recovery
      ORA-01110: data file 1: '/u04/oradata/CORE/CORE_DUP/system01.dbf'
      I don't want to run duplicate command with correct UNDO tablespace name. Any other work around for this ?
        • 1. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
          P.Forstmann
          You should restart RMAN DUPLICATE that will not restore datafiles already restored according to http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV440.
          • 2. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
            damorgan
            Creating a new undo tablespace is an option worth considering.

            Of course applying a patch (you should be at 11.2.0.3) might be of value too. ;-)
            • 3. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
              user11982706
              How do i create new UNOD tablespace while system01.dbf needs recovery ?
              • 4. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                Seberg
                Database needs recovery - create new objects.

                Those two things don't go together. Recovery should happen first.
                • 5. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                  Shivananda Rao
                  Hello,

                  You need to first recover the database and later proceed with the other steps (creation of undo tablespace).
                  May be this might help you http://www.appsdbatechstuff.com/2012/12/ora-01113-when-opening-database.html

                  Regards,
                  Shivananda
                  • 6. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                    Hemant K Chitale
                    Error is because in target database undo tablespace is UNDOTBS_NEW and in auxiliary database undo tablespace name in init file is UNDOTBS
                    I don't want to run duplicate command with correct UNDO tablespace name
                    During the cloning, the auxiliary must use the same name for the undo tablespace because it is a physical copy of the source database. You could drop and recreate the undo tablespace in the cloned database after the cloning is complete. Why don't you want to run the duplicate with the correct undo tablespace ?
                    You should realise that the undo tablespace becomes active when the clone (auxiliary) database is OPENed.

                    Now, i edited init file and tried to start DB and got following error
                    ORA-01113: file 1 needs media recovery
                    What ? Is this in the source database where you are cloning from ?
                    You had the liberty to shutdown the source database and recreate the undo tablespace (and did something wrong along the way) ?


                    Hemant K Chitale
                    • 7. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                      user11982706
                      Hemant K Chitale wrote:
                      Error is because in target database undo tablespace is UNDOTBS_NEW and in auxiliary database undo tablespace name in init file is UNDOTBS
                      I don't want to run duplicate command with correct UNDO tablespace name
                      During the cloning, the auxiliary must use the same name for the undo tablespace because it is a physical copy of the source database. You could drop and recreate the undo tablespace in the cloned database after the cloning is complete. Why don't you want to run the duplicate with the correct undo tablespace ?
                      You should realise that the undo tablespace becomes active when the clone (auxiliary) database is OPENed.

                      Now, i edited init file and tried to start DB and got following error
                      ORA-01113: file 1 needs media recovery
                      What ? Is this in the source database where you are cloning from ?
                      You had the liberty to shutdown the source database and recreate the undo tablespace (and did something wrong along the way) ?


                      Hemant K Chitale
                      To be more clear with my problem. I have a database called CORE and i am creating a duplicate of this database as CORE_DUP.
                      Undo tablespace name in CORE is "UNDOTBS_NEW" and undo tablespacename in CORE_DUMP is "UNDOTBS".

                      I am clear that undo tablespace name should be same in source & target databases. But, now mistake has been done.
                      One option is to run duplicate command again, but i just wanted to know, if there is any other work around to overcome this problem.

                      When i am trying to open CORE_DUP database after changing the undo_management=MANUAL then i am getting error "ORA-01113: file 1 needs media recovery".
                      This is mentioned in metalink doc 433992.1 to recover from this type of issue. But it's not working.... :(
                      • 8. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                        Hemant K Chitale
                        That would be because the OPEN RESETLOGS of CORE_DUP had failed.

                        You could try manually simulating a recovery in CORE_DUP
                        STARTUP MOUNT
                        RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL
                        CANCEL
                        ALTER DATABASE OPEN RESETLOGS
                        Hemant K Chitale
                        • 9. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                          user11982706
                          STARTUP MOUNT
                          RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL
                          CANCEL
                          ALTER DATABASE OPEN RESETLOGS

                          Above option is not working for CORE_DUP, i am getting very strange error, while trying to recover i am getting very strange error as below:
                          oracore@cph-core-db01-s $ export ORACLE_SID=CORE_DUP
                          
                          SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 18 11:17:25 2013
                          
                          Copyright (c) 1982, 2009, Oracle.  All rights reserved.
                          
                          SQL> conn sys as sysdba
                          Enter password:
                          Connected to an idle instance.
                          SQL> startup mount
                          ORACLE instance started.
                          
                          Total System Global Area 4275781632 bytes
                          Fixed Size                  2213632 bytes
                          Variable Size             822085888 bytes
                          Database Buffers         3439329280 bytes
                          Redo Buffers               12152832 bytes
                          Database mounted.
                          SQL> alter database open resetlogs;
                          alter database open resetlogs
                          *
                          ERROR at line 1:
                          ORA-01139: RESETLOGS option only valid after an incomplete database recovery
                          
                          
                          SQL> recover database using backup controlfile until cancel;
                          ORA-00283: recovery session canceled due to errors
                          ORA-16433: The database must be opened in read/write mode.
                          Primary database initfile:
                          event="10298 trace name context forever, level 32"
                          db_block_size=8192
                          db_file_multiblock_read_count=16
                          open_cursors=300
                          db_name=CORE
                          cursor_sharing='SIMILAR'
                          global_names=FALSE
                          diagnostic_dest=/u01/app/oracore/diag/CORE
                          #background_dump_dest=/u01/app/oracore/diag/rdbms/bdump
                          #core_dump_dest=/u01/app/oracore/diag/rdbms/cdump
                          #user_dump_dest=/u01/app/oracore/diag/rdbms/udump
                          control_files=("/u01/oradata/CORE/control01.ctl", "/u02/oradata/CORE/control02.ctl", "/u03/oradata/CORE/control03.ctl")
                          log_archive_dest_1='LOCATION=/u05/oradata/CORE/'
                          log_archive_format='CORE_%s%t%r.ARC'
                          job_queue_processes=10
                          compatible=11.2.0.1
                          processes=150
                          fast_start_mttr_target=300
                          filesystemio_options='SETALL'
                          pga_aggregate_target=500M
                          recyclebin='OFF'
                          remote_login_passwordfile='EXCLUSIVE'
                          session_cached_cursors=100
                          sga_target=4G
                          undo_management='AUTO'
                          undo_tablespace='UNDOTBS_NEW'
                          nls_date_format='DD-MON-RRRR'
                          nls_length_semantics='CHAR'
                          initfile for CORE_DUP
                          event="10298 trace name context forever, level 32"
                          db_block_size=8192
                          db_file_multiblock_read_count=16
                          open_cursors=300
                          db_name=CORE_DUP
                          cursor_sharing='SIMILAR'
                          global_names=FALSE
                          diagnostic_dest=/u01/app/oracore/diag/CORE/CORE_DUP
                          control_files=("/u01/oradata/CORE/CORE_DUP/control01.ctl", "/u02/oradata/CORE/CORE_DUP/control02.ctl", "/u03/oradata/CORE/CORE_DUP/control03.ctl")
                          log_archive_dest_1='LOCATION=/u05/oradata/CORE/CORE_DUP/'
                          log_archive_format='CORE_DUP%s%t%r.ARC'
                          job_queue_processes=10
                          compatible=11.2.0.1
                          _compression_compatibility="11.2.0"
                          processes=150
                          fast_start_mttr_target=300
                          filesystemio_options='SETALL'
                          pga_aggregate_target=500M
                          recyclebin='OFF'
                          remote_login_passwordfile='EXCLUSIVE'
                          session_cached_cursors=100
                          sga_target=4G
                          undo_management='AUTO'
                          undo_tablespace='UNDOTBS'
                          nls_date_format='DD-MON-RRRR'
                          nls_length_semantics='CHAR'
                          log_file_name_convert='/CORE','/CORE/CORE_DUP'
                          db_file_name_convert='/CORE','/CORE/CORE_DUP'
                          Duplicate steps are as:
                          oracore@cph-core-db01-s $ rman target sys/zzzz@core catalog rmantst10/zzzzz@catdb auxiliary /
                          
                          Recovery Manager: Release 11.2.0.1.0 - Production on Mon Feb 18 15:50:00 2013
                          
                          Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
                          
                          connected to target database: CORE (DBID=913972022)
                          connected to recovery catalog database
                          connected to auxiliary database: CORE_DUP (not mounted)
                          
                          RMAN> duplicate target database to CORE_DUP;
                          
                          Starting Duplicate Db at 18-FEB-13
                          allocated channel: ORA_AUX_DISK_1
                          channel ORA_AUX_DISK_1: SID=96 device type=DISK
                          allocated channel: ORA_AUX_DISK_2
                          channel ORA_AUX_DISK_2: SID=127 device type=DISK
                          
                          contents of Memory Script:
                          {
                             sql clone "create spfile from memory";
                          }
                          executing Memory Script
                          
                          sql statement: create spfile from memory
                          
                          contents of Memory Script:
                          {
                             shutdown clone immediate;
                             startup clone nomount;
                          }
                          executing Memory Script
                          
                          Oracle instance shut down
                          
                          connected to auxiliary database (not started)
                          Oracle instance started
                          
                          Total System Global Area    4275781632 bytes
                          
                          Fixed Size                     2213632 bytes
                          Variable Size                838863104 bytes
                          Database Buffers            3422552064 bytes
                          Redo Buffers                  12152832 bytes
                          
                          contents of Memory Script:
                          {
                             sql clone "alter system set  db_name =
                           ''CORE'' comment=
                           ''Modified by RMAN duplicate'' scope=spfile";
                             sql clone "alter system set  db_unique_name =
                           ''CORE_DUP'' comment=
                           ''Modified by RMAN duplicate'' scope=spfile";
                             shutdown clone immediate;
                             startup clone force nomount
                             restore clone primary controlfile;
                             alter clone database mount;
                          }
                          executing Memory Script
                          
                          sql statement: alter system set  db_name =  ''CORE'' comment= ''Modified by RMAN duplicate'' scope=spfile
                          
                          sql statement: alter system set  db_unique_name =  ''CORE_DUP'' comment= ''Modified by RMAN duplicate'' scope=spfile
                          
                          Oracle instance shut down
                          
                          Oracle instance started
                          
                          Total System Global Area    4275781632 bytes
                          
                          Fixed Size                     2213632 bytes
                          Variable Size                838863104 bytes
                          Database Buffers            3422552064 bytes
                          Redo Buffers                  12152832 bytes
                          
                          Starting restore at 18-FEB-13
                          allocated channel: ORA_AUX_DISK_1
                          channel ORA_AUX_DISK_1: SID=96 device type=DISK
                          allocated channel: ORA_AUX_DISK_2
                          channel ORA_AUX_DISK_2: SID=127 device type=DISK
                          
                          channel ORA_AUX_DISK_1: starting datafile backup set restore
                          channel ORA_AUX_DISK_1: restoring control file
                          channel ORA_AUX_DISK_1: reading from backup piece /oraclebackup/CORE/DF_L1_CORE_16022013_5fo246k3_175_1
                          channel ORA_AUX_DISK_1: piece handle=/oraclebackup/CORE/DF_L1_CORE_16022013_5fo246k3_175_1 tag=LEVEL1
                          channel ORA_AUX_DISK_1: restored backup piece 1
                          channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
                          output file name=/u01/oradata/CORE/CORE_DUP/control01.ctl
                          output file name=/u02/oradata/CORE/CORE_DUP/control02.ctl
                          output file name=/u03/oradata/CORE/CORE_DUP/control03.ctl
                          Finished restore at 18-FEB-13
                          
                          database mounted
                          
                          contents of Memory Script:
                          {
                             set until scn  1217601;
                             set newname for datafile  1 to
                           "/u04/oradata/CORE/CORE_DUP/system01.dbf";
                             set newname for datafile  2 to
                           "/u04/oradata/CORE/CORE_DUP/sysaux01.dbf";
                             set newname for datafile  4 to
                           "/u04/oradata/CORE/CORE_DUP/users01.dbf";
                             set newname for datafile  5 to
                           "/u04/oradata/CORE/CORE_DUP/users02.dbf";
                             set newname for datafile  6 to
                           "/u04/oradata/CORE/CORE_DUP/users03.dbf";
                             set newname for datafile  9 to
                           "/u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf";
                             restore
                             clone database
                             ;
                          }
                          executing Memory Script
                          
                          executing command: SET until clause
                          
                          executing command: SET NEWNAME
                          
                          executing command: SET NEWNAME
                          
                          executing command: SET NEWNAME
                          
                          executing command: SET NEWNAME
                          
                          executing command: SET NEWNAME
                          
                          executing command: SET NEWNAME
                          
                          Starting restore at 18-FEB-13
                          using channel ORA_AUX_DISK_1
                          using channel ORA_AUX_DISK_2
                          
                          channel ORA_AUX_DISK_1: starting datafile backup set restore
                          channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
                          channel ORA_AUX_DISK_1: restoring datafile 00004 to /u04/oradata/CORE/CORE_DUP/users01.dbf
                          channel ORA_AUX_DISK_1: restoring datafile 00005 to /u04/oradata/CORE/CORE_DUP/users02.dbf
                          channel ORA_AUX_DISK_1: restoring datafile 00006 to /u04/oradata/CORE/CORE_DUP/users03.dbf
                          channel ORA_AUX_DISK_1: reading from backup piece /oraclebackup/CORE/DF_L0_CORE_16022013_55o246fe_165_1
                          channel ORA_AUX_DISK_2: starting datafile backup set restore
                          channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
                          channel ORA_AUX_DISK_2: restoring datafile 00001 to /u04/oradata/CORE/CORE_DUP/system01.dbf
                          channel ORA_AUX_DISK_2: restoring datafile 00002 to /u04/oradata/CORE/CORE_DUP/sysaux01.dbf
                          channel ORA_AUX_DISK_2: restoring datafile 00009 to /u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf
                          channel ORA_AUX_DISK_2: reading from backup piece /oraclebackup/CORE/DF_L0_CORE_16022013_56o246fe_166_1
                          channel ORA_AUX_DISK_2: piece handle=/oraclebackup/CORE/DF_L0_CORE_16022013_56o246fe_166_1 tag=LEVEL0
                          channel ORA_AUX_DISK_2: restored backup piece 1
                          channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:01:15
                          channel ORA_AUX_DISK_1: piece handle=/oraclebackup/CORE/DF_L0_CORE_16022013_55o246fe_165_1 tag=LEVEL0
                          channel ORA_AUX_DISK_1: restored backup piece 1
                          channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:35
                          Finished restore at 18-FEB-13
                          
                          contents of Memory Script:
                          {
                             switch clone datafile all;
                          }
                          executing Memory Script
                          
                          datafile 1 switched to datafile copy
                          input datafile copy RECID=24 STAMP=807724355 file name=/u04/oradata/CORE/CORE_DUP/system01.dbf
                          datafile 2 switched to datafile copy
                          input datafile copy RECID=25 STAMP=807724355 file name=/u04/oradata/CORE/CORE_DUP/sysaux01.dbf
                          datafile 4 switched to datafile copy
                          input datafile copy RECID=26 STAMP=807724356 file name=/u04/oradata/CORE/CORE_DUP/users01.dbf
                          datafile 5 switched to datafile copy
                          input datafile copy RECID=27 STAMP=807724356 file name=/u04/oradata/CORE/CORE_DUP/users02.dbf
                          datafile 6 switched to datafile copy
                          input datafile copy RECID=28 STAMP=807724356 file name=/u04/oradata/CORE/CORE_DUP/users03.dbf
                          datafile 9 switched to datafile copy
                          input datafile copy RECID=29 STAMP=807724356 file name=/u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf
                          
                          contents of Memory Script:
                          {
                             set until scn  1217601;
                             recover
                             clone database
                              delete archivelog
                             ;
                          }
                          executing Memory Script
                          
                          executing command: SET until clause
                          
                          Starting recover at 18-FEB-13
                          using channel ORA_AUX_DISK_1
                          using channel ORA_AUX_DISK_2
                          channel ORA_AUX_DISK_1: starting incremental datafile backup set restore
                          channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
                          destination for restore of datafile 00001: /u04/oradata/CORE/CORE_DUP/system01.dbf
                          destination for restore of datafile 00002: /u04/oradata/CORE/CORE_DUP/sysaux01.dbf
                          destination for restore of datafile 00009: /u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf
                          channel ORA_AUX_DISK_1: reading from backup piece /oraclebackup/CORE/DF_L1_CORE_16022013_5eo246k2_174_1
                          channel ORA_AUX_DISK_2: starting incremental datafile backup set restore
                          channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
                          destination for restore of datafile 00004: /u04/oradata/CORE/CORE_DUP/users01.dbf
                          destination for restore of datafile 00005: /u04/oradata/CORE/CORE_DUP/users02.dbf
                          destination for restore of datafile 00006: /u04/oradata/CORE/CORE_DUP/users03.dbf
                          channel ORA_AUX_DISK_2: reading from backup piece /oraclebackup/CORE/DF_L1_CORE_16022013_5do246k2_173_1
                          channel ORA_AUX_DISK_1: piece handle=/oraclebackup/CORE/DF_L1_CORE_16022013_5eo246k2_174_1 tag=LEVEL1
                          channel ORA_AUX_DISK_1: restored backup piece 1
                          channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
                          channel ORA_AUX_DISK_2: piece handle=/oraclebackup/CORE/DF_L1_CORE_16022013_5do246k2_173_1 tag=LEVEL1
                          channel ORA_AUX_DISK_2: restored backup piece 1
                          channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:01
                          
                          starting media recovery
                          
                          archived log for thread 1 with sequence 1718 is already on disk as file /u05/oradata/CORE/CORE_17181807276264.ARC
                          archived log for thread 1 with sequence 1719 is already on disk as file /u05/oradata/CORE/CORE_17191807276264.ARC
                          archived log for thread 1 with sequence 1720 is already on disk as file /u05/oradata/CORE/CORE_17201807276264.ARC
                          archived log for thread 1 with sequence 1721 is already on disk as file /u05/oradata/CORE/CORE_17211807276264.ARC
                          archived log for thread 1 with sequence 1722 is already on disk as file /u05/oradata/CORE/CORE_17221807276264.ARC
                          archived log for thread 1 with sequence 1723 is already on disk as file /u05/oradata/CORE/CORE_17231807276264.ARC
                          archived log for thread 1 with sequence 1724 is already on disk as file /u05/oradata/CORE/CORE_17241807276264.ARC
                          archived log for thread 1 with sequence 1725 is already on disk as file /u05/oradata/CORE/CORE_17251807276264.ARC
                          archived log for thread 1 with sequence 1726 is already on disk as file /u05/oradata/CORE/CORE_17261807276264.ARC
                          archived log for thread 1 with sequence 1727 is already on disk as file /u05/oradata/CORE/CORE_17271807276264.ARC
                          archived log for thread 1 with sequence 1728 is already on disk as file /u05/oradata/CORE/CORE_17281807276264.ARC
                          archived log for thread 1 with sequence 1729 is already on disk as file /u05/oradata/CORE/CORE_17291807276264.ARC
                          archived log for thread 1 with sequence 1730 is already on disk as file /u05/oradata/CORE/CORE_17301807276264.ARC
                          archived log for thread 1 with sequence 1731 is already on disk as file /u05/oradata/CORE/CORE_17311807276264.ARC
                          archived log for thread 1 with sequence 1732 is already on disk as file /u05/oradata/CORE/CORE_17321807276264.ARC
                          archived log for thread 1 with sequence 1733 is already on disk as file /u05/oradata/CORE/CORE_17331807276264.ARC
                          archived log for thread 1 with sequence 1734 is already on disk as file /u05/oradata/CORE/CORE_17341807276264.ARC
                          archived log for thread 1 with sequence 1735 is already on disk as file /u05/oradata/CORE/CORE_17351807276264.ARC
                          archived log for thread 1 with sequence 1736 is already on disk as file /u05/oradata/CORE/CORE_17361807276264.ARC
                          archived log for thread 1 with sequence 1737 is already on disk as file /u05/oradata/CORE/CORE_17371807276264.ARC
                          archived log for thread 1 with sequence 1738 is already on disk as file /u05/oradata/CORE/CORE_17381807276264.ARC
                          archived log for thread 1 with sequence 1739 is already on disk as file /u05/oradata/CORE/CORE_17391807276264.ARC
                          archived log for thread 1 with sequence 1740 is already on disk as file /u05/oradata/CORE/CORE_17401807276264.ARC
                          archived log for thread 1 with sequence 1741 is already on disk as file /u05/oradata/CORE/CORE_17411807276264.ARC
                          archived log for thread 1 with sequence 1742 is already on disk as file /u05/oradata/CORE/CORE_17421807276264.ARC
                          archived log for thread 1 with sequence 1743 is already on disk as file /u05/oradata/CORE/CORE_17431807276264.ARC
                          archived log for thread 1 with sequence 1744 is already on disk as file /u05/oradata/CORE/CORE_17441807276264.ARC
                          channel ORA_AUX_DISK_1: starting archived log restore to default destination
                          channel ORA_AUX_DISK_1: restoring archived log
                          archived log thread=1 sequence=1710
                          channel ORA_AUX_DISK_1: reading from backup piece /oraclebackup/CORE/ARC_1HR_CORE_16022013_5jo24jp8_179_1
                          channel ORA_AUX_DISK_2: starting archived log restore to default destination
                          channel ORA_AUX_DISK_2: restoring archived log
                          archived log thread=1 sequence=1711
                          channel ORA_AUX_DISK_2: restoring archived log
                          archived log thread=1 sequence=1712
                          channel ORA_AUX_DISK_2: restoring archived log
                          archived log thread=1 sequence=1713
                          channel ORA_AUX_DISK_2: restoring archived log
                          archived log thread=1 sequence=1714
                          channel ORA_AUX_DISK_2: restoring archived log
                          archived log thread=1 sequence=1715
                          channel ORA_AUX_DISK_2: restoring archived log
                          archived log thread=1 sequence=1716
                          channel ORA_AUX_DISK_2: restoring archived log
                          archived log thread=1 sequence=1717
                          channel ORA_AUX_DISK_2: reading from backup piece /oraclebackup/CORE/ARC_1HR_CORE_18022013_5ko296uf_180_1
                          channel ORA_AUX_DISK_1: piece handle=/oraclebackup/CORE/ARC_1HR_CORE_16022013_5jo24jp8_179_1 tag=ARC_1HR
                          channel ORA_AUX_DISK_1: restored backup piece 1
                          channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17101807276264.ARC thread=1 sequence=1710
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17101807276264.ARC RECID=3041 STAMP=807724360
                          channel ORA_AUX_DISK_2: piece handle=/oraclebackup/CORE/ARC_1HR_CORE_18022013_5ko296uf_180_1 tag=ARC_1HR
                          channel ORA_AUX_DISK_2: restored backup piece 1
                          channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:08
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17111807276264.ARC thread=1 sequence=1711
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17111807276264.ARC RECID=3042 STAMP=807724362
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17121807276264.ARC thread=1 sequence=1712
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17121807276264.ARC RECID=3043 STAMP=807724363
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17131807276264.ARC thread=1 sequence=1713
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17131807276264.ARC RECID=3044 STAMP=807724367
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17141807276264.ARC thread=1 sequence=1714
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17141807276264.ARC RECID=3048 STAMP=807724367
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17151807276264.ARC thread=1 sequence=1715
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17151807276264.ARC RECID=3046 STAMP=807724367
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17161807276264.ARC thread=1 sequence=1716
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17161807276264.ARC RECID=3045 STAMP=807724367
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17171807276264.ARC thread=1 sequence=1717
                          channel clone_default: deleting archived log(s)
                          archived log file name=/u05/oradata/CORE/CORE_DUP/CORE_DUP17171807276264.ARC RECID=3047 STAMP=807724367
                          archived log file name=/u05/oradata/CORE/CORE_17181807276264.ARC thread=1 sequence=1718
                          archived log file name=/u05/oradata/CORE/CORE_17191807276264.ARC thread=1 sequence=1719
                          archived log file name=/u05/oradata/CORE/CORE_17201807276264.ARC thread=1 sequence=1720
                          archived log file name=/u05/oradata/CORE/CORE_17211807276264.ARC thread=1 sequence=1721
                          archived log file name=/u05/oradata/CORE/CORE_17221807276264.ARC thread=1 sequence=1722
                          archived log file name=/u05/oradata/CORE/CORE_17231807276264.ARC thread=1 sequence=1723
                          archived log file name=/u05/oradata/CORE/CORE_17241807276264.ARC thread=1 sequence=1724
                          archived log file name=/u05/oradata/CORE/CORE_17251807276264.ARC thread=1 sequence=1725
                          archived log file name=/u05/oradata/CORE/CORE_17261807276264.ARC thread=1 sequence=1726
                          archived log file name=/u05/oradata/CORE/CORE_17271807276264.ARC thread=1 sequence=1727
                          archived log file name=/u05/oradata/CORE/CORE_17281807276264.ARC thread=1 sequence=1728
                          archived log file name=/u05/oradata/CORE/CORE_17291807276264.ARC thread=1 sequence=1729
                          archived log file name=/u05/oradata/CORE/CORE_17301807276264.ARC thread=1 sequence=1730
                          archived log file name=/u05/oradata/CORE/CORE_17311807276264.ARC thread=1 sequence=1731
                          archived log file name=/u05/oradata/CORE/CORE_17321807276264.ARC thread=1 sequence=1732
                          archived log file name=/u05/oradata/CORE/CORE_17331807276264.ARC thread=1 sequence=1733
                          archived log file name=/u05/oradata/CORE/CORE_17341807276264.ARC thread=1 sequence=1734
                          archived log file name=/u05/oradata/CORE/CORE_17351807276264.ARC thread=1 sequence=1735
                          archived log file name=/u05/oradata/CORE/CORE_17361807276264.ARC thread=1 sequence=1736
                          archived log file name=/u05/oradata/CORE/CORE_17371807276264.ARC thread=1 sequence=1737
                          archived log file name=/u05/oradata/CORE/CORE_17381807276264.ARC thread=1 sequence=1738
                          archived log file name=/u05/oradata/CORE/CORE_17391807276264.ARC thread=1 sequence=1739
                          archived log file name=/u05/oradata/CORE/CORE_17401807276264.ARC thread=1 sequence=1740
                          archived log file name=/u05/oradata/CORE/CORE_17411807276264.ARC thread=1 sequence=1741
                          archived log file name=/u05/oradata/CORE/CORE_17421807276264.ARC thread=1 sequence=1742
                          archived log file name=/u05/oradata/CORE/CORE_17431807276264.ARC thread=1 sequence=1743
                          archived log file name=/u05/oradata/CORE/CORE_17441807276264.ARC thread=1 sequence=1744
                          media recovery complete, elapsed time: 00:00:33
                          Finished recover at 18-FEB-13
                          
                          contents of Memory Script:
                          {
                             shutdown clone immediate;
                             startup clone nomount;
                             sql clone "alter system set  db_name =
                           ''CORE_DUP'' comment=
                           ''Reset to original value by RMAN'' scope=spfile";
                             sql clone "alter system reset  db_unique_name scope=spfile";
                             shutdown clone immediate;
                             startup clone nomount;
                          }
                          executing Memory Script
                          
                          database dismounted
                          Oracle instance shut down
                          
                          connected to auxiliary database (not started)
                          Oracle instance started
                          
                          Total System Global Area    4275781632 bytes
                          
                          Fixed Size                     2213632 bytes
                          Variable Size                838863104 bytes
                          Database Buffers            3422552064 bytes
                          Redo Buffers                  12152832 bytes
                          
                          sql statement: alter system set  db_name =  ''CORE_DUP'' comment= ''Reset to original value by RMAN'' scope=spfile
                          
                          sql statement: alter system reset  db_unique_name scope=spfile
                          
                          Oracle instance shut down
                          
                          connected to auxiliary database (not started)
                          Oracle instance started
                          
                          Total System Global Area    4275781632 bytes
                          
                          Fixed Size                     2213632 bytes
                          Variable Size                838863104 bytes
                          Database Buffers            3422552064 bytes
                          Redo Buffers                  12152832 bytes
                          sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CORE_DUP" RESETLOGS ARCHIVELOG
                            MAXLOGFILES     32
                            MAXLOGMEMBERS      4
                            MAXDATAFILES      500
                            MAXINSTANCES     1
                            MAXLOGHISTORY     2298
                           LOGFILE
                            GROUP  1 ( '/u02/oradata/CORE/CORE_DUP/redo01a.log', '/u03/oradata/CORE/CORE_DUP/redo01b.log' ) SIZE 10 M  REUSE,
                            GROUP  2 ( '/u02/oradata/CORE/CORE_DUP/redo02a.log', '/u03/oradata/CORE/CORE_DUP/redo02b.log' ) SIZE 10 M  REUSE,
                            GROUP  3 ( '/u02/oradata/CORE/CORE_DUP/redo03a.log', '/u03/oradata/CORE/CORE_DUP/redo03b.log' ) SIZE 10 M  REUSE
                           DATAFILE
                            '/u04/oradata/CORE/CORE_DUP/system01.dbf'
                           CHARACTER SET AL32UTF8
                          
                          
                          contents of Memory Script:
                          {
                             set newname for tempfile  1 to
                           "/u04/oradata/CORE/CORE_DUP/temp01.dbf";
                             switch clone tempfile all;
                             catalog clone datafilecopy  "/u04/oradata/CORE/CORE_DUP/sysaux01.dbf",
                           "/u04/oradata/CORE/CORE_DUP/users01.dbf",
                           "/u04/oradata/CORE/CORE_DUP/users02.dbf",
                           "/u04/oradata/CORE/CORE_DUP/users03.dbf",
                           "/u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf";
                             switch clone datafile all;
                          }
                          executing Memory Script
                          
                          executing command: SET NEWNAME
                          
                          renamed tempfile 1 to /u04/oradata/CORE/CORE_DUP/temp01.dbf in control file
                          
                          cataloged datafile copy
                          datafile copy file name=/u04/oradata/CORE/CORE_DUP/sysaux01.dbf RECID=1 STAMP=807724423
                          cataloged datafile copy
                          datafile copy file name=/u04/oradata/CORE/CORE_DUP/users01.dbf RECID=2 STAMP=807724423
                          cataloged datafile copy
                          datafile copy file name=/u04/oradata/CORE/CORE_DUP/users02.dbf RECID=3 STAMP=807724423
                          cataloged datafile copy
                          datafile copy file name=/u04/oradata/CORE/CORE_DUP/users03.dbf RECID=4 STAMP=807724423
                          cataloged datafile copy
                          datafile copy file name=/u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf RECID=5 STAMP=807724423
                          
                          datafile 2 switched to datafile copy
                          input datafile copy RECID=1 STAMP=807724423 file name=/u04/oradata/CORE/CORE_DUP/sysaux01.dbf
                          datafile 4 switched to datafile copy
                          input datafile copy RECID=2 STAMP=807724423 file name=/u04/oradata/CORE/CORE_DUP/users01.dbf
                          datafile 5 switched to datafile copy
                          input datafile copy RECID=3 STAMP=807724423 file name=/u04/oradata/CORE/CORE_DUP/users02.dbf
                          datafile 6 switched to datafile copy
                          input datafile copy RECID=4 STAMP=807724423 file name=/u04/oradata/CORE/CORE_DUP/users03.dbf
                          datafile 9 switched to datafile copy
                          input datafile copy RECID=5 STAMP=807724423 file name=/u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf
                          
                          contents of Memory Script:
                          {
                             Alter clone database open resetlogs;
                          }
                          executing Memory Script
                          
                          RMAN-00571: ===========================================================
                          RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                          RMAN-00571: ===========================================================
                          RMAN-00601: fatal error in recovery manager
                          RMAN-03004: fatal error during execution of command
                          RMAN-10041: Could not re-create polling channel context following failure.
                          RMAN-10024: error setting up for rpc polling
                          RMAN-10005: error opening cursor
                          RMAN-10002: ORACLE error: ORA-03114: not connected to ORACLE
                          RMAN-03002: failure of Duplicate Db command at 02/18/2013 15:53:50
                          RMAN-03015: error occurred in stored script Memory Script
                          RMAN-06136: ORACLE error from auxiliary database: ORA-01092: ORACLE instance terminated. Disconnection forced
                          ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                          Process ID: 3670170
                          Session ID: 33 Serial number: 7
                          oracore@cph-core-db01-s $
                          • 10. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                            Shivananda Rao
                            Hello,

                            Use the same name for the parameter "undo_tablespace" in the auxiliary database as that available on the Primary database.
                            Primary:
                            undo_tablespace='UNDOTBS_NEW'
                            
                            Auxiliary:
                            undo_tablespace='UNDOTBS_NEW'
                            Once the database is cloned and auxiliary database is opened with resetlogs, you can drop and re-create new undo tablespace in it and set it as the default undo tablespace.

                            Regards,
                            Shivananda
                            • 11. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                              user11982706
                              Problem i am getting is even after making UNDO tablespace name same in both database.

                              It seems that i am getting hit by bug 8422605 as per metalink. Checking with support for confirmation and thanks everyone for taking time to check the problem i am facing......
                              • 12. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                                Hemant K Chitale
                                Yes. This :
                                ORA-16433: The database must be opened in read/write mode.
                                is curious.


                                Hemant K Chitale
                                • 13. Re: ORA-30012: undo tablespace 'UNDOTBS' does not exist or of wrong type
                                  user11982706
                                  Error message "ORA-16433: The database must be opened in read/write mode." is bug 14744052 and workaround is to recreate controlfile of duplicate database and do recovery if required and open with resetlogs. Below are my steps:
                                  SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 21 03:37:37 2013
                                  
                                  Copyright (c) 1982, 2009, Oracle.  All rights reserved.
                                  
                                  SQL> conn sys as sysdba
                                  Enter password:
                                  Connected to an idle instance.
                                  SQL> startup mount
                                  ORACLE instance started.
                                  
                                  Total System Global Area 4275781632 bytes
                                  Fixed Size                  2213632 bytes
                                  Variable Size             822085888 bytes
                                  Database Buffers         3439329280 bytes
                                  Redo Buffers               12152832 bytes
                                  Database mounted.
                                  SQL> alter database open;
                                  alter database open
                                  *
                                  ERROR at line 1:
                                  ORA-01113: file 1 needs media recovery
                                  ORA-01110: data file 1: '/u04/oradata/CORE/CORE_DUP/system01.dbf'
                                  
                                  
                                  SQL> alter database open resetlogs;
                                  alter database open resetlogs
                                  *
                                  ERROR at line 1:
                                  ORA-01139: RESETLOGS option only valid after an incomplete database recovery
                                  
                                  
                                  SQL> recover database using backup controlfile;
                                  ORA-00283: recovery session canceled due to errors
                                  ORA-16433: The database must be opened in read/write mode.
                                  
                                  
                                  SQL> shutdown immediate;
                                  ORA-01109: database not open
                                  
                                  
                                  Database dismounted.
                                  ORACLE instance shut down.
                                  SQL> startup nomount
                                  ORACLE instance started.
                                  
                                  Total System Global Area 4275781632 bytes
                                  Fixed Size                  2213632 bytes
                                  Variable Size             822085888 bytes
                                  Database Buffers         3439329280 bytes
                                  Redo Buffers               12152832 bytes
                                  SQL> CREATE CONTROLFILE REUSE DATABASE "CORE_DUP" RESETLOGS  ARCHIVELOG
                                    2      MAXLOGFILES 32
                                    3      MAXLOGMEMBERS 4
                                    4      MAXDATAFILES 500
                                    5      MAXINSTANCES 1
                                    6      MAXLOGHISTORY 2298
                                    7  LOGFILE
                                    8    GROUP 1 (
                                    9      '/u02/oradata/CORE/CORE_DUP/redo01a.log',
                                   10      '/u03/oradata/CORE/CORE_DUP/redo01b.log'
                                   11    ) SIZE 10M BLOCKSIZE 512,
                                   12    GROUP 2 (
                                   13      '/u02/oradata/CORE/CORE_DUP/redo02a.log',
                                   14      '/u03/oradata/CORE/CORE_DUP/redo02b.log'
                                   15    ) SIZE 10M BLOCKSIZE 512,
                                    GROUP 3 (
                                   16   17      '/u02/oradata/CORE/CORE_DUP/redo03a.log',
                                   18      '/u03/oradata/CORE/CORE_DUP/redo03b.log'
                                   19    ) SIZE 10M BLOCKSIZE 512
                                   20  -- STANDBY LOGFILE
                                  DATAFILE
                                   21   22    '/u04/oradata/CORE/CORE_DUP/system01.dbf',
                                   23    '/u04/oradata/CORE/CORE_DUP/sysaux01.dbf',
                                    '/u04/oradata/CORE/CORE_DUP/users01.dbf',
                                   24   25    '/u04/oradata/CORE/CORE_DUP/users02.dbf',
                                   26    '/u04/oradata/CORE/CORE_DUP/users03.dbf',
                                   27    '/u04/oradata/CORE/CORE_DUP/undotbs_new01.dbf'
                                   28  CHARACTER SET AL32UTF8
                                   29  ;
                                  
                                  Control file created.
                                  
                                  SQL> recover database using backup controlfile;
                                  ORA-00279: change 1296686 generated at 02/20/2013 10:39:07 needed for thread 1
                                  ORA-00289: suggestion : /u05/oradata/CORE/CORE_DUP/CORE_DUP11807878344.ARC
                                  ORA-00280: change 1296686 for thread 1 is in sequence #1
                                  
                                  
                                  Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
                                  /u02/oradata/CORE/CORE_DUP/redo01a.log
                                  Log applied.
                                  Media recovery complete.
                                  SQL> alter database open resetlogs;
                                  
                                  Database altered.
                                  
                                  
                                  SQL> select open_mode from v$database;
                                  
                                  OPEN_MODE
                                  --------------------
                                  READ WRITE