{"id":9822,"date":"2017-02-24T10:44:35","date_gmt":"2017-02-24T09:44:35","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/"},"modified":"2017-02-24T10:44:35","modified_gmt":"2017-02-24T09:44:35","slug":"oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/","title":{"rendered":"Oracle 12c &#8211; Recreating a Controlfile in a Data Guard environment with noresetlogs"},"content":{"rendered":"<h2>By William Sescu<\/h2>\n<p>Sometimes you might run into situations where the controlfile does not represent the backups and archivelogs correctly, because of a mismatch of the control_file_record_keep_time and the RMAN retention. The controlfile has non circular and a circular records. Non circular are e.g. database information, redo threads, datafiles and so on. These non circular records don&#8217;t age out, however, they can be reused, e.g. when a tablespace is dropped. The circular records are e.g. the log history, archived logs, backupsets, datafile copies and so on. These records can age out. So, when you have a control_file_record_keep_time of 7 days and a RMAN recovery window of 14 days, then you obviously have a mismatch here. In 11gR2, Oracle stores 37 different record types in the control file, which can be check with:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SELECT type FROM v$controlfile_record_section ORDER BY 1;<\/pre>\n<p>12cR1 stores 41 different record types, where the AUXILIARY DATAFILE COPY, MULTI INSTANCE REDO APPLY, PDB RECORD and PDBINC RECORD was added. In 12cR2 there are even more. The TABLESPACE KEY HISTORY record type was added, so you end up with 42 different record types in 12cR2.<\/p>\n<p>If RMAN needs to add new backup set or archive log record to the control file, any records that expired as per the control_file_record_keep_time parameter are overwritten. But coming back to my issue. My controlfile is out of sync with the recovery catalog and in some situation you can&#8217;t correct it anymore, even with delete force commands or alike, and you end up with error like the following:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">ORA-19633: control file record 8857 is out of sync with recovery catalog<\/pre>\n<p>There might be other solutions to fix it, however, I want to have a clean control file and so I am recreating it manually. However, I don&#8217;t want to open the DB with resetlogs.<\/p>\n<p>The high level steps to get this done are<\/p>\n<ul>\n<li>Disable everything that might interfere with your action e.g. Fast Start Failover, Broker and so on<\/li>\n<li>Adjust your\u00a0control_file_record_keep_time to a higher value<\/li>\n<li>Create the controlfile to trace<\/li>\n<li>Unregister from RMAN catalog<\/li>\n<li>Shutdown immediate and re-create the controlfile<\/li>\n<li>Re-catalog your backups and archivelogs<\/li>\n<li>Re-register into the RMAN catalog<\/li>\n<\/ul>\n<p>Ok, let&#8217;s get started and disable fast start failover first. We don&#8217;t want that the observer to kick in and do any nasty stuff during my action.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">DGMGRL&gt; show configuration;\n\nConfiguration - DBIT121\n\n  Protection Mode: MaxAvailability\n  Members:\n  DBIT121_SITE1 - Primary database\n    DBIT121_SITE2 - (*) Physical standby database\n\nFast-Start Failover: ENABLED\n\nConfiguration Status:\nSUCCESS   (status updated 2 seconds ago)\n\nDGMGRL&gt; disable fast_start failover;\nDisabled.<\/pre>\n<p>As a next step, I increase the control_file_record_keep_time to a much higher time. The formula is usually CONTROL_FILE_RECORD_KEEP_TIME = retention period + level 0 backup interval + 1. Meaning that with a retention period of 24 days and a weekly level 0 backup, it would be 24+7+1, so at least 32. But I don&#8217;t care if my controlfile is 20MB in size 30MB, so I set it directly to 72 days.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- Primary\n\nSQL&gt; alter system set control_file_record_keep_time=72;\n\nSystem altered.\n\n-- Standby\n\nSQL&gt; alter system set control_file_record_keep_time=72;\n\nSystem altered.<\/pre>\n<p>The next important step is to create a trace of the controlfile, which can be adjusted manually later on, depending on your needs. Beforehand, I specify a tracefile identifier, so that I easily spot my trace file in the DIAG destination.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; alter session set tracefile_identifier='control';\n\nSession altered.\n\nSQL&gt; alter database backup controlfile to trace noresetlogs;\n\nDatabase altered.\n\noracle@dbidg01:\/u01\/app\/oracle\/diag\/rdbms\/dbit121_site1\/DBIT121\/trace\/ [DBIT121] ls -rlt | grep control\n-rw-r----- 1 oracle oinstall     101 Feb 24 09:10 DBIT121_ora_25050_control.trm\n-rw-r----- 1 oracle oinstall    9398 Feb 24 09:10 DBIT121_ora_25050_control.trc\n\noracle@dbidg01:\/u01\/app\/oracle\/diag\/rdbms\/dbit121_site1\/DBIT121\/trace\/ [DBIT121] mv DBIT121_ora_25050_control.trc \/u01\/app\/oracle\/admin\/DBIT121\/create\/recreate_controlfile.sql<\/pre>\n<p>Let&#8217;s take a look at the control file trace which was created. It contains nearly everything that we need. Some parts might have to be adjusted, and some parts do not work at all or have to be done in a different way, but we will see later. But in general it is a very good starting point to get the job done.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/u01\/app\/oracle\/admin\/DBIT121\/create\/ [DBIT121] cat recreate_controlfile.sql\n-- The following are current System-scope REDO Log Archival related\n-- parameters and can be included in the database initialization file.\n--\n-- LOG_ARCHIVE_DEST=''\n-- LOG_ARCHIVE_DUPLEX_DEST=''\n--\n-- LOG_ARCHIVE_FORMAT=%t_%s_%r.dbf\n--\n-- DB_UNIQUE_NAME=\"DBIT121_SITE1\"\n--\n-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE'\n-- LOG_ARCHIVE_CONFIG='DG_CONFIG=(\"DBIT121_SITE2\")'\n-- LOG_ARCHIVE_MAX_PROCESSES=4\n-- STANDBY_FILE_MANAGEMENT=AUTO\n-- STANDBY_ARCHIVE_DEST=?\/dbs\/arch\n-- FAL_CLIENT=''\n-- FAL_SERVER=DBIT121_SITE2\n--\n-- LOG_ARCHIVE_DEST_2='SERVICE=DBIT121_SITE2'\n-- LOG_ARCHIVE_DEST_2='OPTIONAL REOPEN=300 NODELAY'\n-- LOG_ARCHIVE_DEST_2='LGWR AFFIRM NOVERIFY ASYNC=0'\n-- LOG_ARCHIVE_DEST_2='REGISTER NOALTERNATE NODEPENDENCY'\n-- LOG_ARCHIVE_DEST_2='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED'\n-- LOG_ARCHIVE_DEST_2='DB_UNIQUE_NAME=DBIT121_SITE2'\n-- LOG_ARCHIVE_DEST_2='VALID_FOR=(STANDBY_LOGFILE,ONLINE_LOGFILES)'\n-- LOG_ARCHIVE_DEST_STATE_2=ENABLE\n--\n-- LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'\n-- LOG_ARCHIVE_DEST_1='OPTIONAL REOPEN=300 NODELAY'\n-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM NOVERIFY SYNC'\n-- LOG_ARCHIVE_DEST_1='REGISTER NOALTERNATE NODEPENDENCY'\n-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'\n-- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'\n-- LOG_ARCHIVE_DEST_STATE_1=ENABLE\n--\n-- The following commands will create a new control file and use it\n-- to open the database.\n-- Data used by Recovery Manager will be lost.\n-- Additional logs may be required for media recovery of offline\n-- Use this only if the current versions of all online logs are\n-- available.\n-- After mounting the created controlfile, the following SQL\n-- statement will place the database in the appropriate\n-- protection mode:\n--  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY\nSTARTUP NOMOUNT\nCREATE CONTROLFILE REUSE DATABASE \"DBIT121\" NORESETLOGS FORCE LOGGING ARCHIVELOG\n    MAXLOGFILES 16\n    MAXLOGMEMBERS 3\n    MAXDATAFILES 100\n    MAXINSTANCES 8\n    MAXLOGHISTORY 292\nLOGFILE\n  GROUP 1 (\n    '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_1_d4fpnop9_.log',\n    '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_1_d4fpnq4o_.log'\n  ) SIZE 50M BLOCKSIZE 512,\n  GROUP 2 (\n    '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_2_d4fpo42k_.log',\n    '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_2_d4fpo43q_.log'\n  ) SIZE 50M BLOCKSIZE 512,\n  GROUP 3 (\n    '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_3_d4fppn86_.log',\n    '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_3_d4fppngb_.log'\n  ) SIZE 50M BLOCKSIZE 512\n-- STANDBY LOGFILE\n--   GROUP 4 (\n--     '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t840_.log',\n--     '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t89m_.log'\n--   ) SIZE 50M BLOCKSIZE 512,\n--   GROUP 5 (\n--     '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_5_dbx3tj3b_.log',\n--     '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_5_dbx3tj8m_.log'\n--   ) SIZE 50M BLOCKSIZE 512,\n--   GROUP 6 (\n--     '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_6_dbx3tp52_.log',\n--     '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_6_dbx3tpb4_.log'\n--   ) SIZE 50M BLOCKSIZE 512,\n--   GROUP 7 (\n--     '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_7_dbx3twdq_.log',\n--     '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_7_dbx3twkt_.log'\n--   ) SIZE 50M BLOCKSIZE 512\nDATAFILE\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_system_d4fjt03j_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_sysaux_d4fjrlvs_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_undotbs1_d4fjvtd1_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_example_d4fjz1fz_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_users_d4fjvqb1_.dbf'\nCHARACTER SET AL32UTF8\n;\n-- Configure RMAN configuration record 1\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RETENTION POLICY','TO RECOVERY WINDOW OF 14 DAYS');\n-- Configure RMAN configuration record 2\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('BACKUP OPTIMIZATION','ON');\n-- Configure RMAN configuration record 3\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('ARCHIVELOG DELETION POLICY','TO SHIPPED TO ALL STANDBY BACKED UP 1 TIMES TO DISK');\n-- Configure RMAN configuration record 4\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET');\n-- Configure RMAN configuration record 5\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RMAN OUTPUT','TO KEEP FOR 32 DAYS');\n-- Configure RMAN configuration record 6\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DB_UNIQUE_NAME','''DBIT121_SITE1'' CONNECT IDENTIFIER  ''DBIT121_SITE1''');\n-- Configure RMAN configuration record 7\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DB_UNIQUE_NAME','''DBIT121_SITE2'' CONNECT IDENTIFIER  ''DBIT121_SITE2''');\n-- Configure RMAN configuration record 8\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','DEVICE TYPE ''SBT_TAPE'' PARMS  ''SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=\/u99\/backup\/DBIT121)''');\n-- Configure RMAN configuration record 9\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','''SBT_TAPE'' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET');\n-- Configure RMAN configuration record 10\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEFAULT DEVICE TYPE TO','DISK');\n-- Commands to re-create incarnation table\n-- Below log names MUST be changed to existing filenames on\n-- disk. Any one log file from each branch can be used to\n-- re-create incarnation records.\n-- ALTER DATABASE REGISTER LOGFILE '\/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_1_%u_.arc';\n-- Recovery is required if any of the datafiles are restored backups,\n-- or if the last shutdown was not normal or immediate.\nRECOVER DATABASE\n-- Block change tracking was enabled, so re-enable it now.\nALTER DATABASE ENABLE BLOCK CHANGE TRACKING\nUSING FILE '\/u02\/oradata\/DBIT121_SITE1\/changetracking\/o1_mf_dbx3wgqg_.chg' REUSE;\n-- All logs need archiving and a log switch is needed.\nALTER SYSTEM ARCHIVE LOG ALL;\n-- Database can now be opened normally.\nALTER DATABASE OPEN;\n-- Commands to add tempfiles to temporary tablespaces.\n-- Online tempfiles have complete space information.\n-- Other tempfiles may require adjustment.\nALTER TABLESPACE TEMP ADD TEMPFILE '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_temp_d4fjxn8l_.tmp'\n     SIZE 206569472  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;\n-- End of tempfile additions.\n--\n--\n--\n----------------------------------------------------------\n-- The following script can be used on the standby database\n-- to re-populate entries for a standby controlfile created\n-- on the primary and copied to the standby site.\n----------------------------------------------------------\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t840_.log'\n SIZE 50M BLOCKSIZE 512 REUSE;\nALTER DATABASE ADD STANDBY LOGFILE MEMBER '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t89m_.log'\n                                       TO '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t840_.log';\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_5_dbx3tj3b_.log'\n SIZE 50M BLOCKSIZE 512 REUSE;\nALTER DATABASE ADD STANDBY LOGFILE MEMBER '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_5_dbx3tj8m_.log'\n                                       TO '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_5_dbx3tj3b_.log';\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_6_dbx3tp52_.log'\n SIZE 50M BLOCKSIZE 512 REUSE;\nALTER DATABASE ADD STANDBY LOGFILE MEMBER '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_6_dbx3tpb4_.log'\n                                       TO '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_6_dbx3tp52_.log';\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_7_dbx3twdq_.log'\n SIZE 50M BLOCKSIZE 512 REUSE;\nALTER DATABASE ADD STANDBY LOGFILE MEMBER '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_7_dbx3twkt_.log'\n                                       TO '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_7_dbx3twdq_.log';<\/pre>\n<p>I am also stopping the broker to avoid any side effects and afterwards I unregister the database from the RMAN catalog. I will re-create it later on with the clean entries.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- primary\n\nSQL&gt; alter system set dg_broker_start=false;\n\nSystem altered.\n\noracle@dbidg01:\/home\/oracle\/ [DBIT121] rman target sys\/manager catalog rman\/rman@rman\n\nRecovery Manager: Release 12.1.0.2.0 - Production on Fri Feb 24 09:16:17 2017\n\nCopyright (c) 1982, 2014, Oracle and\/or its affiliates.  All rights reserved.\n\nconnected to target database: DBIT121 (DBID=172831209)\nconnected to recovery catalog database\nrecovery catalog schema release 12.02.00.01. is newer than RMAN release\n\nRMAN&gt; unregister database;\n\ndatabase name is \"DBIT121\" and DBID is 172831209\n\nDo you really want to unregister the database (enter YES or NO)? YES\ndatabase unregistered from the recovery catalog\n\nRMAN&gt;<\/pre>\n<p>The next step is very important. We need to shutdown the DB cleanly, either with normal or immediate. Afterwards, I create a copy of the current controlfiles. You never know, it is always good to have another fallback.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; shutdown immediate\nDatabase closed.\nDatabase dismounted.\nORACLE instance shut down.\nSQL&gt;\n\noracle@dbidg01:\/home\/oracle\/ [DBIT121] cd \/u02\/oradata\/DBIT121_SITE1\/controlfile\/\noracle@dbidg01:\/u02\/oradata\/DBIT121_SITE1\/controlfile\/ [DBIT121] mv o1_mf_d4fjws55_.ctl o1_mf_d4fjws55_.ctl.old\noracle@dbidg01:\/u02\/oradata\/DBIT121_SITE1\/controlfile\/ [DBIT121] cd \/u03\/fast_recovery_area\/DBIT121_SITE1\/controlfile\/\noracle@dbidg01:\/u03\/fast_recovery_area\/DBIT121_SITE1\/controlfile\/ [DBIT121] mv o1_mf_d4fjwsgr_.ctl o1_mf_d4fjwsgr_.ctl.old<\/pre>\n<p>Now we can startup nomount, and recreate our control from scratch. It is very important that you specify REUSE and NORESETLOGS here.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; startup nomount\nORACLE instance started.\n\nTotal System Global Area 1325400064 bytes\nFixed Size                  2924112 bytes\nVariable Size             436208048 bytes\nDatabase Buffers          872415232 bytes\nRedo Buffers               13852672 bytes\n\nSQL&gt; CREATE CONTROLFILE REUSE DATABASE \"DBIT121\" NORESETLOGS FORCE LOGGING ARCHIVELOG\n    MAXLOGFILES 16\n    MAXLOGMEMBERS 3\n    MAXDATAFILES 100\n    MAXINSTANCES 8\n    MAXLOGHISTORY 292\nLOGFILE\n  GROUP 1 (\n    '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_1_d4fpnop9_.log',\n    '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_1_d4fpnq4o_.log'\n  ) SIZE 50M BLOCKSIZE 512,\n  GROUP 2 (\n    '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_2_d4fpo42k_.log',\n    '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_2_d4fpo43q_.log'\n  ) SIZE 50M BLOCKSIZE 512,\n  GROUP 3 (\n    '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_3_d4fppn86_.log',\n    '\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_3_d4fppngb_.log'\n 19    ) SIZE 50M BLOCKSIZE 512\nDATAFILE\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_system_d4fjt03j_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_sysaux_d4fjrlvs_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_undotbs1_d4fjvtd1_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_example_d4fjz1fz_.dbf',\n  '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_users_d4fjvqb1_.dbf'\nCHARACTER SET AL32UTF8\n 27  ;\n\nControl file created.\n\nSQL&gt;<\/pre>\n<p>Now we can configure the RMAN persistent settings like retention and so on.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- Configure RMAN configuration record 1\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RETENTION POLICY','TO RECOVERY WINDOW OF 14 DAYS');\n-- Configure RMAN configuration record 2\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('BACKUP OPTIMIZATION','ON');\n-- Configure RMAN configuration record 3\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('ARCHIVELOG DELETION POLICY','TO SHIPPED TO ALL STANDBY BACKED UP 1 TIMES TO DISK');\n-- Configure RMAN configuration record 4\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET');\n-- Configure RMAN configuration record 5\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RMAN OUTPUT','TO KEEP FOR 32 DAYS');\n-- Configure RMAN configuration record 6\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DB_UNIQUE_NAME','''DBIT121_SITE1'' CONNECT IDENTIFIER  ''DBIT121_SITE1''');\n-- Configure RMAN configuration record 7\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DB_UNIQUE_NAME','''DBIT121_SITE2'' CONNECT IDENTIFIER  ''DBIT121_SITE2''');\n-- Configure RMAN configuration record 8\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','DEVICE TYPE ''SBT_TAPE'' PARMS  ''SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=\/u99\/backup\/DBIT121)''');\n-- Configure RMAN configuration record 9\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','''SBT_TAPE'' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET');\n-- Configure RMAN configuration record 10\nVARIABLE RECNO NUMBER;\nEXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEFAULT DEVICE TYPE TO','DISK');<\/pre>\n<p>The next step is to the re-create the incarnation table. This might fail with a recursive SQL error if you use the SQL provided in the trace file. Just use REGISTER PHYSICAL LOGFILE instead of REGISTER LOGFILE and then it works.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- Commands to re-create incarnation table\n-- Below log names MUST be changed to existing filenames on\n-- disk. Any one log file from each branch can be used to re-create incarnation records.\n-- ALTER DATABASE REGISTER LOGFILE '\/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_1_%u_.arc';\n\nSQL&gt; ALTER DATABASE REGISTER LOGFILE '\/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_142_dbzv31hq_.arc';\nALTER DATABASE REGISTER LOGFILE '\/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_142_dbzv31hq_.arc'\n*\nERROR at line 1:\nORA-00604: error occurred at recursive SQL level\n\n\nSQL&gt; ALTER DATABASE REGISTER PHYSICAL LOGFILE '\/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_142_dbzv31hq_.arc';\n\nDatabase altered.<\/pre>\n<p>Because I have shutdown the database cleanly, there is no need to do any recovery and I can continue to enable the block change tracking file, open the database, and add my tempfile back to the database.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; recover database;\nORA-00283: recovery session canceled due to errors\nORA-00264: no recovery required\n\nSQL&gt; ALTER SYSTEM ARCHIVE LOG ALL;\n\nSystem altered.\n\nSQL&gt; ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '\/u02\/oradata\/DBIT121_SITE1\/changetracking\/o1_mf_dbx3wgqg_.chg' REUSE;\n\nDatabase altered.\n\nSQL&gt; ALTER DATABASE OPEN;\n\nDatabase altered.\n\nSQL&gt;\n\nSQL&gt; ALTER TABLESPACE TEMP ADD TEMPFILE '\/u02\/oradata\/DBIT121_SITE1\/datafile\/o1_mf_temp_d4fjxn8l_.tmp'\n  2  SIZE 206569472  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;\n\nTablespace altered.<\/pre>\n<p>Regarding the Standby Redo logs, the easiest is to remove the old ones, and simply recreate them afterwards, because you can&#8217;t add them back as long as they have Oracle managed file names.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; select * from v$standby_log;\n\nno rows selected\n\nSQL&gt; ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t840_.log' SIZE 50M BLOCKSIZE 512 REUSE;\nALTER DATABASE ADD STANDBY LOGFILE THREAD 1 '\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t840_.log' SIZE 50M BLOCKSIZE 512 REUSE\n*\nERROR at line 1:\nORA-01276: Cannot add file\n\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbx3t840_.log.  File has an Oracle\nManaged Files file name.\n\n-- delete standby redo logs\n\noracle@dbidg01:\/u01\/app\/oracle\/admin\/DBIT121\/create\/ [DBIT121] cd \/u02\/oradata\/DBIT121_SITE1\/onlinelog\/\noracle@dbidg01:\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/ [DBIT121] ls -l\ntotal 358428\n-rw-r----- 1 oracle oinstall 52429312 Feb 24 09:42 o1_mf_1_d4fpnop9_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 24 09:42 o1_mf_2_d4fpo42k_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 24 09:47 o1_mf_3_d4fppn86_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_4_dbx3t840_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_5_dbx3tj3b_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_6_dbx3tp52_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_7_dbx3twdq_.log\noracle@dbidg01:\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/ [DBIT121] rm o1_mf_4_dbx3t840_.log o1_mf_5_dbx3tj3b_.log o1_mf_6_dbx3tp52_.log o1_mf_7_dbx3twdq_.log\noracle@dbidg01:\/u02\/oradata\/DBIT121_SITE1\/onlinelog\/ [DBIT121] cd \/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/\noracle@dbidg01:\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/ [DBIT121] ls -l\ntotal 358428\n-rw-r----- 1 oracle oinstall 52429312 Feb 24 09:42 o1_mf_1_d4fpnq4o_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 24 09:42 o1_mf_2_d4fpo43q_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 24 09:47 o1_mf_3_d4fppngb_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_4_dbx3t89m_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_5_dbx3tj8m_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_6_dbx3tpb4_.log\n-rw-r----- 1 oracle oinstall 52429312 Feb 23 09:55 o1_mf_7_dbx3twkt_.log\noracle@dbidg01:\/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/ [DBIT121] rm o1_mf_4_dbx3t89m_.log o1_mf_5_dbx3tj8m_.log o1_mf_6_dbx3tpb4_.log o1_mf_7_dbx3twkt_.log\n\n-- recreate standby redo logs\n\nSQL&gt; alter database add STANDBY LOGFILE THREAD 1 GROUP 4 SIZE 50M BLOCKSIZE 512;\n\nDatabase altered.\n\nSQL&gt; alter database add STANDBY LOGFILE THREAD 1 GROUP 5 SIZE 50M BLOCKSIZE 512;\n\nDatabase altered.\n\nSQL&gt; alter database add STANDBY LOGFILE THREAD 1 GROUP 6 SIZE 50M BLOCKSIZE 512;\n\nDatabase altered.\n\nSQL&gt; alter database add STANDBY LOGFILE THREAD 1 GROUP 7 SIZE 50M BLOCKSIZE 512;\n\nDatabase altered.<\/pre>\n<p>Don&#8217;t forget to enable Flashback as well, if your DataGuard is running in Max availability mode.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; alter database flashback on;\n\nDatabase altered.<\/pre>\n<p>Now we need to recatalog all our backups and archivelogs again.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/ [DBIT121] rman target \/\n\nRecovery Manager: Release 12.1.0.2.0 - Production on Fri Feb 24 09:50:16 2017\n\nCopyright (c) 1982, 2014, Oracle and\/or its affiliates.  All rights reserved.\n\nconnected to target database: DBIT121 (DBID=172831209)\n\nRMAN&gt; catalog recovery area;\n\nusing target database control file instead of recovery catalog\nsearching for all files in the recovery area\n\nList of Files Unknown to the Database\n=====================================\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_140_dbzswh06_.arc\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_141_dbzsxpv5_.arc\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbx641px_.flb\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbx642pf_.flb\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dby398lz_.flb\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbymcg20_.flb\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbyyg1r0_.flb\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/controlfile\/o1_mf_d4fjwsgr_.ctl.old\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_annnn_TAG20170223T090854_dbx64pz6_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_annnn_TAG20170223T090854_dbx64q0b_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_nnndf_TAG20170223T090856_dbx64s0z_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_nnndf_TAG20170223T090856_dbx64s3n_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_nnsnf_TAG20170223T090856_dbx65kmx_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_ncnnf_TAG20170223T090856_dbx65lnt_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_annnn_TAG20170223T090923_dbx65mto_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080806_dbzpypdc_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080806_dbzpypfp_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080806_dbzpysqh_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_nnndf_TAG20170224T080812_dbzpyy2f_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_nnndf_TAG20170224T080812_dbzpyy56_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_nnsnf_TAG20170224T080812_dbzpzqnz_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_ncnnf_TAG20170224T080812_dbzpzqop_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080841_dbzpzskt_.bkp\n\nDo you really want to catalog the above files (enter YES or NO)? YES\ncataloging files...\ncataloging done\n\nList of Cataloged Files\n=======================\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_140_dbzswh06_.arc\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/archivelog\/2017_02_24\/o1_mf_1_141_dbzsxpv5_.arc\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_annnn_TAG20170223T090854_dbx64pz6_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_annnn_TAG20170223T090854_dbx64q0b_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_nnndf_TAG20170223T090856_dbx64s0z_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_nnndf_TAG20170223T090856_dbx64s3n_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_nnsnf_TAG20170223T090856_dbx65kmx_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_ncnnf_TAG20170223T090856_dbx65lnt_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_23\/o1_mf_annnn_TAG20170223T090923_dbx65mto_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080806_dbzpypdc_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080806_dbzpypfp_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080806_dbzpysqh_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_nnndf_TAG20170224T080812_dbzpyy2f_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_nnndf_TAG20170224T080812_dbzpyy56_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_nnsnf_TAG20170224T080812_dbzpzqnz_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_ncnnf_TAG20170224T080812_dbzpzqop_.bkp\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/backupset\/2017_02_24\/o1_mf_annnn_TAG20170224T080841_dbzpzskt_.bkp\n\nList of Files Which Were Not Cataloged\n=======================================\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbx641px_.flb\n  RMAN-07529: Reason: catalog is not supported for this file type\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbx642pf_.flb\n  RMAN-07529: Reason: catalog is not supported for this file type\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dby398lz_.flb\n  RMAN-07529: Reason: catalog is not supported for this file type\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbymcg20_.flb\n  RMAN-07529: Reason: catalog is not supported for this file type\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/flashback\/o1_mf_dbyyg1r0_.flb\n  RMAN-07529: Reason: catalog is not supported for this file type\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/controlfile\/o1_mf_d4fjwsgr_.ctl.old\n  RMAN-07519: Reason: Error while cataloging. See alert.log.\n\nList of files in Recovery Area not managed by the database\n==========================================================\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_4_dbzwt72f_.log\n  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_5_dbzwtgl3_.log\n  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_6_dbzwtn04_.log\n  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter\nFile Name: \/u03\/fast_recovery_area\/DBIT121_SITE1\/onlinelog\/o1_mf_7_dbzwtvc7_.log\n  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter\n\nnumber of files not managed by recovery area is 4, totaling 200.00MB\n\nRMAN&gt;<\/pre>\n<p>We are nearly done. We just need to enable the Data Guard broker again and enable fast start failover.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; alter system set dg_broker_start=true;\n\nSystem altered.\n\nSQL&gt; alter system archive log current;\n\nSystem altered.\n\nDGMGRL&gt; enable fast_start failover;\nEnabled.\nDGMGRL&gt; show configuration;\n\nConfiguration - DBIT121\n\n Protection Mode: MaxAvailability\n Members:\n DBIT121_SITE1 - Primary database\n DBIT121_SITE2 - (*) Physical standby database\n\nFast-Start Failover: ENABLED\n\nConfiguration Status:\nSUCCESS (status updated 21 seconds ago)\n\nDGMGRL&gt; validate database 'DBIT121_SITE2';\n\n Database Role: Physical standby database\n Primary Database: DBIT121_SITE1\n\n Ready for Switchover: Yes\n Ready for Failover: Yes (Primary Running)\n<\/pre>\n<p>Re-register the database into the RMAN catalog.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/home\/oracle\/ [DBIT121] rman target sys\/manager catalog rman\/rman@rman\n\nRecovery Manager: Release 12.1.0.2.0 - Production on Fri Feb 24 09:57:34 2017\n\nCopyright (c) 1982, 2014, Oracle and\/or its affiliates.  All rights reserved.\n\nconnected to target database: DBIT121 (DBID=172831209)\nconnected to recovery catalog database\nrecovery catalog schema release 12.02.00.01. is newer than RMAN release\n\nRMAN&gt; register database;\n\ndatabase registered in recovery catalog\nstarting full resync of recovery catalog\nfull resync complete\n\nRMAN&gt;<\/pre>\n<p>Ready. That&#8217;s it. In case your Standby Controlfile is not correct as well (was not in my case), you can now simply create a new standby controlfile on the primary and move it to the standby like documented in the following MOS note (Steps to recreate a Physical Standby Controlfile (Doc ID 459411.1).<\/p>\n<h3>Conclusion<\/h3>\n<p>As a last resort, sometimes it is needed to recreate the controlfile manually, but in case you have all the online redo logs and your datafiles in place, you can do it with noresetlogs. And take care that your RMAN retention is always higher than your control file record keep time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By William Sescu Sometimes you might run into situations where the controlfile does not represent the backups and archivelogs correctly, because of a mismatch of the control_file_record_keep_time and the RMAN retention. The controlfile has non circular and a circular records. Non circular are e.g. database information, redo threads, datafiles and so on. These non circular [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198],"tags":[310,209,270],"type_dbi":[],"class_list":["post-9822","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-database-management","tag-controlfile","tag-oracle-12c","tag-rman"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Oracle 12c - Recreating a Controlfile in a Data Guard environment with noresetlogs - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle 12c - Recreating a Controlfile in a Data Guard environment with noresetlogs\" \/>\n<meta property=\"og:description\" content=\"By William Sescu Sometimes you might run into situations where the controlfile does not represent the backups and archivelogs correctly, because of a mismatch of the control_file_record_keep_time and the RMAN retention. The controlfile has non circular and a circular records. Non circular are e.g. database information, redo threads, datafiles and so on. These non circular [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-24T09:44:35+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"24 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Oracle 12c &#8211; Recreating a Controlfile in a Data Guard environment with noresetlogs\",\"datePublished\":\"2017-02-24T09:44:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/\"},\"wordCount\":948,\"commentCount\":0,\"keywords\":[\"Controlfile\",\"Oracle 12c\",\"RMAN\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/\",\"name\":\"Oracle 12c - Recreating a Controlfile in a Data Guard environment with noresetlogs - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2017-02-24T09:44:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle 12c &#8211; Recreating a Controlfile in a Data Guard environment with noresetlogs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Oracle 12c - Recreating a Controlfile in a Data Guard environment with noresetlogs - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/","og_locale":"en_US","og_type":"article","og_title":"Oracle 12c - Recreating a Controlfile in a Data Guard environment with noresetlogs","og_description":"By William Sescu Sometimes you might run into situations where the controlfile does not represent the backups and archivelogs correctly, because of a mismatch of the control_file_record_keep_time and the RMAN retention. The controlfile has non circular and a circular records. Non circular are e.g. database information, redo threads, datafiles and so on. These non circular [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/","og_site_name":"dbi Blog","article_published_time":"2017-02-24T09:44:35+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"24 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Oracle 12c &#8211; Recreating a Controlfile in a Data Guard environment with noresetlogs","datePublished":"2017-02-24T09:44:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/"},"wordCount":948,"commentCount":0,"keywords":["Controlfile","Oracle 12c","RMAN"],"articleSection":["Database Administration &amp; Monitoring","Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/","name":"Oracle 12c - Recreating a Controlfile in a Data Guard environment with noresetlogs - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2017-02-24T09:44:35+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-recreating-a-controlfile-in-a-data-guard-environment-with-noresetlogs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle 12c &#8211; Recreating a Controlfile in a Data Guard environment with noresetlogs"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=9822"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9822\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=9822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=9822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=9822"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=9822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}