Recreation of controlfile

Assume full datafile backup and controlfile backups were taken two days ago.
When I restore two days ago`s datafiles,
should I recreate the controlfile or restore two days ago`s controlfile or use today`s control file.
What is the difference among them?

Ricardinho wrote:
Hey Khurram.
I can restore datafiles from by operating system copy paste command, so I can also copy paste the old controlfile or recreate or use the recent one.I can restore datafiles from by operating system copy paste command, so I can also copy paste the old controlfile or recreate or use the recent one.
restore datafile from OS (seems to me user managed backup),then you better to paste those controlfile which is taken at the time of backup datafiles process,if by any chance you baekd up datafile only not controlfile then recovery would be more tricky,if yours controlfile are not at the time of datafiles backup then you will come across following scenario
If restored ocntrofile old to restored datafiles
ORA-1207 file is more recent than control file - old control file
Cause: The control file change sequence number in the data file is greater than the number in the control file. This
implies that the wrong control file is being used. Note that repeatedly causing this error can make it stop
happening without correcting the real problem. Every attempt to open the database will advance the control
file change sequence number until it is great enough.
Action: Use the current control file or do backup controlfile recovery to make the control file current. Be sure to
follow all restrictions on doing a backup controlfile recovery.
In this case yours datafile CKPT SCN would be ahead to controlfile it will require recovery to syn datafile and controlfile,recovery should be done with backup controlfile i.e recover database using backup controlfile
I have already given you link there is scneario covered for that case read this link again
http://oraware.blogspot.com/2008/05/recovery-with-old-controlfilerecover.htmlIf restord controlfile is more recent then restored datafiles
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'F:\ORACLE\PRODUCT\10.1.0\ORADATA\PROD\SYSTEM01.DBF'
Yours controlfile CKPT SCN ahead to datafile it is not sync ,it will require recovery to sync it.
Khurram

Similar Messages

  • Recreation of controlfile fail

    Hi all,
    I am attempting to recreate the controlfile for a 2 node RAC (10g) on EL4.I am using ASM for the shared storage. I copied the relevant section from the ASCII backup controlfile, when I run the script I am getting the following errors:
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-12720: operation requires database is in EXCLUSIVE mode
    .

    Thanks for the reply.
    Yes I lost a diskgroup that contained the controlfile.
    I must also share that the shared file system was NFS before I migrated it to ASM. I took a backup after I migrated to ASM.
    When I restored the DB it restored the datafiles to the previous NFS location ( Could this be because DB_CREATE_FILE_DEST is set to '/share1/oradata' in the spfile?), I therefore had to change the path to the datafiles from '+DG1/devdb/datafile/' to the NFS location as seen in the ascii file.
    The ASCII is as follows
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "DEVDB" RESETLOGS ARCHIVELOG
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    MAXINSTANCES 32
    MAXLOGHISTORY 292
    LOGFILE
    GROUP 1 (
    '+DG1/devdb/log1/log_1_1a.log',
    '+DG1/devdb/log1/log_1_1b.log'
    ) SIZE 50M,
    GROUP 2 (
    '+DG1/devdb/log1/log_1_2a.log',
    '+DG1/devdb/log1/log_1_2b.log'
    ) SIZE 50M
    -- STANDBY LOGFILE
    DATAFILE
    '/share1/oradata/DEVDB/system.258.694992723',
    '/share1/oradata/DEVDB/undotbs1.261.694993001',
    '/share1/oradata/DEVDB/sysaux.259.694992839',
    '/share1/oradata/DEVDB/users.268.694993021',
    '/share1/oradata/DEVDB/example.260.694992977',
    '/share1/oradata/DEVDB/undotbs2.262.694993009',
    '/share1/oradata/DEVDB/test.264.694993017'
    CHARACTER SET WE8ISO8859P1
    -- Configure RMAN configuration record 1
    VARIABLE RECNO NUMBER;
    EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP','ON');
    -- Configure RMAN configuration record 2
    VARIABLE RECNO NUMBER;
    EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE','DISK TO ''ControlFileAutoBackup_%F''');
    -- Commands to re-create incarnation table
    -- Below log names MUST be changed to existing filenames on
    -- disk. Any one log file from each branch can be used to
    -- re-create incarnation records.
    -- ALTER DATABASE REGISTER LOGFILE '+RECOVERYDEST';
    -- ALTER DATABASE REGISTER LOGFILE '+RECOVERYDEST';
    -- Recovery is required if any of the datafiles are restored backups,
    -- or if the last shutdown was not normal or immediate.
    RECOVER DATABASE USING BACKUP CONTROLFILE
    -- Create log files for threads other than thread one.
    ALTER DATABASE ADD LOGFILE THREAD 2
    GROUP 3 (
    '+DG1/devdb/log2/log_2_3a.log',
    '+DG1/devdb/log2/log_2_3b.log'
    ) SIZE 50M REUSE,
    GROUP 4 (
    '+DG1/devdb/log2/log_2_4a.log',
    '+DG1/devdb/log2/log_2_4b.log'
    ) SIZE 50M REUSE;
    -- Database can now be opened zeroing the online logs.
    ALTER DATABASE OPEN RESETLOGS;
    -- Commands to add tempfiles to temporary tablespaces.
    -- Online tempfiles have complete space information.
    -- Other tempfiles may require adjustment.
    ALTER TABLESPACE TEMPTBS ADD TEMPFILE '+DG1/devdb/tempfile/temptbs.266.694656657' REUSE;
    -- End of tempfile additions.
    --

  • RMAN-20098 after controlfile recreate

    Hi,
    I recreated the controlfile and after that, RMAN backup with recovery catalog prompt out the following errors:
    starting full resync of recovery catalog
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of allocate command at 02/13/2008 10:03:52
    RMAN-03014: implicit resync of recovery catalog failed
    RMAN-03009: failure of full resync command on default channel at 02/13/2008 10:03:52
    RMAN-20098: invalid backup redo log low scn
    Anyone know how to resolve this?
    Thanks
    Vincent Pek

    The new controlfile has no records about previous backups and is now incompatible with the recovery catalog. Unregister and re-register the database (if it is 10g and higher):
    unregister database;
    register database;
    You may also try to re-catalog the backupsets to the new controlfile.
    Werner

  • Recreate controlfile.

    Hi,
    I am working on a test database (Oracle 10.2.0) . I found out that the disk on which the control files were present got corrupted.
    I am trying to recreate the controlfile, to startup the database.
    I am trying to run the following steps, but still get an error.
    I cannot run any query on the database like -
    alter database backup controlfile to trace;
    as this gives me an error.
    These are the steps -
    1.
    SQL> shutdown immediate;
    ORA-00210: cannot open the specified control file
    ORA-00202: control file: '/usr/test1/ctl01/ctl_01.ctl'
    ORA-27041: unable to open file
    Linux Error: 2: No such file or directory
    Additional information: 3
    2. SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> startup nomount;
    ORACLE instance started.
    Total System Global Area 536870912 bytes
    Fixed Size 1261860 bytes
    Variable Size 163581660 bytes
    Database Buffers 369098752 bytes
    Redo Buffers 2928640 bytes
    3.
    SQL> CREATE CONTROLFILE REUSE DATABASE "TEST" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 50
    MAXLOGMEMBERS 3
    MAXDATAFILES 200
    MAXINSTANCES 6
    MAXLOGHISTORY 584
    LOGFILE
    GROUP 1 (
    *'/usr/test/rdo1/gp_01_redo_01.rdo',*
    *'/usr/test/rdo2/gp_01_redo_02.rdo'*
    *) SIZE 5M,*
    GROUP 2 (
    *'/usr/test/rdo2/gp_02_redo_02.rdo',*
    *'/usr/test/rdo1/gp_02_redo_01.rdo'*
    *) SIZE 5M,*
    GROUP 3 (
    *'/usr/test/rdo1/gp_03_redo_01.rdo',*
    *'/usr/test/rdo2/gp_03_redo_02.rdo'*
    *) SIZE 5M*
    DATAFILE
    *'/usr/test/system/sys_01.dbf',*
    *'/usr/test/undo/undo_01.dbf',*
    *'/usr/test/system/sysaux01.dbf',*
    *'/usr/test/system/users.dbf',*
    *'/usr/test/intr/intermedia_01.dbf',*
    *'/usr/test/data/sm_tbl_01.dbf',*
    *'/usr/test/data/md_tbl_01.dbf',*
    *'/usr/test/indx/sm_idx_01.dbf',*
    *'/usr/test/indx/md_idx_01.dbf',*
    *'/usr/test/lob/lob_01.dbf',*
    *'/usr/test/system/users_1.dbf'*
    CHARACTER SET US7ASCII;
    Control file created.
    4.
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/usr/test/system/sys_01.dbf'
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 167197704 generated at 03/30/2011 11:04:42 needed for thread
    1
    ORA-00289: suggestion : /usr/ora10/dbs/arch1_9_747140614.dbf
    ORA-00280: change 167197704 for thread 1 is in sequence #9
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00308: cannot open archived log '/usr/ora10/dbs/arch1_9_747140614.dbf'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log '/usr/ora10/dbs/arch1_9_747140614.dbf'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/usr/test/system/sys_01.dbf'
    6.
    SQL> col member format a50
    SQL> select a.group#,a.member,b.status from v$logfile a, v$log b where a.group#=b.group#;
    GROUP# MEMBER STATUS
    1 /usr/test/rdo1/gp_01_redo_01.rdo UNUSED
    1 /usr/test/rdo2/gp_01_redo_02.rdo UNUSED
    2 /usr/test/rdo2/gp_02_redo_02.rdo UNUSED
    2 /usr/test/rdo1/gp_02_redo_01.rdo UNUSED
    3      /usr/test/rdo1/gp_03_redo_01.rdo CURRENT
    3     /usr/test/rdo2/gp_03_redo_02.rdo CURRENT
    6 rows selected.
    7.
    SQL> recover database using backup controlfile until cancel;
    ORA-00279: change 167197704 generated at 03/30/2011 11:04:42 needed for thread
    1
    ORA-00289: suggestion : /usr/ora10/dbs/arch1_9_747140614.dbf
    ORA-00280: change 167197704 for thread 1 is in sequence #9
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    */usr/test/rdo1/gp_03_redo_01.rdo*
    ORA-00310: archived log contains sequence 10; sequence 9 required
    ORA-00334: archived log: '/usr/test/rdo1/gp_03_redo_01.rdo'
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/usr/test/system/sys_01.dbf'
    The sys_01.dbf file seems to need more recovery, though I am not sure what exactly needs to be done.
    Please help.
    Thanks.
    Edited by: Apps_Oracle on Mar 30, 2011 12:49 PM

    Hi Chinar,
    These are the results I got -
    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area 536870912 bytes
    Fixed Size 1261860 bytes
    Variable Size 163581660 bytes
    Database Buffers 369098752 bytes
    Redo Buffers 2928640 bytes
    Database mounted.
    SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL
    ORA-00279: change 167198190 generated at 03/30/2011 11:04:44 needed for thread
    1
    ORA-00289: suggestion : /usr/test/ora10/dbs/arch1_10_747140614.dbf
    ORA-00280: change 167198190 for thread 1 is in sequence #10
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    */usr/test/rdo1/gp_02_redo_01.rdo*
    ORA-00310: archived log contains sequence 9; sequence 10 required
    ORA-00334: archived log: '/usr/test/rdo1/gp_02_redo_01.rdo'
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/usr/test/system/sys_01.dbf'
    SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL
    ORA-00279: change 167198190 generated at 03/30/2011 11:04:44 needed for thread
    1
    ORA-00289: suggestion : /usr/test/dbs/arch1_10_747140614.dbf
    ORA-00280: change 167198190 for thread 1 is in sequence #10
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    */usr/test/rdo2/gp_01_redo_02.rdo*
    ORA-00310: archived log contains sequence 8; sequence 10 required
    ORA-00334: archived log: '/usr/test/rdo2/gp_01_redo_02.rdo'
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/usr/test/system/sys_01.dbf'
    Thanks.

  • How to remove information of datafile from controlfile without recreating i

    Hi ,
    I am using Oracle 10g RAC.I just to add a datafile in my RCA database but it get failed but
    its information get registered in Contorlfile .
    I started my database by offline drop to that datafile in mount stage.
    Is there any procedure by which i can remove information of that datafile which i did offline drop from my controlfile without recreating the controlfile,if there is any please let me know.
    Thanks in advance.
    Regards !
    Deep

    datafile is not meant to be removed once added.
    The other option you have is remove the tablespace which probably not acceptable to you as well.
    The other thing is if the add datafile query failed the information shouldn't have been registered in control file. Do you see any errors in your alert.log file or information shows this datafile was added successfully?
    check this thread
    http://asktom.oracle.com/pls/ask/f?p=4950:8:10361800305329901722::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:515222144417

  • Ora-1276 cannot add controlfile - rman duplicate asm database

    Hi,
    I am trying to duplicate an asm database olddb -> asm database dup in the same diskgroup. somehow got error 0ra-1276 Cannot add file +DISK1/dup/controlfile/current.1669.754164181.  File has an Oracle Managed Files file name.
    There is nothing in the asm directory +DISK1/dup/controllfile before I run the rman.
    in the initdup.ora
    control_files=+DISK1,+DISK1 <--- just the disk group, not the file name
    db_name='dup'
    db_file_name_convert=+DISK1,+DISK1/dup
    log_file_name_convert=+DISK1,+DISK1
    Recovery Manager: Release 10.2.0.5.0 - Production on Sat Jun 18 20:58:06 2011
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    RMAN> connect target sys/oracle@OLDDB
    connect auconnected to target database: OLDDB (DBID=1142960293)
    RMAN> xiliary /
    connected to auxiliary database: DUP (not mounted)
    RMAN> duplicate target database to dup
    logfile group 1 ('+DISK1/dup') size 200k ,
    group 2 ('+DISK1') size 200k;
    2> 3>
    Starting Duplicate Db at 2011/06/18 20:58:39
    using target database control file instead of recovery catalog
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: sid=153 devtype=DISK
    WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to diskgroup only.
    contents of Memory Script:
    set until scn 1613638;
    set newname for datafile 1 to
    "+DISK1";
    set newname for datafile 2 to
    "+DISK1";
    set newname for datafile 3 to
    "+DISK1";
    set newname for datafile 4 to
    "+DISK1";
    set newname for datafile 6 to
    "+DISK1";
    restore
    check readonly
    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
    Starting restore at 2011/06/18 20:58:42
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backupset restore
    channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to +DISK1
    restoring datafile 00002 to +DISK1
    restoring datafile 00003 to +DISK1
    restoring datafile 00004 to +DISK1
    restoring datafile 00006 to +DISK1
    channel ORA_AUX_DISK_1: reading from backup piece +DISK1/OLDDB/backupset/2011_05_22/nnndf0_tag20110522t000530_0.1691.751766731
    channel ORA_AUX_DISK_1: restored backup piece 1
    piece handle=+DISK1/OLDDB/backupset/2011_05_22/nnndf0_tag20110522t000530_0.1691.751766731 tag=TAG20110522T000530
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:06
    Finished restore at 2011/06/18 20:59:48
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUP" RESETLOGS ARCHIVELOG
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    MAXINSTANCES 32
    MAXLOGHISTORY 292
    LOGFILE
    GROUP 1 ( '+DISK1/dup' ) SIZE 200 K ,
    GROUP 2 ( '+DISK1' ) SIZE 200 K
    DATAFILE
    '+DISK1/dup/datafile/system.1674.754174727'
    CHARACTER SET WE8ISO8859P1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 06/18/2011 20:59:48
    RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
    ORA-01276: Cannot add file +DISK1/dup/controlfile/current.1669.754164181.  File has an Oracle Managed Files file name.
    RMAN>
    thank you very much for your help.
    thanks
    andrew

    RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
    ORA-01276: Cannot add file +DISK1/dup/controlfile/current.1669.754164181.  File has an Oracle Managed Files file name.Are you sure is it running under pfile?
    Ok, connect to auxiliary intance and post
    show parameter db_create
    show parameter control_filesIn your pfile, Have you mentioned single quotes?
    If your database with OMF then if you give it as below. as there is some work around
    Control_files='+DISK1/DUP/controlfile/control01.ctl','+DISK1/DUP/controlfile/control02.ctl'
    Check this too *Ora-1276 Error Recreating The Controlfile When Using +Asm [ID 303187.1]*

  • Backup controlfile to trace as 'c:\prod_ctl.txt'

    Hi All,
    11.2.0.1
    I am examining the output of the trace file, because I want to simulate or test this process.
    This file has two(2) sets of command. one(1) is for the intact online logs and the other one(1) is for damage online logs.
    Questions:
    1. What do u mean by damage online logs. does this mean that i lost all these redo files:
    LOGFILE
      GROUP 1 'D:\APP\PROD\ORADATA\ORCL\REDO01.LOG'  SIZE 50M BLOCKSIZE 512,
      GROUP 2 'D:\APP\PROD\ORADATA\ORCL\REDO02.LOG'  SIZE 50M BLOCKSIZE 512,
      GROUP 3 'D:\APP\PROD\ORADATA\ORCL\REDO03.LOG'  SIZE 50M BLOCKSIZE 512
    2. Why is that the two(2) sets are just the same set of commands? except for backup controlfile and open resetlogs?
    3. Do I need RMAN backup to run this recovery statements?
    Thanks,
    pK
    ========
    -- The following are current System-scope REDO Log Archival related
    -- parameters and can be included in the database initialization file.
    -- LOG_ARCHIVE_DEST=''
    -- LOG_ARCHIVE_DUPLEX_DEST=''
    -- LOG_ARCHIVE_FORMAT=ARC%S_%R.%T
    -- DB_UNIQUE_NAME="orcl"
    -- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'
    -- LOG_ARCHIVE_MAX_PROCESSES=4
    -- STANDBY_FILE_MANAGEMENT=MANUAL
    -- STANDBY_ARCHIVE_DEST=%ORACLE_HOME%\RDBMS
    -- FAL_CLIENT=''
    -- FAL_SERVER=''
    -- LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
    -- LOG_ARCHIVE_DEST_1='MANDATORY NOREOPEN NODELAY'
    -- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM EXPEDITE NOVERIFY SYNC'
    -- LOG_ARCHIVE_DEST_1='NOREGISTER NOALTERNATE NODEPENDENCY'
    -- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'
    -- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'
    -- LOG_ARCHIVE_DEST_STATE_1=ENABLE
    -- Below are two sets of SQL statements, each of which creates a new
    -- control file and uses it to open the database. The first set opens
    -- the database with the NORESETLOGS option and should be used only if
    -- the current versions of all online logs are available. The second
    -- set opens the database with the RESETLOGS option and should be used
    -- if online logs are unavailable.
    -- The appropriate set of statements can be copied from the trace into
    -- a script file, edited as necessary, and executed when there is a
    -- need to re-create the control file.
    --     Set #1. NORESETLOGS case
    -- The following commands will create a new control file and use it
    -- to open the database.
    -- Data used by Recovery Manager will be lost.
    -- Additional logs may be required for media recovery of offline
    -- Use this only if the current versions of all online logs are
    -- available.
    -- After mounting the created controlfile, the following SQL
    -- statement will place the database in the appropriate
    -- protection mode:
    --  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  NOARCHIVELOG
        MAXLOGFILES 16
        MAXLOGMEMBERS 3
        MAXDATAFILES 100
        MAXINSTANCES 8
        MAXLOGHISTORY 292
    LOGFILE
      GROUP 1 'D:\APP\PROD\ORADATA\ORCL\REDO01.LOG'  SIZE 50M BLOCKSIZE 512,
      GROUP 2 'D:\APP\PROD\ORADATA\ORCL\REDO02.LOG'  SIZE 50M BLOCKSIZE 512,
      GROUP 3 'D:\APP\PROD\ORADATA\ORCL\REDO03.LOG'  SIZE 50M BLOCKSIZE 512
    -- STANDBY LOGFILE
    DATAFILE
      'D:\APP\PROD\ORADATA\ORCL\SYSTEM01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\SYSAUX01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\UNDOTBS01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\USERS01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\EXAMPLE01.DBF'
    CHARACTER SET WE8MSWIN1252
    -- Commands to re-create incarnation table
    -- Below log names MUST be changed to existing filenames on
    -- disk. Any one log file from each branch can be used to
    -- re-create incarnation records.
    -- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
    -- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
    -- Recovery is required if any of the datafiles are restored backups,
    -- or if the last shutdown was not normal or immediate.
    RECOVER DATABASE
    -- Database can now be opened normally.
    ALTER DATABASE OPEN;
    -- Commands to add tempfiles to temporary tablespaces.
    -- Online tempfiles have complete space information.
    -- Other tempfiles may require adjustment.
    ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\APP\PROD\ORADATA\ORCL\TEMP01.DBF'
         SIZE 20971520  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
    -- End of tempfile additions.
    --     Set #2. RESETLOGS case
    -- The following commands will create a new control file and use it
    -- to open the database.
    -- Data used by Recovery Manager will be lost.
    -- The contents of online logs will be lost and all backups will
    -- be invalidated. Use this only if online logs are damaged.
    -- After mounting the created controlfile, the following SQL
    -- statement will place the database in the appropriate
    -- protection mode:
    --  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS  NOARCHIVELOG
        MAXLOGFILES 16
        MAXLOGMEMBERS 3
        MAXDATAFILES 100
        MAXINSTANCES 8
        MAXLOGHISTORY 292
    LOGFILE
      GROUP 1 'D:\APP\PROD\ORADATA\ORCL\REDO01.LOG'  SIZE 50M BLOCKSIZE 512,
      GROUP 2 'D:\APP\PROD\ORADATA\ORCL\REDO02.LOG'  SIZE 50M BLOCKSIZE 512,
      GROUP 3 'D:\APP\PROD\ORADATA\ORCL\REDO03.LOG'  SIZE 50M BLOCKSIZE 512
    -- STANDBY LOGFILE
    DATAFILE
      'D:\APP\PROD\ORADATA\ORCL\SYSTEM01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\SYSAUX01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\UNDOTBS01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\USERS01.DBF',
      'D:\APP\PROD\ORADATA\ORCL\EXAMPLE01.DBF'
    CHARACTER SET WE8MSWIN1252
    -- Commands to re-create incarnation table
    -- Below log names MUST be changed to existing filenames on
    -- disk. Any one log file from each branch can be used to
    -- re-create incarnation records.
    -- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
    -- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
    -- Recovery is required if any of the datafiles are restored backups,
    -- or if the last shutdown was not normal or immediate.
    RECOVER DATABASE USING BACKUP CONTROLFILE
    -- Database can now be opened zeroing the online logs.
    ALTER DATABASE OPEN RESETLOGS;
    -- Commands to add tempfiles to temporary tablespaces.
    -- Online tempfiles have complete space information.
    -- Other tempfiles may require adjustment.
    ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\APP\PROD\ORADATA\ORCL\TEMP01.DBF'
         SIZE 20971520  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
    -- End of tempfile additions.
    ===============,

    Hi ,
    As far as i understand  , one is with :
    CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS  NOARCHIVELOG
    and the other one is with :
    CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  NOARCHIVELOG
    The first one (resetlogs) is useful when you are trying to open a database after incomplete recovery (during cloning for example) or while changing the name of the database after restoring and recovering a database during a clone process.
    The second one ( noresetlogs )is used when we have a consistent database and we are recreating the controlfile.
    In General , you may be using resetlogs while opening a cloned database after incomplete recovery.
    Regards
    Karan

  • Recreating control file in RAC with noresetlogs

    Hi all,
    I need to recreate the controlfile in a 2-node RAC environment (9i)
    for altering the MAXLOGHISTORY value. I will be using noresetlogs as I
    have all the online logs available with me.
    I referred to metalink note (Note:118931.1) for the same, and to
    clarify the same, it refers to set cluster_database to false and then
    to true after creating the new controlfile.
    Here I have Log Groups 1,2,5,6,7 belongs to instance1 and the rest belongs to
    instance2
    Below is the trace of controlfile...
    create controlfile reuse database "prod" noresetlogs force logging
    archivelog
    maxlogfiles 64
    maxlogmembers 3
    maxdatafiles 800
    maxinstances 32
    maxloghistory 15000
    logfile
    group 1 '/dev/rprod_redo11' size 100m,
    group 2 '/dev/rprod_redo12' size 100m,
    group 3 '/dev/rprod_redo21' size 100m,
    group 4 '/dev/rprod_redo22' size 100m,
    group 5 '/dev/rprod_redo13' size 100m,
    group 6 '/dev/rprod_redo14' size 100m,
    group 7 '/dev/rprod_redo15' size 100m,
    group 8 '/dev/rprod_redo23' size 100m,
    group 9 '/dev/rprod_redo24' size 100m,
    group 10 '/dev/rprod_redo25' size 100m
    -- standby logfile
    datafile
    Please clarify on the same, do the traced controlfile need to have some thread info for redo logs & do I need to make the cluster_database parameter to fale/true.
    Thanks!
    Prat

    1. Create the trace file (with Create control file statements..)
    2. Edit the trace file, to remove the log groups which doesn't belong to Instance 1 (in you case you would be removing groups 3,4,8,9,10).
    3. Shutdown all the instances.
    4. edit the init.ora file to make CLUSTER_DATABASE=FALSE:
    5. startup nomount instance 1.
    6. Run the edited trace file to create the control file.
    7. shutdown instance 1.
    8. edit the init.ora file to make CLUSTER_DATABASE=TRUE;
    9. Startup instance 1;
    10. Add the log groups for the instance 2 (groups 3,4,8,9,10)
    11. Add tempfiles as indicated in the trace file.
    12. Enable thread 2;
    13. Startup instance 2.
    As always, take backups.
    HTH
    Thanks
    Chandra

  • Why cant the controlfile be in sync, when using backup controlfile

    hi all,
    i understand a few point ...from a dba friend of mine..
    you need a resetlog to sync the datafile headers and the controlfiles
    1) you need a resetlog when doing incomplete recovery
    2) you can recovery completely using a backup controlfile provided you have all the necessary archived logs and online redo logs.
    3) but in order not to do resetlog after 2) , you must re-create the controlfile
    my questions are
    q1) are the following point above true ?
    *q2)  why cant oracle update the controlfile when recovering using the backup controlfile ? in that case, i do not need to recreate a controlfile , isnt it ?
    Rgds,
    Noob

    user12050668 wrote:
    hi hermant,
    q1) why would i need to open the database with resetlog ?
    Yes. i am using a backup controlfile, but i have all the archived and online redologs till point of failure ?
    The purpose of a resetlog is to sync the controlfile and datafile headers , isnt it ? but i do not need to sync, as i have all the latest applied
    am i right ?
    If you use RECOVER DATABASE USING BACKUP CONTROLFILE in this case control file type is *"BACKUP"* but not *"CURRENT"* due to even you have all archivelogs and online logs you have to open database RESETLOGS statement.Actually after applying all archive and online redo logs ALTER DATABASE OPEN RESETLOGS internally sync and "Say" to control files "RECOVER FINISHED".Because CF type is BACKUP.
    q2) You need to OPEN RESETLOGS. You can choose to create controlfile OR not create controlfile (i.e. open with the backup controlfile that was used for the RECOVER).
    If you do a CREATE CONTROLFILE it has to be CREATE CONTROLFILE RESETLOGS, followed by ALTER DATABASE OPEN RESETLOGS.
    in what circumstances, would i need to re-create the controlfile when i can still use the backup controlfile ? as in any case, i would still need to resetlog.
    Rgds,
    NoobIf you have backup controlfile then do not need recreate control files.And you need use backup control file.If you lost all backup of control files and copies then or you want change database name then you can use RECREATE CONTROL FILE again.

  • Create controlfile statement

    I created a copy of my database
    by physically copying datafiles and
    tempfiles it consist of,
    then I called create control file statement,
    but there can't be tempfiles specified there.
    I thought that I have to create temp tablespace
    after opening database, but it existed so I just
    called alter tablespace temp add tempfile
    'tempxx.dbf' reuse;
    for all tempfiles copied.
    I don't know how it is possible temp tablespace
    existed in created database when no tempfiles
    were specified in create controlfile statement.

    I created a copy of my database
    by physically copying datafiles and
    tempfiles it consist of,
    then I called create control file statement,
    but there can't be tempfiles specified there.r.- From where you took the script to create the temp datafiles ?
    I thought that I have to create temp tablespace
    after opening database, but it existed so I just
    called alter tablespace temp add tempfile
    'tempxx.dbf' reuse;r.- In effect they are created after opening the database
    for all tempfiles copied.
    I don't know how it is possible temp tablespace
    existed in created database when no tempfiles
    were specified in create controlfile statement.That task must be done so:
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "COPY1" NORESETLOGS  NOARCHIVELOG
    --  SET STANDBY TO MAXIMIZE PERFORMANCE
        MAXLOGFILES 50
        MAXLOGMEMBERS 5
        MAXDATAFILES 100
        MAXINSTANCES 1
        MAXLOGHISTORY 226
    LOGFILE
      GROUP 1 'C:\COPY1\COPY1\REDO01.LOG'  SIZE 10M,
      GROUP 2 'C:\COPY1\COPY1\REDO02.LOG'  SIZE 10M,
      GROUP 3 'C:\COPY1\COPY1\REDO03.LOG'  SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
      'C:\COPY1\COPY1\SYSTEM01.DBF',
      'C:\COPY1\COPY1\UNDOTBS01.DBF',
      'C:\COPY1\COPY1\CWMLITE01.DBF',
      'C:\COPY1\COPY1\DRSYS01.DBF',
      'C:\COPY1\COPY1\EXAMPLE01.DBF',
      'C:\COPY1\COPY1\INDX01.DBF',
      'C:\COPY1\COPY1\ODM01.DBF',
      'C:\COPY1\COPY1\TOOLS01.DBF',
      'C:\COPY1\COPY1\USERS01.DBF',
      'C:\COPY1\COPY1\XDB01.DBF'
    CHARACTER SET WE8ISO8859P1
    # Recovery is required if any of the datafiles are restored backups,
    # or if the last shutdown was not normal or immediate.
    RECOVER DATABASE
    # Database can now be opened normally.
    ALTER DATABASE OPEN;
    # Commands to add tempfiles to temporary tablespaces.
    # Online tempfiles have complete space information.
    # Other tempfiles may require adjustment.
    ALTER TABLESPACE TEMP ADD TEMPFILE 'C:\COPY1\COPY1\TEMP01.DBF'
         SIZE 41943040  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
    # End of tempfile additions.Why you want to create or recreate the controlfiles ?
    Joel Pérez
    http://www.oracle.com/technology/experts

  • Startup Database using Controlfile into Another Platform

    Hello DBA's
    My IT Manager came with a logical question.
    Can we Copy the Datafiles + Controlfiles + Redologs ifrom one platform (SOLARIS) into another (Linux)
    and simply startup recreating the controlfile?
    If Not Why Not?
    If the Datafiles are in a Storage (Solaris) and this storage host partitions for Solaris Oracle Database and Partitions for Linux Oracle database
    Does someone can answer thsi question?
    Thxs

    In addition to the link provided by Osama (which talks about copying data between the same platform), you also need to consider moving your data across platforms and the endianness is important.
    If you are moving from Solaris SPARC to Linux x64, you cannot simply copy the datafiles. They use a different endianness. You must use the Transportable Tablespace Feature (and cannot transport SYSTEM tablespace). There is one exception if you are migrating from SPARC to Exadata, you'll need to search MOS for the note on that one.
    If you are moving from Solarix x64 to Linux x64 you can get away with the RMAN CONVERT DATABASE feature which will convert (basically copy and make some small modifications) your database. I found think link that outlines the procedure http://www.scribd.com/doc/19211941/RMAN-CONVERT-DATABASE-cross-platform
    Bjoern

  • Standby controlfile SCN ahead of datafile SCN

    Hello,
    Is there any quick fix to the scenario where the standby side controlfile SCN has gone ahead of the datafile SCN. All the archives are getting shipped to the standby side, but any attempt to start the MRP fails with -
    Recovery interrupted!
    Standby recovery stopped due to failure in applying recovery marker (opcode 17.4).
    Datafiles are recovered to a consistent state at change 12679713219897 but controlfile is ahead at change 12679713219906.
    DB (stand-alone): 11.2.0.2
    Platform: Sun SPARC
    Thanks
    aBBy

    Is there any quick fix to the scenario where the standby side controlfile SCN has gone ahead of the datafile SCN. All the archives are getting shipped to the standby side, but any attempt to start the MRP fails with -
    Recovery interrupted!
    Standby recovery stopped due to failure in applying recovery marker (opcode 17.4).
    Datafiles are recovered to a consistent state at change 12679713219897 but controlfile is ahead at change 12679713219906.
    Are you trying to perform Manual recovery from SQL? like recover standby database?
    Even if controlfile is new and datafiles are older, still you should able to perform recovery , But this will be a valid database to open when SCN's are in SYNC.
    SO perform recovery automated and then check synchronization.
    SQL> alter database recover managed standby database disconnect from session;
    Refer alert log file until it waits as " Media recovery waiting for thread# <no> sequence# <>"
    Then, check SYNC as follows
    Primary:-
    SQL> select thread#, max(sequence#) from v$archived_log group by thread#;
    Standby:-
    SQL> select thread#, max(sequence#) from v$archived_log group by thread#;
    SQL> select thread#, max(sequence#) from v$archived_log where applied='YES' group by thread#;
    Also you can try option of recreating standby controlfile as below from primary
    SQL> alter database create standby controlfile as 'loation';
    & restore it in standby database.

  • Issue with create controlfile script that was generated from trace file

    Hi All,
    I am racking my brans here as cannot seem to fatham this one out. Having backed up control file to trace, then deleted all datafiles, control files, and redo log files, I then ran the following and received the below error:
    SQL> STATUP NOMOUNT
    ORACLE instance started.
    Total System Global Area 289406976 bytes
    Fixed Size 1248576 bytes
    Variable Size 88081088 bytes
    Database Buffers 192937984 bytes
    Redo Buffers 7139328 bytes
    SQL> CREATE CONTROLFILE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
    2 MAXLOGFILES 16
    3 MAXLOGMEMBERS 3
    4 MAXDATAFILES 100
    5 MAXINSTANCES 8
    6 MAXLOGHISTORY 292
    7 LOGFILE
    8 GROUP 1 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO01.LOG' SIZE 50M,
    9 GROUP 2 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO02.LOG' SIZE 50M,
    10 GROUP 3 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\REDO03.LOG' SIZE 50M
    11 DATAFILE
    12 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF',
    13 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\UNDOTBS01.DBF',
    14 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSAUX01.DBF',
    15 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\USERS01.DBF'
    16 CHARACTER SET WE8MSWIN1252;
    CREATE CONTROLFILE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01565: error in identifying file
    'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    I am able to restore a control file using [RMAN> restore controlfile to '....' ] and then mount the database without problems one the CF restore has taken place, it is just when I attempt to create control file using the able commands that I get the preceding error.
    As this control file statement that is attepting to create a control file has never had any information about datafiles is this why I am seeing the error?
    Have checked metalink & web but yet to find a reason why this is occuring. Please advise.
    Thanks,
    Andrew

    Hi,
    You deletd all the data files that is the issue. So it is complaining that it can not find system tablespace datafile. If you just wanted to recreate the controlfile then just delete control file. Why did you delete data files.
    Regards
    Generetaed control trace flle is used to re-create the control file. This not not a way to create/restore data files. They should exist for control file to be created.
    Edited by: skvaish1 on Nov 5, 2009 4:36 PM

  • Cannot recover from lost of all the controlfiles without resetlogs?

    Cannot recover from lost of all the controlfiles without resetlogs?
    I have an Oracle10g (10.2.0.1) database(on RHEL5.0 system) DB10G with a recovery catalog database RCATALLOG. The RCATALOG database is synchronized with theDB10G database.
    Then I lost all the current controlfiles and I make the following steps:
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> startup nomount;
    ORACLE instance started.
    [oracle@hostp db10g]$ rman target / catalog rman/oracle@rcatalog
    RMAN> restore controlfile;
    RMAN> alter database mount;
    RMAN> r*ecover database;*
    RMAN> alter database open;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 09/17/2008 20:04:07
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
    RMAN> alter database open noresetlogs;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "identifier": expecting one of: "resetlogs, ;"
    RMAN-01008: the bad identifier was: noresetlogs
    RMAN-01007: at line 1 column 21 file: standard input
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate"
    RMAN-01007: at line 1 column 32 file: standard input.
    Because I did not restore the the controlfiles from the backups, I do not need to open the database with open resetlogs.
    Why I cannot open the database without resetlogs? Is any step wrong?
    Thank you

    Hi,
    You restored the controlfile from backup but not the full DB. The Database files header are not sinchronized with your controlfile.
    Follow the following steps:
    1) Mount your Database and create a backup of the controlfile using:
    SQL>ALTER DATABASE BACKUP CONTROLFILE TO TRACE;2) Modify the trace file and recreate the controlfile.
    3) At this stage your database is mounted. You need to recover it.
    SQL> recover database;
    Media recovery complete.4)Open the database after recovery completes.
    SQL> alter database open;
    Database altered.Done, any problem you can use this link for reference:
    - http://www.databasejournal.com/features/oracle/article.php/3738736
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • Krcpwnc: following controlfile record written over:

    in alert file
    krcpwnc: following controlfile record written over:
    RECID #195 Recno 13 Record timestamp
    02/23/08 18:59:02
    Thread=1 Seq#=1143
    Flags:
    <produced by archive operation>
    <created by the ARCH process>
    Resetlogs scn and time
    scn: 0x0000.0002e872
    05/24/05 13:22:48
    filename D:\ORACLE\ORA92\RDBMS\ARC01143.001
    Low
    scn: 0x0000.45a62c90
    02/22/08 17:32:52
    Next
    scn: 0x0000.45ad7869
    02/23/08 18:59:00
    Block count=204798 Blocksize=512

    The cause is that the controlfile has a specified number of slots for the log history. This is specified during database creation using the MAXLOGHISTORY parameter. Every time a logswitch occurs, an entry is written to the controlfile in an open slot and if no slots are available the oldest one is overwritten.
    So, this is a normal behavior and this message is informative. In order to avoid this message, do one of the following :-
    1. Set the CONTROL_FILE_RECORD_KEEP_TIME parameter to zero - this will
    disable the re-usable section expiration and would be re-used on demand.
    2. Increas MAXLOGHISTORY to make more slots available in the controlfile - you need to recreate the controlfile.
    3. Set the CONTROL_FILE_RECORD_KEEP_TIME parameter to a lower value to
    allow the entries to be overwritten without warning.
    I hope you are using oracle version 8i or 9i.
    Thanks
    Siba

Maybe you are looking for

  • Fiori Approve Requisitions error - unable to start app

    Hello Experts, We have implemented the UIX01EAP (SAPK-10002INUIX01EAP) Fiori component. I have followed the link Approve Requisitions. I have activated the OData Service GBAPP_PRAPPROVAL, activated the UI5 application MM_PR_APV, assigned the Business

  • Problems with Blackberry Pop Up Blocker

    When I try to enter to a web page I receive this message from my Blackberry 8100 "System has been blocked by POP-UP-BLOCKER. Please diseble the POP-UP BLOCKER and try again" I have been trying all the recommendations buts it is not working. Thanks

  • Accounts receivable in PA reporting

    Hello everyone, I am trying to bring account receivable as one of the key figurs in PA reporting. Is there a keyfigure already defined in SAP or do I need to create one? Also can anyone tell me how do I multiply the currency convertor for a specific

  • "No subtransaction type allowed for this invoice"

    Dear Gurus While creating excise invoice (j1iin) from billing I am getting an error "No subtransaction type allowed for this invoice" . I get this error when I try to save the excise invoice. I am using subtransaction type. The required config for su

  • Archive link

    Dear All need to know more about the functinality of Archive link. need the basic requirement and basic setup required for this functionality. any thing which is to be activated???? how the doc type of archive link and DMS doc type varies????????????