Home > DBA > Recover database without control files and redo log files

Recover database without control files and redo log files

Again there has been some gap in my writing of articles. Today I will share one of my experience faced recently. We came to know that one of the databases crashed. After some investigation we found that we only had data files and initialization file intact. All other files i.e. control files and redo log files were lost. This was a development database and the control files and log files were not multiplexed (First mistake). With only data files, how would you recover a database with minimal loss? We even did not have consistent backup for the database (Second mistake). After doing some research, we finally decided to give a go to recover the database with available data files and initialization file.

The steps followed to recover the database:

Startup the database with the initialization file. As we do not have the control files, start the database in no mount state.

SQL> startup nomount 
ORACLE instance started. 

Total System Global Area  209715200 bytes 
Fixed Size                  1248140 bytes 
Variable Size              75498612 bytes 
Database Buffers          130023424 bytes 
Redo Buffers                2945024 bytes 
SQL>

Check the path of control files.

SQL> show parameter control 

NAME                                 TYPE        VALUE 
------------------------------------ ----------- ------------------------------ 
control_file_record_keep_time        integer     7 
control_files                        string      K:\ORCL10G\CONTROL\CONTROL01.C 
                                                 TL, K:\ORCL10G\CONTROL\CONTROL 
                                                 02.CTL, K:\ORCL10G\CONTROL\CON 
                                                 TROL03.CTL

Having the details of all the data files at hand recreate the control files.

SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL10G" RESETLOGS NOARCHIVELOG 
    MAXLOGFILES 16 
    MAXLOGMEMBERS 3 
    MAXDATAFILES 100 
    MAXINSTANCES 8 
    MAXLOGHISTORY 292 
LOGFILE 
  GROUP 1 'K:\ORCL10G\LOG\REDO01.LOG'  SIZE 50M, 
  GROUP 2 'K:\ORCL10G\LOG\REDO02.LOG'  SIZE 50M, 
  GROUP 3 'K:\ORCL10G\LOG\REDO03.LOG'  SIZE 50M 
DATAFILE 
  'K:\ORCL10G\DATA\SYSTEM01.DBF', 
  'K:\ORCL10G\DATA\UNDOTBS01.DBF', 
  'K:\ORCL10G\DATA\SYSAUX01.DBF', 
  'K:\ORCL10G\DATA\USERS01.DBF', 
  'K:\ORCL10G\DATA\EXAMPLE01.DBF', 
  'K:\ORCL10G\DATA\UNDOTBS02.DBF' 
CHARACTER SET WE8MSWIN1252; 

Control file created.

Note the RESETLOGS option in the create control file script. This will reset the logs and synchronizes the SCN between the database files, control files and redo log file. Oracle will re-create the redo log files when the database is opened with resetlogs options.

Once the control file is created, try mounting the database. If the database mounts well then everything seems to be fine.

SQL> alter database mount; 

Database altered.

The database mounted successfully. Open the database with resetlogs option.

SQL> alter database open resetlogs; 

Database altered.

Here we go. The database opened successfully. The only point to consider is that of the data loss. The data in the redo log files, as it existed before the loss, will be lost. Hence the data loss here could be minimum.

Conclusion :

1. Always multiplex the Control files and Redo log files.
2. Have a consistent backup of the database.

Categories: DBA
  1. jimit
    January 28, 2008 at 3:36 pm | #1

    hi praveen
    i’m facing such a same type of problem and i’d tried as u mention ,but still when i try to open the database with resetlogs option ,it will give error that my system01.dbf file needed recovery.how can i solve this.please reply me the answer

  2. akpraveen
    January 30, 2008 at 4:39 pm | #2

    Hi Jimit,

    Could you please let me know what version of Oracle are you using?

    Regards,
    -Praveen.

  3. Kapil Kr. Gupta
    February 2, 2008 at 6:54 am | #3

    Hi Jimit & Parveen;

    I read this web page and know another way how to reover database.

    I am not a DBA. but working with Oracle Database from last 4 years. in these last 4 year many time. for recover that database i will replace the cruppted files with proper Log & Control
    files. Most of the time i am sucess in recovery but that is not satisfactory.
    Dear tell me how i am able to in contact with you.
    reply me at my mail id kapilgupta55@yahoo.com

  4. Sammy
    March 22, 2008 at 11:03 am | #4

    hi praveen

    say if i have mutliplexed control and redo log files,

    how does oracle mount the database using the multiplexed control file, when it sees that the first control file is lost.

    regards
    -Sam

  5. akpraveen
    April 8, 2008 at 9:07 am | #5

    Hi Sammy,

    Sorry for the late response….

    Oracle will first access the initialization parameter files where you have a parameter by name “control_files”. It contains names of all the control files along with full path. It then check the availability of all the file and validates them. If one of the controlfile is unavailable or corrupted, then the database won’t come up. In that case remove the affected file from the list of control files from control_files parameter.

    SQL> show parameter control_files

    NAME TYPE VALUE
    ———————————— ———– ——————————
    control_files string C:/MIG10G/control/ctrl
    01MIG10.ctl, D:/MIG10G
    /control/ctrl02MIG10.ctl

    Hope this helps.

    Regards,
    -Praveen.

  6. Partha
    April 22, 2008 at 11:04 am | #6

    Hi Praveen,
    I could mount the database, but problem is my redos and datafiles are 10 days new to the control files. I have mounted the DB with pfile but couldn’t proceed further as the undos, redos, datafiles are not updated with control files. Kindly help and guide me.

    DB Version 10g. 10.2.0.1 on AIX 5L (IBM SYSTEM 5).

    Thanks in advance.

    Regards, Partha

  7. Partha
    April 22, 2008 at 11:26 am | #7

    Hi Praveen,

    Do I need to create the control file with current redos and undos …. this has happend because, the os backup is restored from tape of previous 10 days wherein the ‘/oracle’ were backed but the storage fs ‘/oradata1′ and ‘/oradata2′ were missed out as the datafiles/undos/redos/ were in there ….

    Kindly suggest and help.

    Thanks & Regards, Partha

  8. akpraveen
    April 23, 2008 at 8:34 am | #8

    Partha,

    Have you lost all of the controlfiles even from the backup? In that case you need to recreate the controlfiles. If you have missed out undo information as well, then you will have to create and assign different undo tablespace in order to open your database.

    Hope this helps..

    Regards,
    -Praveen.

  9. shy
    July 2, 2008 at 6:29 am | #9

    i lost my controlfile even from the backup ?i got the answer as to create
    controlfile .kindly send the step to create the control file to start the
    database…..to
    thanks and regards

  10. akpraveen
    July 4, 2008 at 1:14 pm | #10

    Hi Shy,

    Sorry for being late to reply. You can refer the following link to re-create the controlfiles.

    http://www.acs.ilstu.edu/docs/Oracle/server.101/b10759/statements_5003.htm

    Hope this helps.

    Regards,
    -Praveen.

  11. Lost
    July 8, 2008 at 11:03 pm | #11

    Hi Praveen,

    I am having the same issue as jimit:
    When I run the “ALTER DATABASE OPEN RESETLOGS”, I get the following error:
    ======================================================
    SQL> ALTER DATABASE OPEN RESETLOGS
    ALTER DATABASE OPEN RESETLOGS
    *
    ERROR at line 1:
    ORA-01194: file 1 needs more recoverty to be consistent
    ORA-01110: data file 1: ‘D:\ORACLE\PRODUCT\10.1.0\ORADATA\MSTF\SYSTEM01.DBF’

    ======================================================

    Is there a way to get past this error?

    Thanks,
    Lost

    P.S. I am running Oracle 10g vr. 10.1.0.2.0:
    ======================================================
    SQL> select * from v$version:
    ———————————————————–
    Oracle Database 10g Release 10.1.0.2.0 – Production
    PL/SQL Release 10.1.0.2.0 – Production
    CORE 10.1.0.2.0 Production
    TNS for 32-bit Windows: Version 10.1.0.2.0 – Production
    NLSRTL Version 10.1.0.2.0 – Production
    ======================================================

    Originally, I was trying to do a recover, but kept getting errors about the REDO03.LOG file had corrupt header. So, I figured I’d just delete all the control (*.ctl) and redo log files (REDO*.log) and try to recover as you listed here.

  12. Lost
    July 15, 2008 at 11:31 pm | #12

    Hi Praveen,

    I am having the same issue as jimit:
    When I run the “ALTER DATABASE OPEN RESETLOGS”, I get the following error:
    ======================================================
    SQL> ALTER DATABASE OPEN RESETLOGS
    ALTER DATABASE OPEN RESETLOGS
    *
    ERROR at line 1:
    ORA-01194: file 1 needs more recoverty to be consistent
    ORA-01110: data file 1: ‘D:\ORACLE\PRODUCT\10.1.0\ORADATA\MSTF\SYSTEM01.DBF’

    ======================================================

    Is there a way to get past this error?

    Thanks,
    Lost

    P.S. I am running Oracle 10g vr. 10.1.0.2.0:
    ======================================================
    SQL> select * from v$version:
    ———————————————————–
    Oracle Database 10g Release 10.1.0.2.0 – Production
    PL/SQL Release 10.1.0.2.0 – Production
    CORE 10.1.0.2.0 Production
    TNS for 32-bit Windows: Version 10.1.0.2.0 – Production
    NLSRTL Version 10.1.0.2.0 – Production
    ======================================================

    Originally, I was trying to do a recover, but kept getting errors about the REDO03.LOG file had corrupt header. So, I figured I’d just delete all the control (*.ctl) and redo log files (REDO*.log) and try to recover as you listed here.

  13. Lost
    July 15, 2008 at 11:34 pm | #13

    Praveen,

    I don’t see my post on your web site from over a week ago. Is there something wrong with your site that the “Submit Comment” button is not working anymore?

    Here is my request I submitted:
    Hi Praveen,

    I am having the same issue as jimit:
    When I run the “ALTER DATABASE OPEN RESETLOGS”, I get the following error:
    ======================================================
    SQL> ALTER DATABASE OPEN RESETLOGS
    ALTER DATABASE OPEN RESETLOGS
    *
    ERROR at line 1:
    ORA-01194: file 1 needs more recoverty to be consistent
    ORA-01110: data file 1: ‘D:\ORACLE\PRODUCT\10.1.0\ORADATA\MSTF\SYSTEM01.DBF’

    ======================================================

    Is there a way to get past this error?

    Thanks,
    Lost

    P.S. I am running Oracle 10g vr. 10.1.0.2.0:
    ======================================================
    SQL> select * from v$version:
    ———————————————————–
    Oracle Database 10g Release 10.1.0.2.0 – Production
    PL/SQL Release 10.1.0.2.0 – Production
    CORE 10.1.0.2.0 Production
    TNS for 32-bit Windows: Version 10.1.0.2.0 – Production
    NLSRTL Version 10.1.0.2.0 – Production
    ======================================================

    Originally, I was trying to do a recover, but kept getting errors about the REDO03.LOG file had corrupt header. So, I figured I’d just delete all the control (*.ctl) and redo log files (REDO*.log) and try to recover as you listed here.

  14. akpraveen
    July 17, 2008 at 10:08 am | #14

    Hi,

    Sorry for being late on the response. Have you restored all your database files from the backup? Was the shutdown clean when the backup was taken? If yes then you need to restore the backup data files, create the controlfile and open the database with resetlogs option.

    If the shutdown wasn’t clean, then you will have to restore complete database and recover using archive logs.

    Hope this helps.

    Regards,
    -Praveen.

  15. SindhuNaveen
    August 19, 2008 at 2:30 pm | #15

    Hi Praveen
    This is sindhuNaveen.And i am in need to resize a redolog file in a group and then i need to rename it
    can u just help me for the same

    Thanks in Advance :-)
    SindhuNaveen

  16. akpraveen
    August 20, 2008 at 9:13 am | #16

    SindhuNaveen,

    You cannot directly resize an existing set of redo logs. If you want to resize and rename the redo log groups, then first create additional set of redo log file group with the desired name and size. Once the older redo log groups are inactive, you can drop those groups there by achieving the requirement.

    Hope this helps.

    Regards,
    -Praveen.

  17. SindhuNaveen
    August 20, 2008 at 9:56 am | #17

    Hi Praveen,
    Thanks for ur reply..

  18. SindhuNaveen
    August 20, 2008 at 10:00 am | #18

    Hi praveen,

    I have a controlfile for my database..And if i need to multiplex the controlfile what should i do??
    And i used the command
    alter database backup controlfile to ‘location’;
    but when using select name from v$controlfile;
    I have only one controlfile i couldnt find the others that are backup’ed…
    Kindly do help me
    Thanks in Advance :-)
    SindhuNaveen

  19. suga
    September 2, 2008 at 1:00 pm | #19

    hi ,
    I am doin mca and dba course in that i create a database and practice backup and recovery .. i delete relog file when the database was shutdown .. wat the scenerio to recover the redolog file and to open the database … plssss reply me soon

  20. akpraveen
    September 3, 2008 at 12:12 pm | #20

    Hi Suga,

    You can try out doing an incomplete recovery and open the database with resetlogs option. However this will require some guidance to you. Please check with somebody who has done this before and take their help in doing so.

    Regards,
    -Praveen.

  21. Javed
    September 19, 2008 at 12:09 pm | #21

    Hi Praveen,

    After wondering here and there finally i reahed this blog & hope to get the solution.problem is my oracle9i’s oradim.exe currupted by trojan Horse virus & after replacing with new oradim.exe oracle still not started.so I copied all control files,data files and redo log files then formatted machine and installed a new copy of oacle9i with the SAME NAME of SID=orcl and created same users and passwords then i shutted down oracle and replaced the orcl folder but when i try to log in it shows error that ora-01033: oracle initialization or shut down in progress..so please show me detail procedure how to get back my old tables from old database=orcl.

    I am a novice in oracle as i am ajava,j2ee programmer..so kindly help me..but please hurry…

    Thanks in advance

  22. akpraveen
    September 22, 2008 at 2:19 pm | #22

    Hi Javed,

    Was the shutdown clean before overwriting the folder with the backed up version. Make sure all the relevant Oracle services are also stopped before you overwrite the ‘orcl’ folder.

    Regards,
    -Praveen.

  23. Abhishek
    November 10, 2008 at 11:35 am | #23

    hi there praveen,
    I am in a problem it seems. I am working on an engg. software which uses oracle 9i as DB. Nowadays i’m getting some errors like ORA-01033, ORA-01113, ORA-01110 and sometimes ORA-00340. My questions are :-

    1)How do i resolve these problems. When these error come i log in as “nolog” n try to shutdown and startup! If some file is corrupted i use the v$recover method.
    2)What are these REDO log files, error writing to file? And how do i recover these files!
    3)I’m taking the backup of the oracle drive by symantec backup manager. Is it ok to use this or i shld use some special nackup software.

    Actually i’m not from the I.T background so very less knowledge of oracle. Kindly let me know the solutions! Waiting for your reply..

    Abhishek Nambiar

  24. sheethal
    November 15, 2008 at 11:31 am | #24

    my database having problem.the error is ora 1194 and ora 1110.once i done incomplete recovery. then i got the above error then in mount stage i tried to recover database.that time i found the error particular block was corrupted and log file is also corrupted
    please response this mail.
    thnks and rgds

  25. syed khalid ali
    December 2, 2008 at 11:58 am | #25

    hi Praveen,

    i loss my controlfile,but i don’t have backup and multiplux. i connected my db as nomount mode and try to recreate the controlfile, but it has been giving error like…
    sql>startu nomount

    SQL> alter database backup controlfile to trace;
    alter database backup controlfile to trace
    *
    ERROR at line 1:
    ORA-01507: database not mounted

    so what to do…

  26. akpraveen
    December 2, 2008 at 4:17 pm | #26

    Syed,

    The database controlfile can be traced only if the database is mount. Only in mount state the Oracle can read the controlfiles and back it up to trace. Now as you do not have the controlfile trace or backup, you will have to recreate the controlfiles using ‘CREATE CONTROLFILE’ syntax and with available information of datafiles and logfiles.

    Hope this helps..

    Regards,
    -Praveen.

  27. akpraveen
    December 2, 2008 at 4:20 pm | #27

    Sheetal,

    Could you please place the steps that you have followed to recover the database? Please cut and paste the actual result for better clarity.

    Regards,
    -Praveen.

  28. shouki
    December 17, 2008 at 6:00 pm | #28

    hi praveen,
    iam shouki,i lost my current redolog file,i cannot open my database,how can i drop my current redolog file

    • Raman
      February 9, 2012 at 9:41 am | #29

      We are considering the scenario where we have the database in archive log mode and we have lost one of the active redo log file.

      lets say that right now database is working fine and we are just starting it. All the files (Controlfiles, datafiles and online redo log files are intact).

      1) Starting the database

      SQL> startup
      ORACLE instance started.

      Total System Global Area 1073741824 bytes
      Fixed Size 1984184 bytes
      Variable Size 243276104 bytes
      Database Buffers 822083584 bytes
      Redo Buffers 6397952 bytes
      Database mounted.
      Database opened.

      2) Archive log status

      SQL> archive log list
      Database log mode Archive Mode
      Automatic archival Enabled
      Archive destination /dy/oracle/product/db10g/archive/htmldb
      Oldest online log sequence 0
      Next log sequence to archive 1
      Current log sequence 1
      SQL> alter system switch logfile;

      System altered.

      SQL> /

      System altered.

      SQL> archive log list
      Database log mode Archive Mode
      Automatic archival Enabled
      Archive destination /dy/oracle/product/db10g/archive/htmldb
      Oldest online log sequence 1
      Next log sequence to archive 1
      Current log sequence 3
      3) Redo log group 2 is the current redo log and other two are active, meaning that they are required for recovery. When we say they are required for recovery means that the content has not been flushed to datafiles from database buffer cache. DBWR is yet to do that. This happens when checkpoint has just started and DBWR is yet to perform its job.

      But at the same time you can see that these active redo log files has been archived by ARCH process. This is important for us.

      SQL> select * from v$log;

      GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
      ———- ———- ———- ———- ———- — —————-
      FIRST_CHANGE# FIRST_TIM
      ————- ———
      1 1 2 104857600 1 YES ACTIVE
      4384517 13-JUN-08

      2 1 3 104857600 1 NO CURRENT
      4384519 13-JUN-08

      3 1 1 104857600 1 YES ACTIVE
      4379112 13-JUN-08

      SQL> select * from v$logfile;

      GROUP# STATUS TYPE
      ———- ——- ——-
      MEMBER
      ——————————————————————————–
      IS_

      1 ONLINE
      /dy/oracle/product/db10g/dbf/redo01.log
      NO

      3 ONLINE
      /dy/oracle/product/db10g/dbf/redo03.log
      NO

      GROUP# STATUS TYPE
      ———- ——- ——-
      MEMBER
      ——————————————————————————–
      IS_

      2 ONLINE
      /dy/oracle/product/db10g/dbf/redo02.log
      NO

      4) Lets remove one of the active redo log file.

      bash-2.05$ rm /dy/oracle/product/db10g/dbf/redo03.log

      5) Shut abort

      bash-2.05$ sqlplus “/as sysdba”

      SQL*Plus: Release 10.2.0.1.0 – Production on Fri Jun 13 02:16:22 2008

      Copyright (c) 1982, 2005, Oracle. All rights reserved.

      Connected to:
      Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
      With the Partitioning, OLAP and Data Mining options

      SQL> shut abort
      ORACLE instance shut down.

      6) Startup the database. This will fail as it wont be able to recover because it will not be able to access redo log group 3.

      SQL> startup
      ORACLE instance started.

      Total System Global Area 1073741824 bytes
      Fixed Size 1984184 bytes
      Variable Size 243276104 bytes
      Database Buffers 822083584 bytes
      Redo Buffers 6397952 bytes
      Database mounted.
      ORA-00313: open failed for members of log group 3 of thread 1
      ORA-00312: online log 3 thread 1: ‘/dy/oracle/product/db10g/dbf/redo03.log’
      ORA-27037: unable to obtain file status
      SVR4 Error: 2: No such file or directory
      Additional information: 3

      7) Now we can recover database until cancel because just “recover database” will not be able to recover since the active redo log file is missing. Even though this file is archived, database wont be aware of this.

      SQL> recover database until cancel;
      ORA-00279: change 4380738 generated at 06/13/2008 02:12:35 needed for thread 1
      ORA-00289: suggestion :
      /dy/oracle/product/db10g/archive/htmldb/ARCH_657248900_1_1.ARC
      ORA-00280: change 4380738 for thread 1 is in sequence #1

      Specify log: {=suggested | filename | AUTO | CANCEL}
      AUTO
      ORA-00279: change 4384517 generated at 06/13/2008 02:15:30 needed for thread 1
      ORA-00289: suggestion :
      /dy/oracle/product/db10g/archive/htmldb/ARCH_657248900_1_2.ARC
      ORA-00280: change 4384517 for thread 1 is in sequence #2
      ORA-00278: log file
      ‘/dy/oracle/product/db10g/archive/htmldb/ARCH_657248900_1_1.ARC’ no longer
      needed for this recovery

      ORA-00279: change 4384519 generated at 06/13/2008 02:15:31 needed for thread 1
      ORA-00289: suggestion :
      /dy/oracle/product/db10g/archive/htmldb/ARCH_657248900_1_3.ARC
      ORA-00280: change 4384519 for thread 1 is in sequence #3
      ORA-00278: log file
      ‘/dy/oracle/product/db10g/archive/htmldb/ARCH_657248900_1_2.ARC’ no longer
      needed for this recovery

      ORA-00308: cannot open archived log
      ‘/dy/oracle/product/db10g/archive/htmldb/ARCH_657248900_1_3.ARC’
      ORA-27037: unable to obtain file status
      SVR4 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: ‘/dy/oracle/product/db10g/dbf/system01.dbf’

      Here it has applied all the archived log files, but still this is not recovered completely. This is where you should supply the current online redo log file.

      8) Recover until cancel again and supply current redo log file which is redo log 2.

      SQL> recover database until cancel;
      ORA-00279: change 4384519 generated at 06/13/2008 02:15:31 needed for thread 1
      ORA-00289: suggestion :
      /dy/oracle/product/db10g/archive/htmldb/ARCH_657248900_1_3.ARC
      ORA-00280: change 4384519 for thread 1 is in sequence #3

      Specify log: {=suggested | filename | AUTO | CANCEL}
      /dy/oracle/product/db10g/dbf/redo02.log
      Log applied.
      Media recovery complete.

      9) Once media recovery is complete, open database in reset log mode.

      SQL> alter database open resetlogs;

      Database altered.

      SQL>

      We were able to recover here after loosing the active redo log file, because that active redo log file was archived by archiver process.

      This is a complete recovery and there is no data loss.

      Hope this helps !!

  29. Jamal
    January 24, 2009 at 5:14 am | #30

    I am using oracle 9i database. when i connect the database then shwo the following error message, ORA-00227 corrupt block detected in control file (block 1 # block 1). Pls. give me the solution for the error.

  30. gindeel
    January 27, 2009 at 5:07 am | #31

    hi Praveen Akkivalli
    i have oracle 9i database , system shutdown power off , and i have error ora 010133 :insiaization or shutdown on progress

  31. Senthil
    February 5, 2009 at 7:10 am | #32

    I am having the some issue
    When I run the “ALTER DATABASE OPEN RESETLOGS”, I get the following error:
    ======================================================
    SQL> ALTER DATABASE OPEN RESETLOGS
    ALTER DATABASE OPEN RESETLOGS
    *
    ERROR at line 1:
    ORA-01194: file 1 needs more recoverty to be consistent
    ORA-01110: data file 1: ‘D:\ORACLE\PRODUCT\10.1.0\ORADATA\MSTF\SYSTEM01.DBF’

    ======================================================

    Is there a way to get past this error?

    Thanks,
    Senthil

    • akpraveen
      February 10, 2009 at 1:59 pm | #33

      Senthil,

      Here system file needs to be recovered. When you say recover database, it asks for the path of the archive log file. Give the path of log files one by one. It should recover the database.

      Hope this helps.

      Regards,
      -Praveen.

  32. Mohammad
    February 25, 2009 at 7:18 am | #34

    Hi Praveen,

    I want to set up archivelog mode for 7days (over write or reuse)?, And how do I set the archivelog destination to different server apart from production server, Kindly advice

    • akpraveen
      March 4, 2009 at 11:04 am | #35

      Mohammad,

      You cannot setup an archivelog destination to different server. To remove archivelogs after 7 days, you need to write a unix script for the same.

      Regards,
      -Praveen

  33. Dilli
    March 17, 2009 at 6:04 am | #36

    Hi Praveen.,

    ur content is very useful,and i have one question to u
    when we will put noresetlogs in create controlfile statement.
    thanks for the information.

  34. karthik
    March 17, 2009 at 10:56 am | #37

    Hi praveen,
    ur information is nice..
    can u mail me the steps that how to upgrade or apply patch for oracle.
    so that i can have idea in that.
    that means what are the prerequisites and post check ups for patching.

  35. Daniel
    May 1, 2009 at 11:25 am | #38

    Hi,
    Can you tell me how you managed to recover database when you had shutdown abort(Crashed database) and lost online redologs then how can you recover it ?
    to open a database (who had shutdown abort) needs recovery & for recovery needs online redologs. and you says you lost your online redo logs.

    can you justify this?

  36. Ram
    May 8, 2009 at 12:31 pm | #39

    Hi Praveen,

    Unfortunately, i deleted the redo logs. now the database is unable to start. i don’t have backup or archive of the logs. now what is the process i have to follow, to make the database up.
    Please let me know the process.

    Regards
    Ram

  37. Daniel
    May 14, 2009 at 10:22 am | #40

    Can you tell me please, if you had a crash & you have LOST your ACTIVE REDO LOG GROUP, how can you recover without it?
    By just re-creating control file how oracle will be in synchronize state in your example?

    Also it seems you’ve deleted(?) my previous post/comments asking the above/same question.

    Regards!

  38. akpraveen
    May 18, 2009 at 10:37 am | #41

    Daniel,

    Thanks for the comment. If your database was shutdown in consistent state, later you lost you redologs, you can recreate the controlfiles with the resetlogs option and then open the database with resetlogs. Once you create the controlfile with resetlogs option, new base SCN will be generated and as open the database with resetlogs, all the logs will be reset i.e will be recreated, before opening the database.

    Hope this helps,

    Regards,
    -Praveen.

  39. akpraveen
    May 18, 2009 at 11:14 am | #42

    Ram,

    Please follow the same steps as mentioned above for Daniel….

    Hope this helps,

    Regards,
    -Praveen.

  40. Daniel
    May 19, 2009 at 5:39 am | #43

    Hello,
    >>If your database was shutdown in consistent state, later you lost you >>redologs, you can recreate the controlfiles with the resetlogs option >>and then open the >>database with resetlogs.
    If shutdown was consistent it perfectly alright. but in your original post you said

    >>We came to know that one of the databases crashed.
    >>All other files i.e. control files and redo log files were lost
    so it means you’ve lost your active,current redo logs right?
    also you said
    >>We even did not have consistent backup for the database (Second mistake)

    so with only DATAFILES(with inconsistent state) & PFILE how did you managed to recover database?
    controlfile will/can be created but once you try to open database with that controlfile(newly created) ,it will definitely throw an error of inconsistency.

    • Raman
      February 9, 2012 at 10:07 am | #44

      Hi Daniel,

      It’ll no throw an error because you have DATAFILES AND PFILE

      Step:1.

      SQL> startup nomount pfile;

      SQL> create spfile from pfile;

      SQL>SQL> CREATE CONTROLFILE REUSE DATABASE “ORCL10G” RESETLOGS NOARCHIVELOG
      MAXLOGFILES 16
      MAXLOGMEMBERS 3
      MAXDATAFILES 100
      MAXINSTANCES 8
      MAXLOGHISTORY 292
      LOGFILE
      GROUP 1 ‘K:\ORCL10G\LOG\REDO01.LOG’ SIZE 50M,
      GROUP 2 ‘K:\ORCL10G\LOG\REDO02.LOG’ SIZE 50M,
      GROUP 3 ‘K:\ORCL10G\LOG\REDO03.LOG’ SIZE 50M
      DATAFILE
      ‘K:\ORCL10G\DATA\SYSTEM01.DBF’,
      ‘K:\ORCL10G\DATA\UNDOTBS01.DBF’,
      ‘K:\ORCL10G\DATA\SYSAUX01.DBF’,
      ‘K:\ORCL10G\DATA\USERS01.DBF’,
      ‘K:\ORCL10G\DATA\EXAMPLE01.DBF’,
      ‘K:\ORCL10G\DATA\UNDOTBS02.DBF’
      CHARACTER SET WE8MSWIN1252;

      Control file created.

      SQL> alter database open resetlogs;

      database is open and it’s working fine..

      Thanks
      –Raman–

  41. abdul hafeez
    August 30, 2009 at 1:07 pm | #45

    guys facing scenario of system datafile asking for recovery after recreating control file —

    try _allow_resetlogs_corruption

  42. nag
    November 27, 2009 at 6:40 am | #46

    HI Guys
    I underdtand that controlfile is a binary file how can you read. you might be having trace of controlfile to read.
    2. Yoou dont have to issue to check the controlfile location. simply go to $ORACLE_HOME/dbs and check of the init.ora file ( heare the is a catch you must see the time stamp and check the location of the controlfile.).
    3. If you dont have the controlfile trace , You need to create.
    4. It is always better to trace a controlfile.
    regards
    Nag

  43. umar
    February 7, 2010 at 5:24 pm | #47

    my redo log file is curepted how can i restore it

    • akpraveen
      February 11, 2010 at 4:10 pm | #48

      Umar,

      Do you have cold backup of the database/datafiles?

      Regards,
      -Praveen.

    • Raman
      February 9, 2012 at 10:10 am | #49

      Hi Umar,

      If your database was shutdown in consistent state, later you lost you redologs, you can recreate the controlfiles with the resetlogs option and then open the database with resetlogs. Once you create the controlfile with resetlogs option, new base SCN will be generated and as open the database with resetlogs, all the logs will be reset i.e will be recreated, before opening the database.

      Hope this helps,

      Regards,
      -Raman.

  44. sreeddhar
    February 20, 2010 at 7:08 am | #50

    hi praveen,

    i am working on oracle 11g dba, i having the diff daabases in the same loc i.e like /disk5/oradata/msrdb/
    ls
    sreedb msrdb, msdb
    like this diff databases are present,but i am using the msrdb and my sid name is also same.but i startup the database it comesto nomount but it not open it show the error control1.ctl file having msdb not in the msrdb , how i can solve this problem

  45. sreeddhar
    February 20, 2010 at 7:10 am | #51

    s, i had cold backup , iam also tried that one also but it not yet be possible to open database;

    • akpraveen
      February 22, 2010 at 4:13 pm | #52

      Hi,

      Could you please let us know the value of the control_files parameter in init.ora file of msrdb database?

      Regards,
      -Praveen.

  46. mahmadsalim
    April 24, 2010 at 5:14 am | #53

    your reply about the topics very fine . thanks for sharing knowledge.

  47. Sami
    September 1, 2010 at 7:26 pm | #54

    Hi Praveen,

    I came accross your post after reading through a lot of posts and trying to find an answer to my problem. I had an oracle 10 express edition database with some training data on my windows xp machine and it recently crashed. After the machine crashed, I was able to recover the oracle installation directory c:\oraclexe and I thought that I should be able to recover my data from the installation directory. Since I am not a DBA, I am not able to find any solution to my problem.

    Here is what I did so far without success.

    - Recovered the c:\oraclexe from the crashed machine.
    - Reformatted the machine and reinstalled Windows XP .
    - reinstalled oraclexe on the same location.
    -Stopped all the oraclexe services.
    -Copied and pasted the following files on the new server from the recovered oraclexe folder:
    6 files in C:\oraclexe\oradata\XE:
    CONTROL.DBF
    SYSAUX.DBF
    SYSTEM.DBF
    TEMP.DBF
    UNDO.DBF
    USER.DBF
    SPFILE is in C:\oraclexe\app\oracle\product\10.2.0\server\dbs.
    Two online redo log files are into C:\oraclexe\app\oracle\flash_recovery_area\XE\ONLINELOG.

    -restarted the oracle services.

    Once the server is restarted, I get errors saying that the database is not in an open state.

    I would really appreciate if you can help me with this and help me recover my data.

    Thank you,
    Sami

    • akpraveen
      September 2, 2010 at 3:07 pm | #55

      Hi Sami,

      Did you restore the database files mentioned from the backup? Could you please paste the actual screen output for better clarity?

      Regards,
      -Praveen.

  48. SUNIL
    November 25, 2010 at 12:56 pm | #56

    Hi praveer i have one clarification.. plz let me know..
    In the RMAN if target database is not mounted.. Then is it possible to connect to that target database from the catalog database.. If it is possible.. plz let me know the steps…

    Thanks in advance…
    Sunil.

    • akpraveen
      November 30, 2010 at 1:21 pm | #57

      Sunil,
      Yes it is possible… Have a look at the example below:

      sys@ORA10G> shutdown immediate;
      Database closed.
      Database dismounted.
      ORACLE instance shut down.
      sys@ORA10G> startup nomount
      ORACLE instance started.
      
      Total System Global Area  612368384 bytes
      Fixed Size                  1250452 bytes
      Variable Size             599788396 bytes
      Database Buffers            8388608 bytes
      Redo Buffers                2940928 bytes
      sys@ORA10G> exit
      Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
      With the Partitioning, OLAP and Data Mining options
      
      N:\>rman target / catalog rman/rman@rcatdb
      
      Recovery Manager: Release 10.2.0.1.0 - Production on Tue Nov 30 13:13:39 2010
      
      Copyright (c) 1982, 2005, Oracle.  All rights reserved.
      
      connected to target database: ora10g (not mounted)
      connected to recovery catalog database
      
      RMAN>
      
  49. Avinash
    May 5, 2011 at 7:31 am | #58

    Hi Praveen,

    Great Solution…..

    If you have any document related to RMAN recoveries… Please forward me….

    Thanks,
    Avinash

    • akpraveen
      May 6, 2011 at 10:08 am | #59

      Avinash,

      I don’t have any document other than RMAN reference guide.

      Regards,
      -Praveen.

  50. Avinash
    May 5, 2011 at 7:32 am | #63

    Hi Praveen,

    My mailid is avinashdmathur@gmail.com

    Thanks,
    Avinash

  51. ranjit pandey
    May 23, 2011 at 3:04 pm | #64

    can anyone help wen i try to install oracle 10g version i m getting microsoft loop back adapter error………….could someone help me regarding dis?????????????
    i tryd to search the error,and it said need to install microsoft loop back adapter and it did the same but still the problem persist.

    help me regarding dis problem.

    • September 14, 2011 at 6:55 pm | #65

      Dear Ranjit .. for loop back adapter u need to install adapter from the window’s available drives .. which u can find from hardware installation wizard …. after universal installation wizard success fuly completed .

  52. mogalaiah
    October 31, 2011 at 5:00 am | #66

    hi praveen

    i followed as you mentioned the steps for loss of controlfile and redologs , and got the database up to state ..
    now my question is how do we know that paths of datafiles, for security purpose they may create all datafiles in different locations .please clarify me….

    regards
    mogalaiah

    • akpraveen
      November 2, 2011 at 3:16 pm | #67

      Hi,

      I am not able to get the question clear. Do you want to know the current path of the datafiles, then use dba_data_files or v$datafile views.

      Regards,
      -Praveen.

      • mogalaiah
        December 4, 2011 at 12:13 pm | #68

        hi praveen,

        ya i got , but my question is it happens accidentally right
        “how do we take backup controlfile to trace, after loss of redologs and control file” is it possible to take
        without tracefiles, backup, and mirroring how to find the current path of the datafiles when the database is up and
        when database is shutdown mode “how to find current datafiles paths without trace file, backup, mirroring” .. please don’t mind clarify me…

      • akpraveen
        December 8, 2011 at 4:02 pm | #69

        Hi,

        You cannot take backup of the controlfile to trace if you have already lost the log files and controlfiles. The only way is to re-create the controlfile using resetlogs option and by manually adding the path of the data files belonging to the database in the controlfile creation script.

        Hope this helps.

        Regards,
        -Praveen.

  53. roman
    December 10, 2011 at 8:13 am | #70

    now i am clear why oracle database need backup, archive log mode

    thank u very much.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.